commit 8706dc3f4fe44622d459b020b1c5adef392faa0c
Author: Matt Riedemann <email address hidden>
Date: Tue Mar 20 15:04:27 2018 -0400
Preserve multiattach flag when refreshing connection_info
When we attach a multiattach-capable volume, we do something
dirty and stash a "multiattach" boolean flag in the
BlockDeviceMapping.connection_info dict. This is used by the
virt driver to determine how to connect the volume (for the
libvirt driver, it sets the "shareable" element on the disk
config xml).
When resizing an instance, ComputeManager._finish_resize on
the destination host refreshes the block device mapping list
along with the connection_info for each BDM. Because of this,
it would overwrite the BDM.connection_info along with the stashed
"multiattach" flag which is later used to connect the volumes
on the destination host via the virt driver.finish_migration
method. This leads to failures with multiattach volumes because
the disk config is wrong.
To fix this, when refreshing BDM connection_info, we preserve
the multiattach flag in the connection_info, similar to the
serial (volume ID) and multipath_id.
Interestingly enough, the nova-multiattach job does not fail
the volume multiattach resize test with libvirt 1.3.1 and qemu
2.5. This failure was only noticed once the nova-multiattach
job was tested with libvirt 4.0.0 and qemu 2.11.1. So maybe there
was something in the older package versions that masked this
obvious bug in the nova code.
Change-Id: Iaee13478212cc04e6d1a1249f33822369d94d41d
Closes-Bug: #1757190
(cherry picked from commit 5f3cca205581d45d92714ce1a909d4394b7812ff)
Reviewed: https:/ /review. openstack. org/555029 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8706dc3f4fe 44622d459b020b1 c5adef392faa0c
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 8706dc3f4fe4462 2d459b020b1c5ad ef392faa0c
Author: Matt Riedemann <email address hidden>
Date: Tue Mar 20 15:04:27 2018 -0400
Preserve multiattach flag when refreshing connection_info
When we attach a multiattach-capable volume, we do something Mapping. connection_ info dict. This is used by the
dirty and stash a "multiattach" boolean flag in the
BlockDevice
virt driver to determine how to connect the volume (for the
libvirt driver, it sets the "shareable" element on the disk
config xml).
When resizing an instance, ComputeManager. _finish_ resize on finish_ migration
the destination host refreshes the block device mapping list
along with the connection_info for each BDM. Because of this,
it would overwrite the BDM.connection_info along with the stashed
"multiattach" flag which is later used to connect the volumes
on the destination host via the virt driver.
method. This leads to failures with multiattach volumes because
the disk config is wrong.
To fix this, when refreshing BDM connection_info, we preserve
the multiattach flag in the connection_info, similar to the
serial (volume ID) and multipath_id.
Interestingly enough, the nova-multiattach job does not fail
the volume multiattach resize test with libvirt 1.3.1 and qemu
2.5. This failure was only noticed once the nova-multiattach
job was tested with libvirt 4.0.0 and qemu 2.11.1. So maybe there
was something in the older package versions that masked this
obvious bug in the nova code.
Change-Id: Iaee13478212cc0 4e6d1a1249f3382 2369d94d41d d92714ce1a909d4 394b7812ff)
Closes-Bug: #1757190
(cherry picked from commit 5f3cca205581d45