objectstore: sync before unmounting
This should, in theory, not be necessary because the bubblewrap process and its children should be stopped already and umount should just block until it is finished. But, if the store is on a filesystem, like the one used by docker machine, unmounting frequently produces errors like: `umount: .../tmp9nlyzwdu-writer: target is busy.` Syncing the filesystem before that seems to help in some cases and it surely does not hurt.
This commit is contained in:
parent
1dc845f331
commit
23628b3f62
1 changed files with 1 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ def umount(target, lazy=False):
|
|||
args = []
|
||||
if lazy:
|
||||
args += ["--lazy"]
|
||||
subprocess.run(["sync", "-f", target], check=True)
|
||||
subprocess.run(["umount"] + args + [target], check=True)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue