Re: [lxc-devel] "Shutdown" LXC container
Hi Tobias, thanks for the detailed research on that. You are actually right and I got it working using sysvinit on Debian Squeeze. I just had to add the following line to /etc/inittab: ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now The lxc-debian template script creates a minimal /etc/inittab without the "ca" line. Christoph On 05/16/2011 10:47 PM, Tobias Gruetzmacher wrote: > Hi, > > On Mon, May 16, 2011 at 10:01:31AM +0200, Christoph Mitasch wrote: >> the idea is actually good, but my experience is that modern Linux >> distros are unable to shutdown with "kill -s INT/PWR". > > Well. I consider the default setup of your "modern" Linux distros > broken. So pressing Ctrl+Alt+Del on those does nothing? At all? > >> I tested on Debian Squeeze and Ubuntu Natty and it didn't work. What >> distro are you using? > > Debian on Debian. Works out of the box. And just for the fun of it: > > For reference: On a "normal" system, the Linux kernel sends SIGINT to > PID 1 when a "keyboard interrupt" (Ctrl+Alt+Del) is received. Search for > ctrl_alt_del and kill_cad_pid in the kernel for details. > > What actually happens after PID 1 receives the signal is a policy > decision. Let's see how different processes running as PID 1 handle > this (I'm using Debian packages as reference, see those for versions): > > * sysvinit (2.88dsf-13.6) > > As seen in src/init.c, lines 2429-2441, this just runs the ctrlaltdel > entry from /etc/inittab, which can be configured to shut down the > container. > > * upstart (0.6.6-2): > > If I see this correctly, in init/main.c, line 453, there is a signal > handle for SIGINT. There even is a default job file to handle this event > at conf/control-alt-delete.conf. > > * systemd (25-2): > > The code to handle this is in src/manager.c, lines 2120-2132. This > triggers ctrl-alt-del.target, which seems to be an alias for either > halt, reboot or poweroff, maybe based on a symlink? > > * runit (2.1.1-6.2): > > Handler is in src/runit.c lines 38-41 and seems to trigger a state > transition in lines 220-241. Looks sane. > > > > So it SEEMS that any "modern" init system should handle SIGINT just > fine. If they don't, now would be a good time to find out why... > > Have a nice day, Tobias -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel
[lxc-devel] [GIT] lxc branch, master, updated. 77890c6d6b198b68808a7ec3d0c4f0dbe87c0374
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "lxc". The branch, master has been updated via 77890c6d6b198b68808a7ec3d0c4f0dbe87c0374 (commit) via 88d413d5b6d1c2a3afcc7e3fcc0c037730c0abbe (commit) from 820339bd965d6ca4c0dc11b783d689a3efc0cc68 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 77890c6d6b198b68808a7ec3d0c4f0dbe87c0374 Author: Sven Wegener Date: Mon May 23 23:12:24 2011 +0200 Check for existing ptmx symlink It's OK, if /dev/ptmx points to /dev/pts/ptmx via a symlink. Signed-off-by: Sven Wegener Signed-off-by: Daniel Lezcano commit 88d413d5b6d1c2a3afcc7e3fcc0c037730c0abbe Author: Sven Wegener Date: Mon May 23 23:12:24 2011 +0200 Add relatime and strictatime mount options Also add #ifndef for compability with glibc before 2.12. Signed-off-by: Sven Wegener Signed-off-by: Daniel Lezcano --- Summary of changes: src/lxc/conf.c | 61 +++ 1 files changed, 39 insertions(+), 22 deletions(-) hooks/post-receive -- lxc -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel
Re: [lxc-devel] [PATCH] Add relatime and strictatime mount options
On 05/21/2011 08:35 PM, Sven Wegener wrote: > Also add #ifndef for compability with glibc before 2.12. > > Signed-off-by: Sven Wegener Applied Thanks. -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel
Re: [lxc-devel] [PATCH] Check for existing ptmx symlink
On 05/21/2011 08:35 PM, Sven Wegener wrote: > It's OK, if /dev/ptmx points to /dev/pts/ptmx via a symlink. > > Signed-off-by: Sven Wegener Applied. Thanks Sven. -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel