Bug#551992: general: stopping squeeze chroot shuts system
On Fri, Oct 23, 2009 at 12:04:02PM +0200, mar...@grachtwal.nu wrote: > >> In a lenny chroot, on the same system, rc6.d/S90reboot calls 'reboot -d > >> -f > >> i' and that works like I'd expect; the chroot is stopped and the system > >> keeps on running. > >> In the squeeze chroot we have rc6.d/K09reboot and the same 'reboot -d -f > >> -i'. > >> > >> I will check if the -f does the trick but I still think the behaviour > >> should be the same for both lenny and squeeze. I also think that the > >> ability to reboot a system by rebooting a chrooted environment shouldn't > >> be possible so the bug remains. > >> > >> According xen or kvm; eventually we will make that change of course, but > >> at the moment that's not something we're focussing. > >> > > > > Your script only calls all K* scripts (not S* scripts) when stop is > > invoked. Hence in the system where reboot is S90, it won't call it. > > Where it's K09, it will be called. I suspect if you rm K09reboot in > > the squeeze chroot, it will fix the behaviour to what you want. > > > > As far as rebooting from inside a chroot rebooting the system I don;t > > know whether that's a bug or not. As far as I'm aware it has been the > > way it's behaved for a long while...not sure what you can do to > > prevent it even... > > Ah, never occured to me that would be considered as normal behaviour. To > be honest, I still think it shouldn't be possible but I don't want to > start a religious fight about that. There is no fight about this, you're just expecting too much from the wrong tool. What you want is simply not chroot, but containers, such as openvz, vserver or lxc. Mike -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#551992: general: stopping squeeze chroot shuts system
>> In a lenny chroot, on the same system, rc6.d/S90reboot calls 'reboot -d >> -f >> i' and that works like I'd expect; the chroot is stopped and the system >> keeps on running. >> In the squeeze chroot we have rc6.d/K09reboot and the same 'reboot -d -f >> -i'. >> >> I will check if the -f does the trick but I still think the behaviour >> should be the same for both lenny and squeeze. I also think that the >> ability to reboot a system by rebooting a chrooted environment shouldn't >> be possible so the bug remains. >> >> According xen or kvm; eventually we will make that change of course, but >> at the moment that's not something we're focussing. >> > > Your script only calls all K* scripts (not S* scripts) when stop is > invoked. Hence in the system where reboot is S90, it won't call it. > Where it's K09, it will be called. I suspect if you rm K09reboot in > the squeeze chroot, it will fix the behaviour to what you want. > > As far as rebooting from inside a chroot rebooting the system I don;t > know whether that's a bug or not. As far as I'm aware it has been the > way it's behaved for a long while...not sure what you can do to > prevent it even... Ah, never occured to me that would be considered as normal behaviour. To be honest, I still think it shouldn't be possible but I don't want to start a religious fight about that. I was so worried by the (for me) spontanious reboot I didn't check as carefully as I should have. My bad. Thanks for all the fast responses and sorry for my ignorance. Martin > > -- > Stephen Stafford > > -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#551992: general: stopping squeeze chroot shuts system
> In a lenny chroot, on the same system, rc6.d/S90reboot calls 'reboot -d -f > i' and that works like I'd expect; the chroot is stopped and the system > keeps on running. > In the squeeze chroot we have rc6.d/K09reboot and the same 'reboot -d -f -i'. > > I will check if the -f does the trick but I still think the behaviour > should be the same for both lenny and squeeze. I also think that the > ability to reboot a system by rebooting a chrooted environment shouldn't > be possible so the bug remains. > > According xen or kvm; eventually we will make that change of course, but > at the moment that's not something we're focussing. > Your script only calls all K* scripts (not S* scripts) when stop is invoked. Hence in the system where reboot is S90, it won't call it. Where it's K09, it will be called. I suspect if you rm K09reboot in the squeeze chroot, it will fix the behaviour to what you want. As far as rebooting from inside a chroot rebooting the system I don;t know whether that's a bug or not. As far as I'm aware it has been the way it's behaved for a long while...not sure what you can do to prevent it even... -- Stephen Stafford -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#551992: general: stopping squeeze chroot shuts system
> /etc/rc6.d/S90reboot invokes reboot -d -f -i. The -f there means it > goes straight to the kernel to reboot. > Make that file empty (so it's treated as a conffile change) and you > should be good. > You might also want to consider using kvm or xen instead of raw chroots... > In a lenny chroot, on the same system, rc6.d/S90reboot calls 'reboot -d -f i' and that works like I'd expect; the chroot is stopped and the system keeps on running. In the squeeze chroot we have rc6.d/K09reboot and the same 'reboot -d -f -i'. I will check if the -f does the trick but I still think the behaviour should be the same for both lenny and squeeze. I also think that the ability to reboot a system by rebooting a chrooted environment shouldn't be possible so the bug remains. According xen or kvm; eventually we will make that change of course, but at the moment that's not something we're focussing. Regards, Martin -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#551992: general: stopping squeeze chroot shuts system
On Thu, Oct 22, 2009 at 5:01 PM, wrote: > All, > very sorry for the confusion about stopping the chroot. > I think the easiest way is to include the script we use to 'start' > and 'stop' chroots. > > Some notes; > - I haven't written the script, so any geniality or stupidity isn't mine > - For managing different chrooted environments it works really great. > - Using scripts like these we can move applications in dedicated chroots > extremely fast across our 2 datacenters. > - I know we use an outdated form of technology, it works though. Well, up > until this afternoon it did. /etc/rc6.d/S90reboot invokes reboot -d -f -i. The -f there means it goes straight to the kernel to reboot. Make that file empty (so it's treated as a conffile change) and you should be good. You might also want to consider using kvm or xen instead of raw chroots... -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#551992: general: stopping squeeze chroot shuts system
All, very sorry for the confusion about stopping the chroot. I think the easiest way is to include the script we use to 'start' and 'stop' chroots. Some notes; - I haven't written the script, so any geniality or stupidity isn't mine - For managing different chrooted environments it works really great. - Using scripts like these we can move applications in dedicated chroots extremely fast across our 2 datacenters. - I know we use an outdated form of technology, it works though. Well, up until this afternoon it did. Regards, Martin > On Thu, Oct 22, 2009 at 02:16:39PM +0200, Martin Boer > was heard to say: >> On this system I installed a squeeze chroot using the following command: >> >> debootstrap squeeze /chroot/squeeze-x64-lighttpd-chroot >> http://ftp.debian.org/debian/ >> >> This works as expected but when I stop the chroot, the system shuts as >> well. >> This is highly unexpected and somewhat unpleasant behaviour. > > By "stop the chroot", do you mean that you typed "exit" in the > chrooted shell, or that you ran "shutdown -h" there? > > Daniel > > chroot Description: Binary data
Bug#551992: general: stopping squeeze chroot shuts system
Daniel Burrows writes: > On Thu, Oct 22, 2009 at 02:16:39PM +0200, Martin Boer > was heard to say: >> On this system I installed a squeeze chroot using the following command: >> >> debootstrap squeeze /chroot/squeeze-x64-lighttpd-chroot >> http://ftp.debian.org/debian/ >> >> This works as expected but when I stop the chroot, the system shuts as well. >> This is highly unexpected and somewhat unpleasant behaviour. > > By "stop the chroot", do you mean that you typed "exit" in the > chrooted shell, or that you ran "shutdown -h" there? > > Daniel or reboot or halt. That normaly gives an error 'init: timeout opening/writing control channel /dev/initctl'. But if you mount --bind /dev /chroot/squeeze-x64-lighttpd-chroot/dev then I guess that would tell the real init to shutdown/reboot. Just guessing, Goswin -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#551992: general: stopping squeeze chroot shuts system
> Package: general > Severity: important > > > On this system I installed a squeeze chroot using the following command: > > debootstrap squeeze /chroot/squeeze-x64-lighttpd-chroot > http://ftp.debian.org/debian/ > > This works as expected but when I stop the chroot, the system shuts as well. > This is highly unexpected and somewhat unpleasant behaviour. > Could you please elaborate on "stop the chroot"? One can enter and leave a chroot, but a chroot is not a daemon or virtual host that could be started/stopped!? Thanks, Michael pgpS90X8uw2uR.pgp Description: PGP signature
Bug#551992: general: stopping squeeze chroot shuts system
Hi Martin, thanks for your bugreport! On Donnerstag, 22. Oktober 2009, Martin Boer wrote: > This works as expected but when I stop the chroot, the system shuts as > well. This is highly unexpected and somewhat unpleasant behaviour. How do you stop the chroot? regards, Holger signature.asc Description: This is a digitally signed message part.
Bug#551992: general: stopping squeeze chroot shuts system
On Thu, Oct 22, 2009 at 02:16:39PM +0200, Martin Boer was heard to say: > On this system I installed a squeeze chroot using the following command: > > debootstrap squeeze /chroot/squeeze-x64-lighttpd-chroot > http://ftp.debian.org/debian/ > > This works as expected but when I stop the chroot, the system shuts as well. > This is highly unexpected and somewhat unpleasant behaviour. By "stop the chroot", do you mean that you typed "exit" in the chrooted shell, or that you ran "shutdown -h" there? Daniel -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#551992: general: stopping squeeze chroot shuts system
Package: general Severity: important On this system I installed a squeeze chroot using the following command: debootstrap squeeze /chroot/squeeze-x64-lighttpd-chroot http://ftp.debian.org/debian/ This works as expected but when I stop the chroot, the system shuts as well. This is highly unexpected and somewhat unpleasant behaviour. Regards, Martin Boer mar...@grachtwal.nu -- System Information: Debian Release: 5.0.3 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org