[Libvir] [patch 8/9] Implement better signal handling

Mark McLoughlin markmc at redhat.com
Sat Feb 17 13:22:35 UTC 2007


On Fri, 2007-02-16 at 19:08 +0000, Daniel P. Berrange wrote:
> On Fri, Feb 16, 2007 at 02:44:46PM +0000, Mark McLoughlin wrote:
> > Handle SIGHUP by shutting down all guests and networks
> > and re-loading configs
> 
> This violates the 'principle of least surprise'. I certainly do not expect
> a config file reload to terminate all active guests. Since QEMU is a full
> virt system, there is no graceful shutdown process, and so this is equivalent
> to ripping the power cable out of all your VMs. IMHO this makes SIGHUP
> essentially useless.
> 
> We already have the ability to store a secondary config against any active
> guest VMs, which will be automatically activated upon next boot of the 
> guest - this is how we let virDefineDomain()  override the config of an
> existing VM.  IMHO, sending SIGHUP to the daemon should just scan for
> config files and if any VMs are active, load into the secondary config.

	All good points, fixed now with the attached patch.

> > Handle SIGTERM/SIGINT by cleanly shutting down
> 
> Ack, this is desirable. We should also hook in SIGQUIT

	Yep, done.

Cheers,
Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-dont-shutdown-domains-on-hup.patch
Type: text/x-patch
Size: 2969 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070217/5a243b7d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-qemu-handle-sigquit.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070217/5a243b7d/attachment-0003.bin>


More information about the libvir-list mailing list