Use VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when rebasing
Previously, in swap_volume, the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag
was not passed to virDomainBlockRebase. In the case of iSCSI-backed
disks, this caused the XML to change from <source dev=/dev/iscsi/lun>
to <source file=/dev/iscsi/lun>. This was a problem because
/dev/iscsi/lun is not a regular file. This patch passes the
VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag to virDomainBlockRebase, causing
the correct <source dev=/dev/iscsi/lun> to be generated upon
volume-update.
NOTE(mriedem): The conflicts are due to
fbcf8d673342570a1518dbf8d88f289c2c39cd30 needing to translate
the exception message in driver.py and for passing instance
to disconnect_volume in test_driver, which was added in Pike with
b66b7d4f9d63e7f45ebfc033696d06c632a33ff1.
NOTE(artom): In stable/newton, the conflict in guest.py is due to a
different docstring for the rebase() method.
NOTE(artom): This backport squashes
5d5c5a5d92458d530115b3d3b8b381524b1a3a90 to guard againt older libvirt
versions that don't have the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag.
Change-Id: I868a0dae0baf8cded9c7c5807ea63ffc5eec0c5e
Closes-bug: 1691195
(cherry picked from commit a8a4a8ea7b8e6c85273ddb02d34d6af1740b183f)
(cherry picked from commit ef853e038d9a3e9bfe02287c7c01c80b7a022ed6)
Reviewed: https:/ /review. openstack. org/471356 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8b9aa3e0010 1b1258f9b3dedca 66aac81f655778
Committed: https:/
Submitter: Zuul
Branch: stable/newton
commit 8b9aa3e00101b12 58f9b3dedca66aa c81f655778
Author: Artom Lifshitz <email address hidden>
Date: Wed May 17 00:22:34 2017 +0000
Use VIR_DOMAIN_ BLOCK_REBASE_ COPY_DEV when rebasing
Previously, in swap_volume, the VIR_DOMAIN_ BLOCK_REBASE_ COPY_DEV flag ebase. In the case of iSCSI-backed iscsi/lun> . This was a problem because DOMAIN_ BLOCK_REBASE_ COPY_DEV flag to virDomainBlockR ebase, causing
was not passed to virDomainBlockR
disks, this caused the XML to change from <source dev=/dev/iscsi/lun>
to <source file=/dev/
/dev/iscsi/lun is not a regular file. This patch passes the
VIR_
the correct <source dev=/dev/iscsi/lun> to be generated upon
volume-update.
Conflicts:
nova/ tests/unit/ virt/libvirt/ test_driver. py
nova/ virt/libvirt/ driver. py
nova/ virt/libvirt/ guest.py
NOTE(mriedem): The conflicts are due to 2570a1518dbf8d8 8f289c2c39cd30 needing to translate 3e7f45ebfc03369 6d06c632a33ff1.
fbcf8d67334
the exception message in driver.py and for passing instance
to disconnect_volume in test_driver, which was added in Pike with
b66b7d4f9d6
NOTE(artom): In stable/newton, the conflict in guest.py is due to a
different docstring for the rebase() method.
NOTE(artom): This backport squashes 58d530115b3d3b8 b381524b1a3a90 to guard againt older libvirt BLOCK_REBASE_ COPY_DEV flag.
5d5c5a5d924
versions that don't have the VIR_DOMAIN_
Change-Id: I868a0dae0baf8c ded9c7c5807ea63 ffc5eec0c5e 5273ddb02d34d6a f1740b183f) bfe02287c7c01c8 0b7a022ed6)
Closes-bug: 1691195
(cherry picked from commit a8a4a8ea7b8e6c8
(cherry picked from commit ef853e038d9a3e9