]> git.ipfire.org Git - thirdparty/lxc.git/commit
unmount failure is not fatal
authorDaniel Lezcano <daniel.lezcano@free.fr>
Fri, 22 Jan 2010 10:29:10 +0000 (11:29 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 22 Jan 2010 10:29:10 +0000 (11:29 +0100)
commit7df119eeaead89243486d33339fc039bde0eef04
tree265a144095a0731b66380c385b2b57eb2a4338fe
parentbd288c265ac26dd4a63e7089858ea8f3d78447e6
unmount failure is not fatal

There are several cases where the system can no longer access a mount
point or a mount point configuration makes the algorithm bogus.

For example, we mount something and then we chroot, the mount information
will give an unaccessible path and the container won't be able to start
because this mount point will be unaccessible. But if it's the case, then
we can just warn and continue running the container.

Another case is the path to a mount point is not accessible because there
is another mount point on top of it hiding the mount point. So the umount
will fail and the container won't start.

Easy to reproduce:

mkdir -p /tmp/dir1/dir2
mount -t tmpfs tmpfs /tmp/dir1/dir2
mount -t tmpfs tmpfs /tmp/dir1

So can we just ignore the error when unmounting and continue to the list again
and again until it shrinks.

At the end, we just display the list of the unmounted points.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/conf.c