commit 4bf211c617814d46d590bb7b11806170f5c19484
Author: Lee Yarwood <email address hidden>
Date: Tue Jan 31 18:39:15 2017 +0000
libvirt: Remove redundant bdm serial mangling and saving during swap_volume
During an initial swap_volume call the serial of the original volume was
previously stashed in the connection_info of the new volume by the
compute layer. This was used by I19d5182d11 to allow the virt driver to
lookup and update the existing BDM with the new volume's connection_info
after it had been used by connect_volume.
Future calls to swap_volume in the compute layer would not
update the serial found in the old volume connection_info. This would
result in an invalid serial being copied into the new volume
connection_info and used to preform a lookup of a BDM that didn't exist.
To correct this we now explicitly set the serial of the new volume to
that of the new volume id. While the correct serial id should already be
present in the connection_info provided by most backend Cinder volume
drivers the act of updating this dict is required by our own functional
tests to invoke a failure case :
The serial is updated once more to match the volume id returned
by os-migrate-volume-completion prior to the BDM being updated in the
compute layer.
The BDM lookup and save from the virt layer is also removed as the
compute layer retains a reference to new_cinfo and will update the BDM
with this, including any modifications, at the end of swap_volume.
Finally, the associated Tempest admin test is also extended by the
following change to now attempt a second volume swap to verify these
changes :
I2a2c80a164b9f75d0e7e0503a24194bedfc0e66b
Closes-bug: #1661016
Change-Id: If74dd9d8e7191047b6f1cd7e35b6fc667f004f91
(cherry picked from commit 1bf7ac804808eb0d4a68847e466f5fa7d1dcd55e)
Reviewed: https:/ /review. openstack. org/431530 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4bf211c6178 14d46d590bb7b11 806170f5c19484
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit 4bf211c617814d4 6d590bb7b118061 70f5c19484
Author: Lee Yarwood <email address hidden>
Date: Tue Jan 31 18:39:15 2017 +0000
libvirt: Remove redundant bdm serial mangling and saving during swap_volume
During an initial swap_volume call the serial of the original volume was
previously stashed in the connection_info of the new volume by the
compute layer. This was used by I19d5182d11 to allow the virt driver to
lookup and update the existing BDM with the new volume's connection_info
after it had been used by connect_volume.
Future calls to swap_volume in the compute layer would not
update the serial found in the old volume connection_info. This would
result in an invalid serial being copied into the new volume
connection_info and used to preform a lookup of a BDM that didn't exist.
To correct this we now explicitly set the serial of the new volume to
that of the new volume id. While the correct serial id should already be
present in the connection_info provided by most backend Cinder volume
drivers the act of updating this dict is required by our own functional
tests to invoke a failure case :
https:/ /git.io/ vDmRE
The serial is updated once more to match the volume id returned volume- completion prior to the BDM being updated in the
by os-migrate-
compute layer.
The BDM lookup and save from the virt layer is also removed as the
compute layer retains a reference to new_cinfo and will update the BDM
with this, including any modifications, at the end of swap_volume.
Finally, the associated Tempest admin test is also extended by the
following change to now attempt a second volume swap to verify these
changes :
I2a2c80a164 b9f75d0e7e0503a 24194bedfc0e66b
Closes-bug: #1661016 47b6f1cd7e35b6f c667f004f91 d4a68847e466f5f a7d1dcd55e)
Change-Id: If74dd9d8e71910
(cherry picked from commit 1bf7ac804808eb0