You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compute: Update volume_id within connection_info during swap_volume
When Cinder orchestrates a volume migration between backends it
initially creates a temporary volume on the destination before calling
Nova to swap to that volume. When this is complete Nova calls back to
Cinder and the temporary volume on the destination is renamed to the
original volume UUID making the migration transparent to end users.
Previously Nova would not account for this within the connection_info
stahed when connecting the new volume and would continue to point to the
original UUID of the temporary volume. For most codepaths in Nova this
isn't an issue but when dealing with multiattach volumes the libvirt
driver has a specific path that uses this stored volume_id within the
connection_info when an attempt is made to detach the volume,
nova.virt.libvirt.LibvirtDriver._should_disconnect_target. In this case
this would lead to a failed lookup of the volume in Cinder and an
eventual 500 returned by Nova.
This change corrects this by ensuring any volume_id stashed in the
new connection_info we gather during a swap_volume is overwritten with
the correct id returned by the eventual call to Cinder's
os-migrate_volume_completion API [1].
[1] https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=complete-migration-of-a-volume-detail#volumes-volumes
Co-Authored-By: Lee Yarwood <[email protected]>
Closes-Bug: #1943431
Change-Id: I43612714b343d98320b19b5b38264afc700790e3
0 commit comments