]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Enhance iSCSI multipath support
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Thu, 11 Dec 2014 23:23:18 +0000 (18:23 -0500)
committerTomoki Sekiyama <tomoki.sekiyama@hds.com>
Thu, 5 Feb 2015 23:26:23 +0000 (18:26 -0500)
commitca97a7461f0f56835a0f2dceb9afaebac756f7c3
tree13099647dbcf75ce9df6e4ef7a4f30acd43e561a
parent734f98f3091913c35ae3b5a2e0cc9378c442105d
Enhance iSCSI multipath support

Currently, nova-compute and brick support multipath for iSCSI volume
data path. It depends on response to targets discovery of the main
iSCSI portal, expecting multiple portal addresses to be contained.

However, some arrays only respond to discovery with a single portal
address, even if secondary portals are available. In this case,
the connector cannot know secondary portals and corresponding
iSCSI target IQN, so cannot establish multiple sessions for
the target(s). To enable the connector to login to secondary portals,
cinder should tell all the portal addresses and corresponding
target iqns/luns.

With this patch initialize_connection API will return connection_info
with multiple portal addresses/iqns/luns when multipath=True is
specified in the connector info. For example:

  {"driver_volume_type": "iscsi",
   "data": {"target_portals": ["10.0.2.15:3260", "10.0.3.15:3260"],
            "target_iqns": ["iqn.2010-10.org.example:target-01",
                            "iqn.2010-10.org.example:target-02"],
            "target_luns": [1, 2],
            ...}}

This also modify brick/iscsi/connector.py to make the parameter
recognized and to login to every target.

In addition, this adds an config option
'iscsi_secondary_ip_addresses' to specify a list of secondary
portal addresses for LVM iSCSI Driver.

Change-Id: I2a650c8ae70189b738937eaea7e5cd28f896257c
Implements: blueprint iscsi-multipath-enhancement
12 files changed:
cinder/brick/initiator/connector.py
cinder/tests/brick/test_brick_connector.py
cinder/tests/targets/test_tgt_driver.py
cinder/tests/test_coraid.py
cinder/tests/test_utils.py
cinder/tests/test_volume.py
cinder/utils.py
cinder/volume/driver.py
cinder/volume/targets/iscsi.py
cinder/volume/targets/lio.py
cinder/volume/targets/tgt.py
etc/cinder/rootwrap.d/volume.filters