On 2015/3/28 18:06, Rui Chen wrote:
Thank you for reply, Chris.
2015-03-27 23:15 GMT+08:00 Chris Friesen <chris.friesen(a)windriver.com
<mailto:chris.friesen@windriver.com>>:
On 03/26/2015 07:44 PM, Rui Chen wrote:
Yes, you are right, but we found our instance hang at first dom.shutdown() call,
if the dom.shutdown() don't return, there is no chance to execute
dom.destroy(),
right?
Correct. The code is written assuming dom.shutdown() cannot block indefinitely.
The libvirt docs at
"https://libvirt.org/html/__libvirt-libvirt-domain.html#__virDomainShutdown
<
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainShutdown>... say
"...this command returns as soon as the shutdown request is issued rather than
blocking until the guest is no longer running."
If dom.shutdown() blocks indefinitely, then that's a libvirt bug.
Chris
The API virDomainShutdown's description is out of date, it's not correct.
In fact, virDomainShutdown would block or not, depending on its mode. If it's in
mode *agent*, then it would be blocked until qemu founds that the guest actually got
down.
Otherwise, if it's in mode *acpi*, then it would return immediately.
Thus, maybe further more work need to be done in Openstack.
What's your opinions, Michal and Daniel (from
libvirt.org), and Chris (from
openstack.org) :)