]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
3PAR: Update replication to v2.1
authorAlex O'Rourke <alex.orourke@hpe.com>
Wed, 3 Feb 2016 16:11:58 +0000 (16:11 +0000)
committerAlex O'Rourke <alex.orourke@hpe.com>
Tue, 1 Mar 2016 23:43:34 +0000 (15:43 -0800)
commit2ebccef1824cf4cb81c02c4b1bc3f511c4dcdbd4
tree7804a00efb96c0420fcf7688781a081a1583e645
parent5be8ba1586440d274cf34111659802ed5adaf9df
3PAR: Update replication to v2.1

This patch updates replication to match the v2.1 spec. This makes it
so an entire backend can be replicated, and upon failover, all
replicated volumes will be failed over together.

Both sync and periodic replication modes are supported. Each
replication_device entry should have a replication_mode value set
to sync|periodic.

A volume type extra_spec value of replication:mode
should also be set. If replication:mode is periodic,
replication:sync_period should be set as well. Which replication_device
entry(s) are used is determined by the value of replication:mode set for
each volume type. NOTE: If no extra_specs are provided, periodic mode is
defaulted with a replication period of 900 seconds.

cinder.conf should have the replication config group:

[3parfcrep]
hpe3par_api_url = http://10.10.10.10:8008/api/v1
hpe3par_username = user
hpe3par_password = pass
hpe3par_debug = False
san_ip = 10.10.10.10
san_login = user
san_password = pass
volume_backend_name = 3parfcrep
hpe3par_cpg = REMOTE_COPY_CPG2
volume_driver = cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver
replication_device = backend_id:eos16,
                     replication_mode:periodic,
                     cpg_map:REMOTE_COPY_CPG2:REMOTE_COPY_DEST2,
                     hpe3par_api_url:http://11.11.11.11:8008/api/v1,
                     hpe3par_username:user,
                     hpe3par_password:pass,
                     san_ip:11.11.11.11,
                     san_login:user,
                     san_password:pass

If we are working with iSCSI, the replication device needs to
contain entries for the hpe3par_iscsi_ips as such:

[3pariscsirep]
hpe3par_api_url = https://10.10.10.10:8080/api/v1
hpe3par_username = user
hpe3par_password = pass
hpe3par_debug = False
hpe3par_iscsi_ips = 10.50.50.50,10.50.50.51
san_ip = 10.10.10.10
san_login = user
san_password = pass
volume_backend_name = 3pariscsirep
hpe3par_cpg = REMOTE_COPY_CPG2
iscsi_ip_address = 10.50.50.50
volume_driver = cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver
replication_device = backend_id:eos16,
                     replication_mode:periodic,
                     cpg_map:REMOTE_COPY_CPG2:REMOTE_COPY_DEST2,
                     hpe3par_api_url:https://11.11.11.11:8080/api/v1,
                     hpe3par_username:user,
                     hpe3par_password:pass,
                     san_ip:11.11.11.11,
                     san_login:user,
                     san_password:pass,
                     hpe3par_iscsi_ips:11.51.51.100

Closes-Bug: #1542078
Change-Id: Ia161b257278958c6a158d1239a77fc443c2985f0
cinder/tests/unit/test_hpe3par.py
cinder/volume/drivers/hpe/hpe_3par_common.py
cinder/volume/drivers/hpe/hpe_3par_fc.py
cinder/volume/drivers/hpe/hpe_3par_iscsi.py
releasenotes/notes/replication-v2.1-3par-b3f780a109f9195c.yaml [new file with mode: 0644]