In talking with danpb about this today, our current theory is that due to the async nature of the virDomainDetachDeviceFlags call with libvirt and the fact that tempest isn't waiting for the partition to be gone from the guest before it starts taking snapshots of the volume and instance, that maybe the instance isn't 'clean' when it does the instance snapshot, so that when we boot the 2nd instance from the snapshot image things go wonky.
danpb said there is an VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event in libvirt >= 1.1.1 which could be used to monitor for when the device is actually detached.
(9:42:11 AM) danpb: mriedem: we'd have to wire up the libvirt event thread to handle vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, myDomainEventDeviceRemovedCallback, None)
(9:42:24 AM) danpb: currently we only monitor for libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE,
In talking with danpb about this today, our current theory is that due to the async nature of the virDomainDetach DeviceFlags call with libvirt and the fact that tempest isn't waiting for the partition to be gone from the guest before it starts taking snapshots of the volume and instance, that maybe the instance isn't 'clean' when it does the instance snapshot, so that when we boot the 2nd instance from the snapshot image things go wonky.
danpb said there is an VIR_DOMAIN_ EVENT_ID_ DEVICE_ REMOVED event in libvirt >= 1.1.1 which could be used to monitor for when the device is actually detached.
(9:42:11 AM) danpb: mriedem: we'd have to wire up the libvirt event thread to handle vc.domainEventR egisterAny( None, libvirt. VIR_DOMAIN_ EVENT_ID_ DEVICE_ REMOVED, myDomainEventDe viceRemovedCall back, None) VIR_DOMAIN_ EVENT_ID_ LIFECYCLE,
(9:42:24 AM) danpb: currently we only monitor for libvirt.