Fix flaky btrfs test
Add logging and move the creation of the snapshotter inside the attempt loop to catch cases where the mountinfo may not be updated yet. When all attempts are reached there is no reason to create the snapshotter as the unmount has already occurred. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -77,7 +77,7 @@ func NewSnapshotter(root string) (snapshots.Snapshotter, error) {
|
||||
return nil, err
|
||||
}
|
||||
if mnt.FSType != "btrfs" {
|
||||
return nil, errors.Wrapf(plugin.ErrSkipPlugin, "path %s must be a btrfs filesystem to be used with the btrfs snapshotter", root)
|
||||
return nil, errors.Wrapf(plugin.ErrSkipPlugin, "path %s (%s) must be a btrfs filesystem to be used with the btrfs snapshotter", root, mnt.FSType)
|
||||
}
|
||||
var (
|
||||
active = filepath.Join(root, "active")
|
||||
|
||||
Reference in New Issue
Block a user