From 3f781f32d0aaa6adf9ef6c54ab6114de92b64917 Mon Sep 17 00:00:00 2001 From: TaoBai Date: Tue, 20 Jan 2015 04:18:39 -0800 Subject: [PATCH] Failed to discovery when iscsi multipath and CHAP both enabled 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 | 3 ++- cinder/volume/drivers/ibm/storwize_svc/__init__.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cinder/tests/test_storwize_svc.py b/cinder/tests/test_storwize_svc.py index 9272d9427..60fa7a193 100644 --- a/cinder/tests/test_storwize_svc.py +++ b/cinder/tests/test_storwize_svc.py @@ -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'] diff --git a/cinder/volume/drivers/ibm/storwize_svc/__init__.py b/cinder/volume/drivers/ibm/storwize_svc/__init__.py index ca0cd3d8d..8ebb8d61f 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/__init__.py +++ b/cinder/volume/drivers/ibm/storwize_svc/__init__.py @@ -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) -- 2.45.2