New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context: on error use lazy umount #26
Conversation
Closes: mwhudson#25 When running kernel-replace 'umount -R' tends to fail. Catch the exception and use 'umount -l' in that case. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
While this is probably a pragmatic change, I do really hate the sort of non-deterministic approach to cleaning up mounts. Do you have any idea why the umount -R is failing? |
@mwhudson I was not able to identify the process that is blocking the release. Are you able to reproduce the problem? |
I spent a while (probably too long) trying to figure out what's going on and failing which is a bit annoying. Oh well. This is a pragmatic change. |
The existing code in writeFilesystemContent() will error when the filesystem cannot be unmounted. However in practise this is problematic as the live-system can keep the mount point busy: https://bugs.launchpad.net/snapd/+bug/2025402 As a pragmatic solution this commit unmounts the filesystem with the `--lazy` option if a normal unmount does not work. This is what live-editor is doing: mwhudson/livefs-editor#26 Alternatively we could do a bunch of retries and wait for the process that keep the filesystem busy to go away.
* install: lazy unmount() in writeFilesystemContent() if needed The existing code in writeFilesystemContent() will error when the filesystem cannot be unmounted. However in practise this is problematic as the live-system can keep the mount point busy: https://bugs.launchpad.net/snapd/+bug/2025402 As a pragmatic solution this commit unmounts the filesystem with the `--lazy` option if a normal unmount does not work. This is what live-editor is doing: mwhudson/livefs-editor#26 Alternatively we could do a bunch of retries and wait for the process that keep the filesystem busy to go away. * install: log unmount errors (thanks to Alfonso!) * install: also lazy unmount in MountVolumes() * install: fix silly typo * install: improve logging on install failure
* install: lazy unmount() in writeFilesystemContent() if needed The existing code in writeFilesystemContent() will error when the filesystem cannot be unmounted. However in practise this is problematic as the live-system can keep the mount point busy: https://bugs.launchpad.net/snapd/+bug/2025402 As a pragmatic solution this commit unmounts the filesystem with the `--lazy` option if a normal unmount does not work. This is what live-editor is doing: mwhudson/livefs-editor#26 Alternatively we could do a bunch of retries and wait for the process that keep the filesystem busy to go away. * install: log unmount errors (thanks to Alfonso!) * install: also lazy unmount in MountVolumes() * install: fix silly typo * install: improve logging on install failure
* install: lazy unmount() in writeFilesystemContent() if needed The existing code in writeFilesystemContent() will error when the filesystem cannot be unmounted. However in practise this is problematic as the live-system can keep the mount point busy: https://bugs.launchpad.net/snapd/+bug/2025402 As a pragmatic solution this commit unmounts the filesystem with the `--lazy` option if a normal unmount does not work. This is what live-editor is doing: mwhudson/livefs-editor#26 Alternatively we could do a bunch of retries and wait for the process that keep the filesystem busy to go away. * install: log unmount errors (thanks to Alfonso!) * install: also lazy unmount in MountVolumes() * install: fix silly typo * install: improve logging on install failure
…re#12939) * install: lazy unmount() in writeFilesystemContent() if needed The existing code in writeFilesystemContent() will error when the filesystem cannot be unmounted. However in practise this is problematic as the live-system can keep the mount point busy: https://bugs.launchpad.net/snapd/+bug/2025402 As a pragmatic solution this commit unmounts the filesystem with the `--lazy` option if a normal unmount does not work. This is what live-editor is doing: mwhudson/livefs-editor#26 Alternatively we could do a bunch of retries and wait for the process that keep the filesystem busy to go away. * install: log unmount errors (thanks to Alfonso!) * install: also lazy unmount in MountVolumes() * install: fix silly typo * install: improve logging on install failure
Closes: #25
When running kernel-replace 'umount -R' tends to fail. Catch the exception and use 'umount -l' in that case.
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de