]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: queue domain event earlier in shutdown handler
authorJim Fehlig <jfehlig@suse.com>
Wed, 19 Feb 2014 22:39:19 +0000 (15:39 -0700)
committerJim Fehlig <jfehlig@suse.com>
Tue, 25 Feb 2014 17:54:04 +0000 (10:54 -0700)
commit4d975deddda7668e4a7cfa465c720dea2975fdd3
tree0703dc83b5a2359cab060d16038383480cd62b1f
parent2122cf397965875d91b6e01b69dd157f4e79e737
libxl: queue domain event earlier in shutdown handler

The shutdown handler may restart a domain when handling a reboot
event or when <on_*> is set to 'restart'.  Restarting consists of
calling libxlVmCleanup followed by libxlVmStart.  libxlVmStart will
emit a VIR_DOMAIN_EVENT_STARTED event, but the SHUTDOWN event is
not emitted until exiting the shutdown handler, after the STARTED
event.

This patch changes the logic a bit to queue the event at the start
of the shutdown action, ensuring it is queued before any subsequent
events that may be generated while executing the shutdown action.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
src/libxl/libxl_driver.c