Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread Clint Byrum
On Fri, 2011-03-18 at 11:27 +, gollum53 wrote: Hi, I have installed the latest mentioned files here (sendsigs, omit-kvm-vm-pid, libvirt-bin.conf with 'break' command suggested by Martin Rusko) on our Lucid 64bit. servers, and it did not help. When doing a reboot, the system does not

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread Lars Hansson
The problem with the upstart solution is that it doesn't work since Upstart will kill the virsh instances that you spawn in shutdown_guests. So far the only somewhat satisfactory solution is molly-guard. -- You received this bug notification because you are a member of Ubuntu Server Team, which

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread John Morrissey
On Fri, Mar 18, 2011 at 05:13:55PM -, Lars Hansson wrote: The problem with the upstart solution is that it doesn't work since Upstart will kill the virsh instances that you spawn in shutdown_guests. That's only the case if you don't follow the instructions to patch sendsigs to avoid that

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread Clint Byrum
On Fri, 2011-03-18 at 17:13 +, Lars Hansson wrote: The problem with the upstart solution is that it doesn't work since Upstart will kill the virsh instances that you spawn in shutdown_guests. So far the only somewhat satisfactory solution is molly-guard. Right, so you would need

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread Clint Byrum
On Fri, 2011-03-18 at 11:27 +, gollum53 wrote: Hi, I have installed the latest mentioned files here (sendsigs, omit-kvm-vm-pid, libvirt-bin.conf with 'break' command suggested by Martin Rusko) on our Lucid 64bit. servers, and it did not help. When doing a reboot, the system does not

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread Lars Hansson
The problem with the upstart solution is that it doesn't work since Upstart will kill the virsh instances that you spawn in shutdown_guests. So far the only somewhat satisfactory solution is molly-guard. -- You received this bug notification because you are a member of Ubuntu Bugs, which is

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread John Morrissey
On Fri, Mar 18, 2011 at 05:13:55PM -, Lars Hansson wrote: The problem with the upstart solution is that it doesn't work since Upstart will kill the virsh instances that you spawn in shutdown_guests. That's only the case if you don't follow the instructions to patch sendsigs to avoid that

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2011-03-18 Thread Clint Byrum
On Fri, 2011-03-18 at 17:13 +, Lars Hansson wrote: The problem with the upstart solution is that it doesn't work since Upstart will kill the virsh instances that you spawn in shutdown_guests. So far the only somewhat satisfactory solution is molly-guard. Right, so you would need

RE: [Bug 350936] Re: Should shut down domains on system shutdown

2011-02-02 Thread Orticio Jlgtgutisu
¿? Lenguage spanisch ?? Date: Wed, 2 Feb 2011 00:22:03 + From: cl...@fewbar.com To: jlguti...@hotmail.com Subject: [Bug 350936] Re: Should shut down domains on system shutdown Oops, just noticed, that should be $UPSTART_STOP_EVENTS -- You received this bug

RE: [Bug 350936] Re: Should shut down domains on system shutdown

2011-02-02 Thread Orticio Jlgtgutisu
¿? LENGUAGE SPANISCH Date: Tue, 1 Feb 2011 22:35:00 + From: cl...@fewbar.com To: jlguti...@hotmail.com Subject: [Bug 350936] Re: Should shut down domains on system shutdown Wow this one has been around a while. The simplest way to run a script before

RE: [Bug 350936] Re: Should shut down domains on system shutdown

2011-02-02 Thread Orticio Jlgtgutisu
¿? Lenguage spanisch ?? Date: Wed, 2 Feb 2011 00:22:03 + From: cl...@fewbar.com To: jlguti...@hotmail.com Subject: [Bug 350936] Re: Should shut down domains on system shutdown Oops, just noticed, that should be $UPSTART_STOP_EVENTS -- You received this bug

RE: [Bug 350936] Re: Should shut down domains on system shutdown

2011-02-02 Thread Orticio Jlgtgutisu
¿? LENGUAGE SPANISCH Date: Tue, 1 Feb 2011 22:35:00 + From: cl...@fewbar.com To: jlguti...@hotmail.com Subject: [Bug 350936] Re: Should shut down domains on system shutdown Wow this one has been around a while. The simplest way to run a script before

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-11-04 Thread Francesco Pretto
Don't think so. It's part of the independence of libvirt from the the actual virtualization technology (KVM, ...) to permit updates without shutdown of guests. 2010/11/4 Valentijn Sessink valent...@sessink.nl: Hmm. If libvirt shuts down the virtual machines it monitors, then these virtual

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-11-04 Thread John Morrissey
On Thu, Nov 04, 2010 at 11:43:10AM -, Valentijn Sessink wrote: The proposals in this report (mine, John Morrissey's) all have a pre- stop shutdown of virtual machines in their Upstart conf-file. When you update libvirt-bin, dpkg will stop libvirt-bin before upgrading. As a result — if

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-11-04 Thread Francesco Pretto
Don't think so. It's part of the independence of libvirt from the the actual virtualization technology (KVM, ...) to permit updates without shutdown of guests. 2010/11/4 Valentijn Sessink valent...@sessink.nl: Hmm. If libvirt shuts down the virtual machines it monitors, then these virtual

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-11-04 Thread John Morrissey
On Thu, Nov 04, 2010 at 11:43:10AM -, Valentijn Sessink wrote: The proposals in this report (mine, John Morrissey's) all have a pre- stop shutdown of virtual machines in their Upstart conf-file. When you update libvirt-bin, dpkg will stop libvirt-bin before upgrading. As a result — if

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-10-23 Thread John Morrissey
On Sat, Oct 02, 2010 at 02:54:47AM -, Nathan Crawford wrote: FWIW, you might want to mark /etc/default/libvirt-bin as a conffile in the libvirt packaging. I think it already is? (dpkg --status libvirt-bin says it is... but I've been changing things all over the place so I might have

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-10-23 Thread John Morrissey
On Sat, Oct 02, 2010 at 02:54:47AM -, Nathan Crawford wrote: FWIW, you might want to mark /etc/default/libvirt-bin as a conffile in the libvirt packaging. I think it already is? (dpkg --status libvirt-bin says it is... but I've been changing things all over the place so I might have

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-10-01 Thread John Morrissey
On Fri, Oct 01, 2010 at 03:47:07AM -, Nathan Crawford wrote: @John Morrissey - Nice work on getting this working! I hope you don't mind, I've taken the liberty of packaging all your changes and putting them in a PPA for easier testing. Thanks, and packaging the changes is no problem at

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-10-01 Thread John Morrissey
On Fri, Oct 01, 2010 at 03:47:07AM -, Nathan Crawford wrote: @John Morrissey - Nice work on getting this working! I hope you don't mind, I've taken the liberty of packaging all your changes and putting them in a PPA for easier testing. Thanks, and packaging the changes is no problem at

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-09-29 Thread Francesco Pretto
Clap! :) 2010/9/29 Andy a...@xillean.com: It is a dismal situation when at this point there is still no official simple way from Canonical to gracefully shutdown KVM VMs if the host has to go down for any reason such as a UPS issued shutdown command. -- Should shut down domains on system

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-09-29 Thread Francesco Pretto
Clap! :) 2010/9/29 Andy a...@xillean.com: It is a dismal situation when at this point there is still no official simple way from Canonical to gracefully shutdown KVM VMs if the host has to go down for any reason such as a UPS issued shutdown command. -- Should shut down domains on system

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-09-22 Thread John Morrissey
On Wed, Sep 22, 2010 at 09:47:47AM -, Valentijn Sessink wrote: - if the shutdown script searches for the word running (like mine does, - but John Morrissey's script is affected, too), it must set LANG=C at the - top, otherwise virsh will run in the local language. Good catch. I've updated

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-09-22 Thread John Morrissey
On Wed, Sep 22, 2010 at 09:47:47AM -, Valentijn Sessink wrote: - if the shutdown script searches for the word running (like mine does, - but John Morrissey's script is affected, too), it must set LANG=C at the - top, otherwise virsh will run in the local language. Good catch. I've updated

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-09-17 Thread Francesco Pretto
2010/9/17 John Morrissey j...@horde.net: The attached file updates libvirt-bin's upstart job to gracefully shut down VMs when the system shuts down. You can alter the shutdown timeout (SHUTDOWN_TIMEOUT, default: 300s) and list of virsh(1) URIs to use (URIS, default: qemu:///system) in

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-09-17 Thread Francesco Pretto
2010/9/17 John Morrissey j...@horde.net: The attached file updates libvirt-bin's upstart job to gracefully shut down VMs when the system shuts down. You can alter the shutdown timeout (SHUTDOWN_TIMEOUT, default: 300s) and list of virsh(1) URIs to use (URIS, default: qemu:///system) in

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-08-16 Thread Reinhard Tartler
Andy, I didn't try your suggestion (yet), but is it really necessary to create the kvmguests init script? Can't you just place the script inside the pre-stop script section of /etc/init/libvirt-bin.conf? Moreover, I've noticed that your kvmguests script uses upstart's 'start' command to ensure

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-08-16 Thread Reinhard Tartler
Andy, I didn't try your suggestion (yet), but is it really necessary to create the kvmguests init script? Can't you just place the script inside the pre-stop script section of /etc/init/libvirt-bin.conf? Moreover, I've noticed that your kvmguests script uses upstart's 'start' command to ensure

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-08-06 Thread Francesco Pretto
I have seen the commit that implements this functionality and it's, as usual, a sysvinit script. Unfortunately, I think this is a use case where upstart can't do anything yet and the only solution (without moving back to a sysvinit script) is doing an ugly workaround in /etc/init.d/sendsigs. I've

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-08-06 Thread Francesco Pretto
I have seen the commit that implements this functionality and it's, as usual, a sysvinit script. Unfortunately, I think this is a use case where upstart can't do anything yet and the only solution (without moving back to a sysvinit script) is doing an ugly workaround in /etc/init.d/sendsigs. I've

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-29 Thread Reinhard Tartler
instead of destroying vms, wouldn't be a more elegant solution to save the state of the VM in a statefile? On bootup, upstart would check for such statefiles and restore the VMs. This would work even for VMs that don't react to ACPI events properly and saves the VM's uptimes. -- Should shut

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-29 Thread Reinhard Tartler
instead of destroying vms, wouldn't be a more elegant solution to save the state of the VM in a statefile? On bootup, upstart would check for such statefiles and restore the VMs. This would work even for VMs that don't react to ACPI events properly and saves the VM's uptimes. -- Should shut

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-25 Thread Soren Hansen
Why are you not doing this in the pre-stop part of the libvirt-bin job, by the way? -- Should shut down domains on system shutdown https://bugs.launchpad.net/bugs/350936 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to libvirt in ubuntu.

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-25 Thread Soren Hansen
On Fri, Jun 25, 2010 at 10:32:07AM -, ossjunkie wrote: @soren: as i simple don't know how to trigger it only on shutdown, as the premise was it should run on regular stop. but i know it may ease the situation and would like to do so. do you know some solution here. maybe we could do a

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-25 Thread Soren Hansen
On Thu, Jun 24, 2010 at 08:04:48PM -, Francesco Pretto wrote: why does libvirt-bin still stop before the libvirt-shutdown-guests job has finished the script? Good question. Upstart shouldn't be killing it, but something else might. I can't imagine what, though. I'm not sure Upstart isn't

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-25 Thread Soren Hansen
Why are you not doing this in the pre-stop part of the libvirt-bin job, by the way? -- Should shut down domains on system shutdown https://bugs.launchpad.net/bugs/350936 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-25 Thread Soren Hansen
On Fri, Jun 25, 2010 at 10:32:07AM -, ossjunkie wrote: @soren: as i simple don't know how to trigger it only on shutdown, as the premise was it should run on regular stop. but i know it may ease the situation and would like to do so. do you know some solution here. maybe we could do a

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-24 Thread Soren Hansen
On Thu, Jun 24, 2010 at 01:38:04PM -, ossjunkie wrote: thanks for the hint, but after trying i found that start on (runlevel [06] and stopping libvirt-bin) should do the trick. but i still got problems as i can use libvirt at first in the upstart job, but when testing the timeout loop it

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-24 Thread Francesco Pretto
2010/6/24 Soren Hansen so...@ubuntu.com: why does libvirt-bin still stop before the libvirt-shutdown-guests job has finished the script? Good question. Upstart shouldn't be killing it, but something else might. I can't imagine what, though. I'm not sure Upstart isn't supposed to kill them.

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-24 Thread Soren Hansen
On Thu, Jun 24, 2010 at 01:38:04PM -, ossjunkie wrote: thanks for the hint, but after trying i found that start on (runlevel [06] and stopping libvirt-bin) should do the trick. but i still got problems as i can use libvirt at first in the upstart job, but when testing the timeout loop it

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-24 Thread Francesco Pretto
2010/6/24 ossjunkie ossjun...@gmail.com: why does libvirt-bin still stop before the libvirt-shutdown-guests job has finished the script? Because kvm guests processes aren't tracked by the upstart job and they are killed immediately by /etc/init.d/sendsings. This approach have pros

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-24 Thread Francesco Pretto
2010/6/24 Soren Hansen so...@ubuntu.com: why does libvirt-bin still stop before the libvirt-shutdown-guests job has finished the script? Good question. Upstart shouldn't be killing it, but something else might. I can't imagine what, though. I'm not sure Upstart isn't supposed to kill them.

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-23 Thread Soren Hansen
On Wed, Jun 23, 2010 at 03:53:18PM -, ossjunkie wrote: -how can we ensure in upstart that the script got run on shutdown reboots but always before libvirt-bin and qemu-kvm got stopped? I /think/ this should do the trick: start on shutdown and stopping libvirt-bin IIUIC, libvirt-bin will

Re: [Bug 350936] Re: Should shut down domains on system shutdown

2010-06-23 Thread Soren Hansen
On Wed, Jun 23, 2010 at 03:53:18PM -, ossjunkie wrote: -how can we ensure in upstart that the script got run on shutdown reboots but always before libvirt-bin and qemu-kvm got stopped? I /think/ this should do the trick: start on shutdown and stopping libvirt-bin IIUIC, libvirt-bin will