Comment 41 for bug 1953359

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/822050
Committed: https://opendev.org/openstack/nova/commit/1d0b7051da430ed00ae49901a32ec6af46c1a64e
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 1d0b7051da430ed00ae49901a32ec6af46c1a64e
Author: Balazs Gibizer <email address hidden>
Date: Mon Dec 6 17:06:51 2021 +0100

    [rt] Apply migration context for incoming migrations

    There is a race condition between an incoming resize and an
    update_available_resource periodic in the resource tracker. The race
    window starts when the resize_instance RPC finishes and ends when the
    finish_resize compute RPC finally applies the migration context on the
    instance.

    In the race window, if the update_available_resource periodic is run on
    the destination node, then it will see the instance as being tracked on
    this host as the instance.node is already pointing to the dest. But the
    instance.numa_topology still points to the source host topology as the
    migration context is not applied yet. This leads to CPU pinning error if
    the source topology does not fit to the dest topology. Also it stops the
    periodic task and leaves the tracker in an inconsistent state. The
    inconsistent state only cleanup up after the periodic is run outside of
    the race window.

    This patch applies the migration context temporarily to the specific
    instances during the periodic to keep resource accounting correct.

    Conflicts: on resource_tracker: changed
    'MigrationList.get_in_progress_and_error' call back to
    'MigrationList.get_in_progress_by_host_and_node', since this change was
    only added by 255b3f2f918843ca5dd9b99e109ecd2189b6b749, and is not
    present in stable/ussuri.

    Change-Id: Icaad155e22c9e2d86e464a0deb741c73f0dfb28a
    Closes-Bug: #1953359
    Closes-Bug: #1952915
    (cherry picked from commit 32c1044d86a8d02712c8e3abdf8b3e4cff234a9c)
    (cherry picked from commit 1235dc324ebc1c6ac6dc94da0f45ffffcc546d2c)
    (cherry picked from commit 5f2f283a75243d2e2629d3c5f7e5ef4b3994972d)
    (cherry picked from commit d54bd316b331d439a26a7318ca68cab5f6280ab2)