Comment 9 for bug 1815153

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

Reviewed: https://review.openstack.org/643215
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=02d6146e4d8b5af2aae0d046a58598aa0102f53d
Submitter: Zuul
Branch: stable/rocky

commit 02d6146e4d8b5af2aae0d046a58598aa0102f53d
Author: Takashi Natsume <email address hidden>
Date: Tue Feb 12 11:46:57 2019 +0900

    Fix resetting non-persistent fields when saving obj

    The 'requested_destination', 'network_metadata', 'retry' fields
    in the RequestSpec object are reset when saving the object currently.

    When cold migrating a server, the API sets the requested_destination
    so conductor will pass that information to the scheduler
    to restrict the cold migration to that host.
    But the 'heal_reqspec_is_bfv' method called from the conductor
    makes an update to the RequestSpec which resets
    the requested_destination so the server could end up being cold migrated
    to some other host than the one that was requested by the API user.

    So make them not be reset when saving the object.

    Conflicts:
        nova/objects/request_spec.py
        nova/tests/unit/objects/test_request_spec.py

        Conflicts are due to not including the following changes in rocky.

        I53e5debcffd6de2b3a2ff838e7f5da33fa1a82b8
        Idaed39629095f86d24a54334c699a26c218c6593

    Change-Id: I2131558f0edfe603ee1e8d8bae66a3caf5182a58
    Closes-Bug: #1815153
    (cherry picked from commit 67d5970445818f2f245cf1b6d9d46c36fb220f04)