<div dir="ltr"><div><div>Thank you for your responses!<br><br></div>I switched our lxc from stable to daily:<br>    <a href="http://ppa.launchpad.net/ubuntu-lxc/daily/ubuntu">http://ppa.launchpad.net/ubuntu-lxc/daily/ubuntu</a> saucy main<br>
</div><div>I removed lxc and re-installed it.<br>>>> lxc.version<br>'1.0.0.alpha1'<br>>>> <br></div><div><br></div><div>Using   <a href="https://raw.github.com/lxc/lxc/master/hooks/mountcgroups" target="_blank">https://raw.github.com/lxc/lxc/master/hooks/mountcgroups</a><br>
</div><div>did not help.  In fact the containers would not start the first time:<br>    lxc-start: command get_init_pid failed to receive response<br><br></div><div>Using lxc.hook.mount = /usr/share/lxc/hooks/mountcgroups<br>
</div><div>The containers start the first time but not the second time - <br>    lxc-start: command get_init_pid failed to receive response<br>Only the error message has changed from the stable version.<br><br></div><div>
Following S. Graber's suggestion:<br><br>lxc.aa_profile = lxc-container-default-with-nesting<br>#lxc.hook.mount = /usr/share/lxc/hooks/mountcgroups<br><br></div><div>Now I can re-start the container.  Now I need to see about configuring<br>
</div><div>the cgroups in our nested containers.<br><br>Thank you for your help !!!!!!<br><br></div><div>I look forward to lxc using the new cgroup manager.<br></div><div><span class=""><font color="#888888"></font></span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 31, 2013 at 8:56 AM, S.Çağlar Onur <span dir="ltr"><<a href="mailto:caglar@10ur.org" target="_blank">caglar@10ur.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div><div class="h5"><br>
On Sat, Dec 28, 2013 at 5:21 AM, Stéphane Graber <<a href="mailto:stgraber@ubuntu.com">stgraber@ubuntu.com</a>> wrote:<br>
> On Fri, Dec 27, 2013 at 06:56:15PM -0500, S.Çağlar Onur wrote:<br>
>> Hey Pauk,<br>
>><br>
>> On Fri, Dec 27, 2013 at 6:49 PM, Paul Wexler<br>
>> <<a href="mailto:paul@prometheusresearch.com">paul@prometheusresearch.com</a>> wrote:<br>
>> > Hello lxc community,<br>
>> ><br>
>> > Has anyone used nested containers?<br>
>> ><br>
>> > I am trying with limited success.  I cannot re-start them.<br>
>> > I can:<br>
>> >   1. create a container.<br>
>> >   2. configure it for nesting (I uncomment 2 lines in config).<br>
>> >   3. start the container.<br>
>> >   4. stop the container.<br>
>> >   5. but I cannot re-start the container.<br>
>> ><br>
>> > However, if I do not configure the container for nesting then<br>
>> > I can stop and re-start the container repeatedly without errors.<br>
>> ><br>
>> > Specifically, the following command line sequence fails on the<br>
>> > second lxc-start (please note I do not show the normal lxc-<br>
>> > output below, only the error msg):<br>
>> ><br>
>> >   # lxc-create -t ubuntu -n C00<br>
>> >   # X="lxc.aa_profile = lxc-container-default-with-nesting"<br>
>> >   # sed -i -e "s/^#$X/$X/" /var/lib/lxc/C00/config<br>
>> >   # X="lxc.hook.mount = /usr/share/lxc/hooks/mountcgroups"<br>
>> >   # sed -i -e "s/^#$X/$X/" /var/lib/lxc/C00/config<br>
>> >   # lxc-start -d -n C00<br>
>> >   # lxc-stop -n C00<br>
>> >   # lxc-start -d -n C00<br>
>> >   lxc-start: command get_cgroup failed to receive response<br>
>><br>
>> I believe this issue fixed after alpha has been released [1] so could<br>
>> you try replacing your mountcgroups hook with [2] and try again to see<br>
>> what will happen?<br>
><br>
> Right, the issue here appears to be mountcgroups not cleaning up after<br>
> itself and being confused on the second run.<br>
<br>
</div></div>Oh, right I misunderstood the problem and though starts are failing<br>
due to lxc.include.<br>
<div class="im"><br>
> Hopefully we'll be dropping that hook entirely with the introduction of<br>
> cgmanger in the next few weeks...<br>
><br>
> Depending on what you are doing, you may also just comment that hook<br>
> entirely as cgroup-lite in the container will then simply mount the<br>
> cgroupfs controllers and LXC will be able to use them (however this will<br>
> most likely bypass any cgroup restriction you applied on the first<br>
> container, if any).<br>
<br>
</div>What about removing those leftover cgroup directories in post-stop hook?<br>
<div class="HOEnZb"><div class="h5"><br>
>><br>
>> > When I start the container the first time, lxc-ls --fancy<br>
>> > displays the container's IP address.  Then I can ssh to the<br>
>> > container as 'ubuntu', install packages there such as lxc,<br>
>> > and even create containers there, the container is working<br>
>> > just fine.<br>
>> ><br>
>> > But once I stop the container I can never start it again.<br>
>> > Always with the same get_cgroup error as above.<br>
>> ><br>
>> > I am using:<br>
>> >   lxc version ==  '1.0.0.alpha2'<br>
>> >   kernel == 3.11.0-12-generic<br>
>> ><br>
>> > Any ideas/suggestions on how one might re-start such a container?<br>
>> > Thank you.<br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > lxc-devel mailing list<br>
>> > <a href="mailto:lxc-devel@lists.linuxcontainers.org">lxc-devel@lists.linuxcontainers.org</a><br>
>> > <a href="http://lists.linuxcontainers.org/listinfo/lxc-devel" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-devel</a><br>
>> ><br>
>><br>
>> [1] <a href="https://github.com/lxc/lxc/commit/fa7fced87899ae37f193c81115543d1df5c28fbb" target="_blank">https://github.com/lxc/lxc/commit/fa7fced87899ae37f193c81115543d1df5c28fbb</a><br>
>> [2] <a href="https://raw.github.com/lxc/lxc/master/hooks/mountcgroups" target="_blank">https://raw.github.com/lxc/lxc/master/hooks/mountcgroups</a><br>
>><br>
>> Best,<br>
>> --<br>
>> S.Çağlar Onur <<a href="mailto:caglar@10ur.org">caglar@10ur.org</a>><br>
>> _______________________________________________<br>
>> lxc-devel mailing list<br>
>> <a href="mailto:lxc-devel@lists.linuxcontainers.org">lxc-devel@lists.linuxcontainers.org</a><br>
>> <a href="http://lists.linuxcontainers.org/listinfo/lxc-devel" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-devel</a><br>
><br>
> --<br>
> Stéphane Graber<br>
> Ubuntu developer<br>
> <a href="http://www.ubuntu.com" target="_blank">http://www.ubuntu.com</a><br>
><br>
> _______________________________________________<br>
> lxc-devel mailing list<br>
> <a href="mailto:lxc-devel@lists.linuxcontainers.org">lxc-devel@lists.linuxcontainers.org</a><br>
> <a href="http://lists.linuxcontainers.org/listinfo/lxc-devel" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-devel</a><br>
><br>
<br>
<br>
<br>
--<br>
S.Çağlar Onur <<a href="mailto:caglar@10ur.org">caglar@10ur.org</a>><br>
_______________________________________________<br>
lxc-devel mailing list<br>
<a href="mailto:lxc-devel@lists.linuxcontainers.org">lxc-devel@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-devel" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-devel</a><br>
</div></div></blockquote></div><br></div>