]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Huawei: Implement v2.1 replication
authorneochin <jiangliucheng@huawei.com>
Sat, 12 Mar 2016 18:11:46 +0000 (02:11 +0800)
committerneochin <jiangliucheng@huawei.com>
Mon, 14 Mar 2016 14:49:57 +0000 (22:49 +0800)
commiteb3fcbb9bc32f7589ea5b974ae084f30b7ac9822
tree75bec0aeb2b86b4b2baf02b6130626595a557f1d
parent7d6da7cda9e250faed7b682ea4e6bc92d8b9e892
Huawei: Implement v2.1 replication

This patch implements the v2.1 replication in the HuaweiDriver.
All function in replication v2 are removed. A new function,
failover_host, is added to support failover between backends.

When error occurred on primary backend, you can failover to
the secondary backend. But it's strongly recommended to recover
the primary backend.

After failover backend, the operations on the secondary backend
are limited. A simple example, if you create a new volume on
secondary, after failback, it can't be used. So, You should not
do that, such as create, delete, extend volumes, etc.

But you can detach volume if it's in in-use status, then do
attach to vm to make replication volumes R&W.

The configuration for v2.1 is almost the same as v2. Except that,
only one backend configuration is needed. A simple example as
follows:

[replica]
volume_driver =
    cinder.volume.drivers.huawei.huawei_driver.HuaweiISCSIDriver
    cinder_huawei_conf_file = /etc/cinder/cinder_huawei_conf.xml
    replication_device = backend_id:huawei-replica-1,
        storage_pool:pool_1,
        san_address:san_url_1;san_url_2,
        iscsi_default_target_ip:192.168.1.100,
        san_user:admin,san_password:passwd

Change-Id: Ib555707e9751f78ce00c9dcdbbe370a18ed0ae6c
Closes-Bug: #1556450
cinder/tests/unit/test_huawei_drivers.py
cinder/volume/drivers/huawei/huawei_conf.py
cinder/volume/drivers/huawei/huawei_driver.py
cinder/volume/drivers/huawei/replication.py
cinder/volume/drivers/huawei/rest_client.py
releasenotes/notes/Huawei-volume-driver-replication-v2.1-ada5bc3ad62dc633.yaml [new file with mode: 0644]