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.
Reviewed: https:/ /review. openstack. org/643215 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=02d6146e4d8 b5af2aae0d046a5 8598aa0102f53d
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 02d6146e4d8b5af 2aae0d046a58598 aa0102f53d
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 is_bfv' method called from the conductor destination so the server could end up being cold migrated
so conductor will pass that information to the scheduler
to restrict the cold migration to that host.
But the 'heal_reqspec_
makes an update to the RequestSpec which resets
the requested_
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.
Change-Id: I2131558f0edfe6 03ee1e8d8bae66a 3caf5182a58 f245cf1b6d9d46c 36fb220f04)
Closes-Bug: #1815153
(cherry picked from commit 67d5970445818f2