commit f1ac5183d43459614ba5a356c2c7b50251fcd94f
Author: Matt Riedemann <email address hidden>
Date: Tue Mar 5 16:39:51 2019 -0500
Temporarily mutate migration object in finish_revert_resize
As the comment in the code suggests, when calling migrate_instance_finish
in finish_revert_resize we need to temporarily set the migration
object dest_compute to the source_compute since we are moving port
bindings from the dest back to the source. However, this is not
really a temporary change to the object if something fails after
this because the @errors_out_migration decorator will persist the
change which could be confusing later if trying to debug this migration
from the API and the dest_compute and source_compute have the same value.
This fixes the issue by using the temporary_mutation utility.
Also, the obj_to_primitive dance in here is removed since it is not
necessary as migrate_instance_finish handles a Migration object.
Reviewed: https:/ /review. openstack. org/648691 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f1ac5183d43 459614ba5a356c2 c7b50251fcd94f
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit f1ac5183d434596 14ba5a356c2c7b5 0251fcd94f
Author: Matt Riedemann <email address hidden>
Date: Tue Mar 5 16:39:51 2019 -0500
Temporarily mutate migration object in finish_ revert_ resize
As the comment in the code suggests, when calling migrate_ instance_ finish revert_ resize we need to temporarily set the migration out_migration decorator will persist the
in finish_
object dest_compute to the source_compute since we are moving port
bindings from the dest back to the source. However, this is not
really a temporary change to the object if something fails after
this because the @errors_
change which could be confusing later if trying to debug this migration
from the API and the dest_compute and source_compute have the same value.
This fixes the issue by using the temporary_mutation utility.
Also, the obj_to_primitive dance in here is removed since it is not instance_ finish handles a Migration object.
necessary as migrate_
Conflicts:
nova/ tests/unit/ compute/ test_compute_ mgr.py
NOTE(mriedem): The conflict is due to not having change 1fdc82fe3291fb7 e286e790f121e92 in Rocky.
I0851e2d54a
Change-Id: I312d61383345ea 0ac1ab0c277b4c4 68e6aa94656 96243623b67b132 2e9b891c8b) 29ec7025f29bd2e 3d482cd406)
Closes-Bug: #1818730
(cherry picked from commit 855b5546564f0ed
(cherry picked from commit bcb42a43a9f12d9