Comment 24 for bug 1763766

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

Reviewed: https://review.opendev.org/703116
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=643405b3a751f7547417e48e00db05d9fe8e99c4
Submitter: Zuul
Branch: stable/rocky

commit 643405b3a751f7547417e48e00db05d9fe8e99c4
Author: Sean Mooney <email address hidden>
Date: Thu Oct 10 18:00:07 2019 +0100

    Block rebuild when NUMA topology changed

    If the image change during a rebuild it's possible for the request
    NUMA topology to change. As a rebuild uses a noop claim in the
    resource tracker the NUMA topology will not be updated as part of
    a rebuild.

    If the NUMA constraints do not change, a rebuild will continue as normal.
    If the new constraints conflict with the existing NUMA constraints of the
    instance the rebuild will be rejected without altering the status of the
    instance.

    This change introduces an API check to block rebuild when the NUMA
    requirements for the new image do not match the existing NUMA constraints.
    This is in line with the previous check introduced to prevent the rebuild of
    volume-backed instances which similarly are not supported.

    This change adds functional tests to assert the expected behaviour of
    rebuilding NUMA instances with new images. This change also asserts that
    in place rebuilds of numa instances is currently not supported.

    Conflicts:
        nova/api/openstack/compute/servers.py
        nova/tests/functional/integrated_helpers.py
        nova/tests/functional/libvirt/test_numa_servers.py
        nova/tests/unit/compute/test_compute_api.py

    Modified:
        nova/tests/unit/api/openstack/compute/test_server_actions.py
        nova/tests/unit/compute/test_compute.py

    NOTE(sean-k-mooney): Due to the lack of changes
    I3b4c1153bebdeab2eb8bc2108aa177732f5c6a97 and
    I06fad233006c7bab14749a51ffa226c3801f951b,
    nova/api/openstack/compute/servers.py was modified to
    add exception handling for the 'ImageNUMATopologyRebuildConflict'
    on rebuild and 'nova/tests/functional/libvirt/test_numa_servers.py'
    was modified to mock the libvirt connection in the
    'NUMAServersRebuildTests.setUp' function.
    Due to a lack of I34ffaf285718059b55f90e812b57f1e11d566c6f
    'nova/tests/unit/api/openstack/compute/test_server_actions.py' and
    'nova/tests/unit/compute/test_compute.py' were updated to use valid
    image UUIDs.

    Closes-Bug: #1763766
    Partial-implements: blueprint inplace-rebuild-of-numa-instances
    Change-Id: I0322d872bdff68936033a6f5a54e8296a6fb3434
    (cherry picked from commit 6f5358ac1992b17b7f3f99d9a32290e0d4740dae)
    (cherry picked from commit 745de99063bf77704a7f0610fe9e3647257eaa50)
    (cherry picked from commit 9f57d16f38f0290718e3ba78393d064746f7e527)