[lxc-devel] Strange problem (stray mounts) with lxc-create...

Serge Hallyn serge.hallyn at ubuntu.com
Wed Oct 9 14:19:59 UTC 2013


Quoting Michael H. Warfield (mhw at WittsEnd.com):
> Hey all,
> 
> Since I'm working on testing a bunch of things, including the Fedora
> templates, I've been creating and destroying a LOT of containers.  Every
> once in a while I get a failure due to failure to mount on...  What I
> find are a large number (half dozen or more) of dangling mounts like
> this:
> 
> /dev/mapper/fedora-root on /usr/lib64/lxc/rootfs type ext4 (rw,relatime,seclabel,data=ordered)
> /dev/mapper/fedora-root on /usr/lib64/lxc/rootfs type ext4 (rw,relatime,seclabel,data=ordered)
> 
> What I'm finding is that, after running lxc-create, regardless of
> template, I'm left with one more of these dangling mounts.  I can go
> back and unmount them and then I can do more lxc-creates until it
> happens again.  That's not referenced (afaict) anywhere in the Fedora
> template and it's affecting all the templates that I can get to run on
> Fedora.  Maybe we're not cleaning something up in there somewhere?
> 
> I'm running off the git master branch.

You say this happens after lxc-creates, not lxc-starts?  That *is*
weird, because the template is run in a separate mount namespace.

So my first guess would have been that some task (i.e. udev) is
pinning the mount ns and preventing auto-reap, but that can't
be because you say you are unmounting them from the init mount
namespace to clean them up.

Very strange.  What is the lxc.conf you are passing to lxc-create?
What backing store type are you using?  Maybe I have a bug in
one of the bdev_create() helpers.

-serge




More information about the lxc-devel mailing list