<div dir="ltr">No matter what I try to do, it seems that the template that I am using does not properly start a container using /sbin/init, and fails without error but only the warning: "lxc_start - invalid pid for SIGCHLD". I've tried a variety of different commands within the template in order to start the container, including<div>
<br></div><div> <span class="">exec</span> /usr/lib/lxc/lxc-init -- /bin/ls</div><div> <span class="">exec</span> /usr/lib/lxc/lxc-init -- /usr/bin/watch /bin/ls /</div><div><br></div><div>and so on, but the results are always the same.</div>
<div><br></div><div><div>Running the following commands<br><br> # lxc-create -t minimal -n test -l DEBUG -o /tmp/lxc.log<br> # lxc-start -d -n test -l DEBUG -o /tmp/lxc.log<br><br>results in the following output in the logs<br>
<br> lxc-start 1392050744.235 NOTICE lxc_start - exec'ing '/sbin/init'<br> lxc-start 1392050744.237 NOTICE lxc_start - '/sbin/init' started with pid '27985'<br> lxc-start 1392050744.237 WARN lxc_start - invalid pid for SIGCHLD<br>
lxc-start 1392050744.239 DEBUG lxc_commands - peer has disconnected<br> lxc-start 1392050744.239 DEBUG lxc_commands - 'test' is in 'RUNNING' state<br> lxc-start 1392050744.240 DEBUG lxc_commands - peer has disconnected<br>
lxc-start 1392050744.274 DEBUG lxc_start - container init process exited<br> lxc-start 1392050744.274 INFO lxc_conf - running to reset 0 nic names<br><br>I have even tried having lxc-init run a script that invokes a daemon.</div>
<div><br class=""> <span class="">exec</span> /usr/lib/lxc/lxc-init -- /tmp/boringd</div><div><br></div><div>Where boringd is</div><div><br> #! /usr/bin/env bash<br> /usr/bin/daemon -- watch ls /tmp</div><div><br>
Here is the full template:<div><br></div><div><a href="https://gist.github.com/nelsnelson/9601966">https://gist.github.com/nelsnelson/9601966</a><br></div><div><br></div><div>And here is the full log:</div><div><br></div>
<div><a href="https://gist.github.com/nelsnelson/9601987">https://gist.github.com/nelsnelson/9601987</a><br></div><div><br></div><div>What am I doing wrong here?</div><div><br></div><div>I suppose I really don't understand how a lxc container is supposed to get created and started based on the specifications of a template.</div>
</div></div><div><br></div><div>Are there any in-depth tutorials or documentation available on template design and construction and how they are supposed to be used?</div><div><br></div><div>Thanks,</div><div>-Nels</div><div>
<br></div><div><br></div></div>