nova/nova/virt/libvirt
Matt Riedemann 6310e69303 libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event
Change Ic5cab99944df9e501ba2032eb96911c36304494d added handling for
the VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event during live migration
but failed to distinguish between the live migration actually succeeding
or failing before queueing the EVENT_LIFECYCLE_MIGRATION_COMPLETED
up into the ComputeManager.handle_lifecycle_event method.

As a result, failed live migrations will inadvertantly trigger
activation of the port bindings on the destination host, which
deactivates the source host port bindings, and then
_rollback_live_migration will delete those activated dest host port
bindings and leave the source host port bindings deactivated.

In this change, if we get the VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED
event, we attempt to get the job status to determine the course to
take and only queue the EVENT_LIFECYCLE_MIGRATION_COMPLETED event,
which triggers the dest host port activation, if we can determine
the live migration job completed successfully. Otherwise we simply
report the guest as paused, the same as before Ic5cab9994.

Conflicts:
      nova/virt/libvirt/host.py

NOTE(mriedem): The conflict on the imports is due to not having
change I4aeac9b2397bb2f5e130d1e58829a5e549fcb191 in Stein.

Change-Id: I6a4252b0c12c41c233299f30ce8294fef21c7b40
Closes-Bug: #1788014
(cherry picked from commit aa87b9c288)
(cherry picked from commit 27bfd0bc62)
2019-12-30 09:34:49 -05:00
..
storage Fix python3 compatibility of rbd get_fsid 2019-06-18 12:33:08 +01:00
volume Fixes multi-registry config in Quobyte driver 2019-05-24 16:03:52 +02:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
blockinfo.py libvirt: Use SATA bus for cdrom devices when using Q35 machine type 2019-06-13 15:56:58 +00:00
compat.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
config.py Parse <emulator> elements from virConnectGetCapabilities() 2019-03-05 10:07:21 +00:00
designer.py add mtu to libvirt xml for ethernet and bridge types 2018-06-06 09:39:40 -04:00
driver.py Do not update root_device_name during guest config 2019-12-06 20:27:12 +00:00
firewall.py Add missing ws seperator between words 2018-11-26 23:42:18 +00:00
guest.py Avoid logging traceback when detach device not found 2019-07-25 22:15:50 +00:00
host.py libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event 2019-12-30 09:34:49 -05:00
imagebackend.py libvirt: flatten rbd images when unshelving an instance 2019-06-28 10:07:34 +01:00
imagecache.py Move the dac_admin privsep code to a new location. 2017-09-18 23:14:11 +10:00
instancejobtracker.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
migration.py libvirt: check job status for VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED event 2019-12-30 09:34:49 -05:00
utils.py libvirt: Use SATA bus for cdrom devices when using Q35 machine type 2019-06-13 15:56:58 +00:00
vif.py Ignore hw_vif_type for direct, direct-physical vNIC types 2019-07-02 14:10:53 +00:00