]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Failed to discovery when iscsi multipath and CHAP both enabled
authorTaoBai <baitaosh@cn.ibm.com>
Tue, 20 Jan 2015 12:18:39 +0000 (04:18 -0800)
committerTaoBai <baitaosh@cn.ibm.com>
Thu, 29 Jan 2015 10:44:05 +0000 (02:44 -0800)
Storage server may be configured to protect target discovering phase with CHAP
authentication, in this case existing discovery command will be failed in Nova
when iscsi multipath enabled. Nova need these below discovery auth properties.
    "discovery.sendtargets.auth.authmethod",
    "discovery.sendtargets.auth.username",
    "discovery.sendtargets.auth.password"

Cinder Storage driver need to send discovery auth properties to Nova in this
case and the properties are:
   iscsi_properties['discovery_auth_method']
   iscsi_properties['discovery_auth_username']
   iscsi_properties['discovery_auth_password']

This issue not just for IBM Storwize, but also other storage drivers who need
CHAP authentication to do iscsi discover.
The according nova change: https://review.openstack.org/#/c/148516/

Closes-Bug: #1367189

Change-Id: Ib528eed3a9fd5006c1649ef42233e1f943c38ab6

cinder/tests/test_storwize_svc.py
cinder/volume/drivers/ibm/storwize_svc/__init__.py

index 9272d9427718991a8f7468ff25df8a70c1f58056..60fa7a193682402cb9f899cfae385c845da8263b 100644 (file)
@@ -2087,7 +2087,8 @@ class StorwizeSVCDriverTestCase(test.TestCase):
                                        'iqn.1982-01.com.ibm:1234.sim.node1',
                                        'target_portal': '1.234.56.78:3260',
                                        'target_lun': 0,
-                                       'auth_method': 'CHAP'}}}
+                                       'auth_method': 'CHAP',
+                                       'discovery_auth_method': 'CHAP'}}}
 
         for protocol in ['FC', 'iSCSI']:
             volume1['volume_type_id'] = types[protocol]['id']
index ca0cd3d8dcefc0306f7691a3b3583c72d962fad1..8ebb8d61f6d10f09288c93a4f4076f1f8409ae44 100644 (file)
@@ -430,6 +430,10 @@ class StorwizeSVCDriver(san.SanDriver):
                     properties['auth_method'] = 'CHAP'
                     properties['auth_username'] = connector['initiator']
                     properties['auth_password'] = chap_secret
+                    properties['discovery_auth_method'] = 'CHAP'
+                    properties['discovery_auth_username'] = (
+                        connector['initiator'])
+                    properties['discovery_auth_password'] = chap_secret
             else:
                 type_str = 'fibre_channel'
                 conn_wwpns = self._helpers.get_conn_fc_wwpns(host_name)