[lxc-devel] Strange problem (stray mounts) with lxc-create...
Michael H. Warfield
mhw at WittsEnd.com
Wed Oct 9 14:34:58 UTC 2013
On Wed, 2013-10-09 at 09:19 -0500, Serge Hallyn wrote:
> 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.
Yeah, yeah. That's what's WIERD about it. It's not happening in
conjunction with lxc-start at all. But, if I create a pile of new
containers without starting any of them, we stack up these dangling
mounts till I get failures.
> 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.
From the host name space, correct.
> 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.
I'm not...
Just, literally...
Check mount table... No stray mounts...
[root at hydra mhw]# umount /usr/lib64/lxc/rootfs
umount: /usr/lib64/lxc/rootfs: not mounted
Then...
lxc-create -n Ubuntu-test -t ubuntu
Bingo...
/dev/mapper/fedora-root on /usr/lib64/lxc/rootfs type ext4 (rw,relatime,seclabel,data=ordered)
Why is lxc-create even creating that mount? I don't see any reason for
it. We're never running the container in lxc-create. Running
"umount /usr/lib64/lxc/rootfs" clears it and we're off to the races
again.
If I were to venture a WAG (Wild Ass Guess) some initialization code is
creating that bind mount that is not needed and that the cleanup code in
lxc-create is unaware of. But I haven't gone to the trouble of trying
to track the code down yet.
> -serge
Regards,
Mike
--
Michael H. Warfield (AI4NB) | (770) 985-6132 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20131009/2a24645b/attachment.pgp>
More information about the lxc-devel
mailing list