[libvirt] [PATCH] qemu: Allow graceful domain destroy

Jiri Denemark jdenemar at redhat.com
Wed Aug 24 07:53:49 UTC 2011


On Tue, Aug 23, 2011 at 14:31:29 +0100, Daniel P. Berrange wrote:
> On Tue, Aug 23, 2011 at 02:36:02PM +0200, Michal Privoznik wrote:
> > On 22.08.2011 20:31, Daniel P. Berrange wrote:
> > > We need to make this more controllable by apps, by making it possible
> > > to send just the SIGTERM and not the SIGKILL. Then we can add a new
> > > flag to virDomainDestroy to request this SIGTERM only behaviour. If
> > > the guest does not actually die, the mgmt app can then just reinvoke
> > > virDomainDestroy without the flag, to get the full SIGTERM+SIGKILL
> > > behaviour we have today.
> > 
> > Sending signal to qemu process is just a part of domain destroying. What
> > about cleanup code (emitting event, audit log, removing transient
> > domain, ...)? Can I rely on monitor EOF handling code?  What should be
> > the return value for this case when only SIGTERM is sent?
> 
> QEMU will send an event on the monitor when it shuts down cleanly
> via 'SIGQUIT' - we already handle that.

Yes, but that will confuse libvirt and apps because we won't be able to
distinguish between normal shutdown and destroy with flushed caches. But
that should probably be solved in qemu by sending different events in this two
cases.

Jirka




More information about the libvir-list mailing list