On Fri, Aug 08, 2014 at 10:54:53AM -0600, Jim Fehlig wrote: > Thomas Bechtold wrote: > > Hi, > > > > during debugging a problem[1] of Openstack Nova I recognized the following: > > > > Doing a reboot (from inside of the VM with "reboot" command) on a kvm VM > > doesn't send any lifecycle events (events debugged with [2]). > > Doing the same thing with a xen VM leads to 2 events: First a > > VIR_DOMAIN_EVENT_STOPPED and then a VIR_DOMAIN_EVENT_STARTED event. > > > > Yep. Same can be said for new libxl Xen driver too. > > > The problem here is that for the xen case it doesn't seem to be possible > > to recognize that a reboot is ongoing. > > Right. There is no VIR_DOMAIN_EVENT_REBOOTED event type. > > > For that reason the OpenStack > > Nova component just forces the domain to stop after receiving the > > VIR_DOMAIN_EVENT_STOPPED event. > > > > Yikes! > > > Is it expected that the 2 drivers send different events for the same > > action or a bug in qemu/xen/libvirt? > > > > You mentioned above that the qemu driver doesn't send *any* events when > a reboot occurs within the VM. Looking at the code seems to confirm > that. We could certainly change the Xen drivers to behave similarly, but > I'd like to hear opinions from other libvirt devs. Options for resolving > this include > > 1. Remove emitting the events from Xen drivers Possibily, though I'm not convinced this is actually possible. > 2. Add the events to qemu driver and fix nova > 3. Add VIR_DOMAIN_EVENT_REBOOTED, adapt drivers to use it, and fix nova FYI, not having VIR_DOMAIN_EVENT_REBOOTED was an explicit decision since it is not a lifecycle transition. We do have a separate event though VIR_DOMAIN_EVENT_ID_REBOOOT to report on the case where the machine is has a reset. I think we probably need to make Nova robust to current behaviour. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list