]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add support for file I/O volume migration
authorJon Bernard <jobernar@redhat.com>
Mon, 1 Jun 2015 18:09:30 +0000 (14:09 -0400)
committerSean Dague <sean@dague.net>
Mon, 31 Aug 2015 18:12:49 +0000 (18:12 +0000)
commitf586043fa969b9d1dcf4933aacbf615f53691093
tree211310f877f66066914dd23105904353558350d9
parent0a3f0232d1b9d184653b8dc1f9d93445d0405f42
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
cinder/tests/unit/test_rbd.py
cinder/tests/unit/test_volume.py
cinder/tests/unit/test_volume_rpcapi.py
cinder/tests/unit/test_volume_utils.py
cinder/volume/drivers/rbd.py
cinder/volume/manager.py
cinder/volume/rpcapi.py
cinder/volume/utils.py