Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Guido Jäkel
On 2012-05-25 16:40, Christian Seiler wrote: > I'd really prefer shutting down a container just worked out of the box > without any strange modifications to /etc/inittab for sysvinit. I > really think shutting down containers properly is a functionality that > LXC should support out of the box. De

[lxc-devel] [PATCH 1/1] ubuntu: use lxc_putold as the pivot_root put dir

2012-05-25 Thread Serge Hallyn
By default we use mnt, but that means that lxc fstab entries do not work when placed under the container's /mnt/. Switching the default away from /mnt would work too, if noone objects. (I see no downside, but figured I'd play it safe for now) Signed-off-by: Serge Hallyn --- templates/lxc-ubunt

Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > On 05/25/2012 11:24 AM, Christian Seiler wrote: > > Hi, > > > >> Have you looked at the lxc-shutdown script we have in Ubuntu and the > >> integration we have with upstart? > > > > No, not yet, but I'll look at it later. > > > >> lxc-shutdown send

Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Ward, David - 0663 - MITLL
On 25/05/12 11:28, Ward, David - 0663 - MITLL wrote: On 25/05/12 10:40, Christian Seiler wrote: Hi, my lxc management script uses lxc-stop just for an emergency action called "fored-stop" and it will be also applied, if a normal "stop" (alias "halt") action will timeout after 5min. For this no

Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Stéphane Graber
On 05/25/2012 11:24 AM, Christian Seiler wrote: > Hi, > >> Have you looked at the lxc-shutdown script we have in Ubuntu and the >> integration we have with upstart? > > No, not yet, but I'll look at it later. > >> lxc-shutdown sends two different signals: >> reboot => SIGINT >> shutdown => SIG

Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Ward, David - 0663 - MITLL
On 25/05/12 10:40, Christian Seiler wrote: Hi, my lxc management script uses lxc-stop just for an emergency action called "fored-stop" and it will be also applied, if a normal "stop" (alias "halt") action will timeout after 5min. For this normal shutdown (or reboot) of a container, I'm sending

Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Christian Seiler
Hi, > Have you looked at the lxc-shutdown script we have in Ubuntu and the > integration we have with upstart? No, not yet, but I'll look at it later. > lxc-shutdown sends two different signals: > reboot => SIGINT > shutdown => SIGPWR > > These are caught by upstart and will trigger a clean re

Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Stéphane Graber
On 05/25/2012 07:56 AM, Christian Seiler wrote: > Hi, > > Currently, lxc-stop sends SIGKILL to the init process of the container, > which causes all the other processes in the container to also receive > a SIGKILL. I don't think that is a good course of action, since sending > SIGKILL to for examp

Re: [lxc-devel] Shutting down containers properly

2012-05-25 Thread Christian Seiler
Hi, > my lxc management script uses lxc-stop just for an emergency action > called "fored-stop" and it will be also applied, if a normal "stop" > (alias "halt") action will timeout after 5min. For this normal > shutdown (or reboot) of a container, I'm sending just a SIGPWR (or > SIGINT) to the con

Re: [lxc-devel] Getting some hooks into the container configuration

2012-05-25 Thread Stéphane Graber
On 05/25/2012 04:17 AM, Matthijs Kooijman wrote: > Hi Stéphane, > >> - stop: Is run after the container died >> [...] >> Potential other hooks include pre-start and post-stop > What would be the difference between stop and post-stop, if stop also > runs _after_ the container died? > > Gr. > > M

[lxc-devel] Shutting down containers properly

2012-05-25 Thread Jäkel , Guido
Dear Christian, my lxc management script uses lxc-stop just for an emergency action called "fored-stop" and it will be also applied, if a normal "stop" (alias "halt") action will timeout after 5min. For this normal shutdown (or reboot) of a container, I'm sending just a SIGPWR (or SIGINT) to th

[lxc-devel] Shutting down containers properly

2012-05-25 Thread Christian Seiler
Hi, Currently, lxc-stop sends SIGKILL to the init process of the container, which causes all the other processes in the container to also receive a SIGKILL. I don't think that is a good course of action, since sending SIGKILL to for example a database server can lead to potential data loss. A muc

Re: [lxc-devel] Getting some hooks into the container configuration

2012-05-25 Thread Matthijs Kooijman
Hi Stéphane, > - stop: Is run after the container died > [...] > Potential other hooks include pre-start and post-stop What would be the difference between stop and post-stop, if stop also runs _after_ the container died? Gr. Matthijs signature.asc Description: Digital signature -