From 67187e5e813b223588a9fc44a6c37d8fb2482cbe Mon Sep 17 00:00:00 2001 From: Clinton Knight Date: Mon, 4 Jan 2016 14:05:40 -0500 Subject: [PATCH] NetApp FC drivers should not set 'rw' access mode The volume manager is responsible for setting the initiator access mode in initialize_connection based on volume metadata. The NetApp FC drivers currently hardcode the access mode to 'rw'. So the fix is to stop setting the access_mode value in the connection info that is returned from the NetApp drivers. Partial-Bug: 1526152 Change-Id: I587bba62ebfc067bb362ce95b324b4a74c0e02d0 --- cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py | 1 - .../tests/unit/volume/drivers/netapp/eseries/test_library.py | 1 - cinder/volume/drivers/netapp/dataontap/block_base.py | 3 --- cinder/volume/drivers/netapp/eseries/library.py | 3 --- 4 files changed, 8 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py index b110038d3..981f71c45 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py @@ -101,7 +101,6 @@ FC_FABRIC_MAP = {'fabricB': FC_TARGET_INFO = {'driver_volume_type': 'fibre_channel', 'data': {'target_lun': 1, 'initiator_target_map': FC_I_T_MAP, - 'access_mode': 'rw', 'target_wwn': FC_TARGET_WWPNS, 'target_discovered': True}} diff --git a/cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py b/cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py index 66d6663d8..b8bb6abce 100644 --- a/cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py +++ b/cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py @@ -828,7 +828,6 @@ class NetAppEseriesLibraryTestCase(test.TestCase): 'target_discovered': True, 'target_lun': 0, 'target_wwn': [eseries_fake.WWPN_2], - 'access_mode': 'rw', 'initiator_target_map': { eseries_fake.WWPN: [eseries_fake.WWPN_2] }, diff --git a/cinder/volume/drivers/netapp/dataontap/block_base.py b/cinder/volume/drivers/netapp/dataontap/block_base.py index 8db15678d..8532a4571 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_base.py +++ b/cinder/volume/drivers/netapp/dataontap/block_base.py @@ -786,7 +786,6 @@ class NetAppBlockStorageLibrary(object): 'target_discovered': True, 'target_lun': 1, 'target_wwn': '500a098280feeba5', - 'access_mode': 'rw', 'initiator_target_map': { '21000024ff406cc3': ['500a098280feeba5'], '21000024ff406cc2': ['500a098280feeba5'] @@ -803,7 +802,6 @@ class NetAppBlockStorageLibrary(object): 'target_lun': 1, 'target_wwn': ['500a098280feeba5', '500a098290feeba5', '500a098190feeba5', '500a098180feeba5'], - 'access_mode': 'rw', 'initiator_target_map': { '21000024ff406cc3': ['500a098280feeba5', '500a098290feeba5'], @@ -839,7 +837,6 @@ class NetAppBlockStorageLibrary(object): 'data': {'target_discovered': True, 'target_lun': int(lun_id), 'target_wwn': target_wwpns, - 'access_mode': 'rw', 'initiator_target_map': initiator_target_map}} return target_info diff --git a/cinder/volume/drivers/netapp/eseries/library.py b/cinder/volume/drivers/netapp/eseries/library.py index d4d15e0ef..c087abcad 100644 --- a/cinder/volume/drivers/netapp/eseries/library.py +++ b/cinder/volume/drivers/netapp/eseries/library.py @@ -692,7 +692,6 @@ class NetAppESeriesLibrary(object): 'target_discovered': True, 'target_lun': 1, 'target_wwn': '500a098280feeba5', - 'access_mode': 'rw', 'initiator_target_map': { '21000024ff406cc3': ['500a098280feeba5'], '21000024ff406cc2': ['500a098280feeba5'] @@ -709,7 +708,6 @@ class NetAppESeriesLibrary(object): 'target_lun': 1, 'target_wwn': ['500a098280feeba5', '500a098290feeba5', '500a098190feeba5', '500a098180feeba5'], - 'access_mode': 'rw', 'initiator_target_map': { '21000024ff406cc3': ['500a098280feeba5', '500a098290feeba5'], @@ -744,7 +742,6 @@ class NetAppESeriesLibrary(object): 'data': {'target_discovered': True, 'target_lun': int(lun_id), 'target_wwn': target_wwpns, - 'access_mode': 'rw', 'initiator_target_map': initiator_target_map}} return target_info -- 2.45.2