]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Huawei: Implement v2 replication (managed)
authorchenzongliang <chenzongliang@huawei.com>
Sat, 12 Dec 2015 09:11:55 +0000 (17:11 +0800)
committerneochin <jiangliucheng@huawei.com>
Mon, 8 Feb 2016 10:53:17 +0000 (18:53 +0800)
commita51c2b8b07c188a0fb1d16ccda93e048f0415818
treee88bf6c1d317e39dec652d70a8b379f80a45c781
parentd5ccbf9c28fd8fa869db8e7e9847ed74d3c0b49d
Huawei: Implement v2 replication (managed)

This patch implements the managed side of v2 replication in the
HuaweiDriver. Both Synchronous mode and Asynchronous mode are
supported with Huawei arrays. The volume type need to associate with
the extra spec with 'replication_enabled' equaling to '<is> True', and
'replication_type' equaling to '<in> sync' or '<in> async'. If
'replication_type' is not provided, it will be defaulted to
Asynchronous mode.

What are supported with replication:
1. create volume
2. create volume from snapshot
3. clone a volume
4. create volume from image
5. volume retype
6. volume migration

So far we support a single remote device, and 'cinder.conf' should
configure a replication local backend and a replication remote backend
as follows:

[replica]
volume_driver =
    cinder.volume.drivers.huawei.huawei_driver.HuaweiISCSIDriver
cinder_huawei_conf_file = /etc/cinder/cinder_huawei_conf.xml
volume_backend_name = replica
replication_device = target_device_id:huawei-replica-1,
    managed_backend_name:host@replica-remote#pool,
    san_address:san_url_1;san_url_2,
    san_user:admin,san_password:passwd

[replica-remote]
volume_driver =
    cinder.volume.drivers.huawei.huawei_driver.HuaweiISCSIDriver
cinder_huawei_conf_file = /etc/cinder/cinder_huawei_conf_remote.xml
volume_backend_name = replica-remote
replication_device = target_device_id:huawei-replica-2,
    managed_backend_name:host@replica#pool,
    san_address:san_url_1;san_url_2,
    san_user:admin,san_password:passwd

Change-Id: Iaa3834547f80e7687f7e1946cb10d35f9ff0c136
Implements: blueprint support-replication-for-huawei-volume-driver
cinder/tests/unit/test_huawei_drivers.py
cinder/volume/drivers/huawei/constants.py
cinder/volume/drivers/huawei/huawei_conf.py
cinder/volume/drivers/huawei/huawei_driver.py
cinder/volume/drivers/huawei/replication.py [new file with mode: 0644]
cinder/volume/drivers/huawei/rest_client.py
releasenotes/notes/support-replication-for-huawei-volume-driver-ad61e9f5eba9c422.yaml [new file with mode: 0644]