[Lxc-users] Ubuntu template questions
serge.hallyn at canonical.com
Wed Mar 28 17:36:15 UTC 2012
Quoting Papp Tamas (tompos at martos.bme.hu):
> On 03/13/2012 11:05 PM, Serge Hallyn wrote:
> >Quoting Fajar A. Nugraha (list at fajar.net):
> >>On Wed, Mar 14, 2012 at 2:04 AM, Serge Hallyn
> >><serge.hallyn at canonical.com> wrote:
> >>>Quoting Papp Tamas (tompos at martos.bme.hu):
> >>>>One more, I think very important question.
> >>>>Still there is no nice stop method in init configuration:
> >>>> for f in /etc/lxc/auto/*; do
> >>>> c="$(basename $f .conf)"
> >>>> lxc-stop -n $c || true
> >>>> done
> >>>Sorry, I don't understand. What you show is done in /etc/init/lxc.conf.
> >>>What is your question about it?
> >>I think he means "can you use something there that gracefully shuts
> >>down a container, instead of forcing it to stop". In xen there's "xm
> >>shutdown" vs "xm destroy", while in lxc there's only "lxc-stop", and
> >>no (e.g.) "lxc-shutdown",
> >Ah, I see.
> >Once lxc-attach is supported we should do that, yes.
> There is an lxc-shutdown script now. Does this handle this properly?
It sends SIGPWR to the container to ask it politely to shut down
cleanly. If init in the container ignores that, you'll have to
resort to lxc-stop. IIUC sysvinit will DTRT, and upstart in
precise containers will as well.
More information about the lxc-users