Comment 14 for bug 1788014

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/stein)

Reviewed: https://review.opendev.org/700774
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6310e693039cc3b6d2808915a3b4daf7bbffb9a8
Submitter: Zuul
Branch: stable/stein

commit 6310e693039cc3b6d2808915a3b4daf7bbffb9a8
Author: Matt Riedemann <email address hidden>
Date: Tue Aug 21 15:32:13 2018 -0400

    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 aa87b9c288d316b85079e681e0df24354ec1912c)
    (cherry picked from commit 27bfd0bc6233c25114504bb363402807752a7ece)