]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: report useful error failling to destroy domain gracefully
authorGuannan Ren <gren@redhat.com>
Fri, 17 May 2013 14:22:46 +0000 (22:22 +0800)
committerGuannan Ren <gren@redhat.com>
Fri, 17 May 2013 14:22:46 +0000 (22:22 +0800)
commit6459af6a434e8b363c0b15d8bc0f9be535bd278f
treeb70fad50c4597f9973f9eeae87823346f7f62c3a
parent6aa4fc656d676dd5653f7db93a14aeba06bf54f1
qemu: report useful error failling to destroy domain gracefully

Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=927620

 #kill -STOP `pidof qemu-kvm`
 #virsh destroy $guest --graceful
 error: Failed to destroy domain testVM
 error: An error occurred, but the cause is unknown

With --graceful, SIGTERM always is emitted to kill driver
process, but it won't success till burning out waiting time
in case of process being stopped.
But domain destroy without --graceful can work, SIGKILL will
be emitted to the stopped process after 10 secs which always
kills a process even one that is currently stopped.
So report an error after burning out waiting time in this case.
src/qemu/qemu_process.c
src/util/virprocess.c