Add support for file I/O volume migration
This patch changes the generic volume migration logic to support
non-attachable volumes. Non-attachable refers to volume drivers that do
not support attachment via the typical iSCSI or similar protocols where
a block device is made available on the host machine. Device drivers
such as RBD make volumes available to cinder via a file handle that
proxies read() and write() calls to the Ceph cluster.
This patch improves the generic migration logic to determine whether a
migration operation can proceed with dd using block device paths or file
operations on handles returned from the os-brick connectors.
Changes to the RBD driver are included to correctly rename the target
volume during the completion phase of a successful migration.
It appears there is still some work to be done for attached in-use
volume migration for certain configurations. Successful tests were seen
for:
LVM to LVM (available and in-use)
LVM to/from NFS (available and in-use)
LVM to/from Ceph (available)
Ceph to LVM (in-use)
NFS to/from Ceph (available)
Ceph to NFS (in-use)
Failures were seen (due to Nova) for the following:
LVM to Ceph (in-use)
NFS to Ceph (in-use)
(Pulled from gate, cinder can no longer pass unit tests)
Blueprint: generic-volume-migration
Closes-Bug: #
1489335
Closes-Bug: #
1489337
Change-Id: Iece2776fa751152f97b389ddab426e50c6f79bea