On Wed, 2013-10-09 at 09:19 -0500, Serge Hallyn wrote: 
> Quoting Michael H. Warfield (m...@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@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 |  m...@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!

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to