Comment 16 for bug 1732947

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (stable/newton)

Reviewed: https://review.openstack.org/526542
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5ec5886fe74514c65908ff3adc2ca46610b595ad
Submitter: Zuul
Branch: stable/newton

commit 5ec5886fe74514c65908ff3adc2ca46610b595ad
Author: Matt Riedemann <email address hidden>
Date: Fri Nov 17 16:53:39 2017 -0500

    Add regression test for rebuilding a volume-backed server

    Commit 984dd8ad6add4523d93c7ce5a666a32233e02e34 makes rebuild
    check to see if the user is rebuilding an instance with a new
    image and if so, to run the scheduler filters again since the
    new image might not work with the current host for the instance,
    and we rebuild to the same host that the instance is already
    running on.

    The problem is the instance.image_ref attribute is not set for
    a volume-backed (boot-from-volume) instance, so the conditional
    in the rebuild() method is always True, which means we always run
    through the scheduler for volume-backed instances during rebuild,
    even if the image in the root disk isn't changing.

    This adds a functional regression test to recreate the bug.

    Conflicts:
          nova/tests/fixtures.py

    NOTE(mriedem): The fixture conflict is due to not having the
    CinderFixture in Newton. That was added in Ocata via commit
    47fb8b757994688a995ec3bdfa5dccc72f870f34. It's added here in
    it's entirety since that is simpler than trying to basically
    re-write it from scratch in a backport.

    NOTE(mriedem): The functional test is slightly modified to
    not rely on Placement and because of old config option names.

    Change-Id: If79c554b46c44a7f70f8367426e7da362d7234c8
    Related-Bug: #1732947
    (cherry picked from commit a4eebd5de7ef4b63082536718ba7b993a66d47e7)
    (cherry picked from commit c7991653a4e7cbb86656e6ba7579a86236801567)
    (cherry picked from commit fe5e3e7e61d879f7a28eb177e4bdbc7ead3ae4ac)