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/636271 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=67d59704458 18f2f245cf1b6d9 d46c36fb220f04
Committed: https:/
Submitter: Zuul
Branch: master
commit 67d5970445818f2 f245cf1b6d9d46c 36fb220f04
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.
Change-Id: I2131558f0edfe6 03ee1e8d8bae66a 3caf5182a58
Closes-Bug: #1815153