Comment 55 for bug 1628606

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/864055
Committed: https://opendev.org/openstack/nova/commit/ec31d4d22e4163a37f2a63f387b2614189d77ff9
Submitter: "Zuul (22348)"
Branch: stable/train

commit ec31d4d22e4163a37f2a63f387b2614189d77ff9
Author: Sean Mooney <email address hidden>
Date: Thu May 13 12:48:21 2021 +0100

    [compute] always set instance.host in post_livemigration

    This change add a new _post_live_migration_update_host
    function that wraps _post_live_migration and just ensures
    that if we exit due to an exception instance.host is set
    to the destination host.

    when we are in _post_live_migration the guest has already
    started running on the destination host and we cannot revert.
    Sometimes admins or users will hard reboot the instance expecting
    that to fix everything when the vm enters the error state after
    the failed migrations. Previously this would end up recreating the
    instance on the source node leading to possible data corruption if
    the instance used shared storage.

    NOTE(auniyal): Differences from ussuri to train
      * nova/tests/unit/compute/test_compute_mgr.py
      * Added instance.migration_context value to None, as fake_instance do not have this property in train

    Change-Id: Ibc4bc7edf1c8d1e841c72c9188a0a62836e9f153
    Partial-Bug: #1628606
    (cherry picked from commit 8449b7caefa4a5c0728e11380a088525f15ad6f5)
    (cherry picked from commit 643b0c7d35752b214eee19b8d7298a19a8493f6b)
    (cherry picked from commit 17ae907569e45cc0f5c7da9511bb668a877b7b2e)
    (cherry picked from commit 15502ddedc23e6591ace4e73fa8ce5b18b5644b0)
    (cherry picked from commit 43c0e40d288960760a6eaad05cb9670e01ef40d0)
    (cherry picked from commit 0ac64bba8b7aba2fb358e00e970e88b32d26ef7e)
    (cherry picked from commit 3885f983c358e5a5f0b10f603633193ac335a45f)