Comment 8 for bug 1835926

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

Reviewed: https://review.opendev.org/696351
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9f9f8d330a50aec188e55ab8ae921db710e6cc83
Submitter: Zuul
Branch: stable/stein

commit 9f9f8d330a50aec188e55ab8ae921db710e6cc83
Author: Alexandre Arents <email address hidden>
Date: Tue Jul 9 16:13:01 2019 +0000

    Do not update root_device_name during guest config

    _get_guest_config() is currently updating instance.root_device_name
    and called in many ways like:

    _hard_reboot(), rescue(), spawn(), resume(), finish_migration(),
    finish_revert_migration()

    It is an issue because root_device_name is initally set during instance
    build and should remain the same after:

    manager.py: _do_build_and_run_instance()
                 ..
                   _default_block_device_names() <-here
                   ..
                   driver.spawn()

    This may lead to edge case, like in rescue where this value can be mistakenly
    updated to reflect disk bus property of rescue image (hw_disk_bus).
    Further more, a _get* method should not modify instance object.

    Note that test test_get_guest_config_bug_1118829 is removed because no more
    relevant with current code.

    Change-Id: I1787f9717618d0837208844e8065840d30341cf7
    Closes-Bug: #1835926
    (cherry picked from commit 5e0ed5e7fee3c4c887263a0e9fa847c2dcc5cf3b)
    (cherry picked from commit 5e858d0cbd672639318543201e251ed00324a9c2)