From: Shay Halsband Date: Sun, 15 Nov 2015 10:31:00 +0000 (+0200) Subject: XtremIO fix attach readonly bug X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=487ca0aa6940ce1bafd67a66107e0da7aabb2749;p=openstack-build%2Fcinder-build.git XtremIO fix attach readonly bug * Remove the access_mode from connection_info and let the manager decide on the access mode. * add a test to make sure access_mode won't be added in the future liberty-backport-potential Change-Id: I1584b27ff0c14e54f1d1efb2310d25454995c50a Closes-Bug: 1516365 --- diff --git a/cinder/tests/unit/test_emc_xtremio.py b/cinder/tests/unit/test_emc_xtremio.py index f90a93c23..067652212 100644 --- a/cinder/tests/unit/test_emc_xtremio.py +++ b/cinder/tests/unit/test_emc_xtremio.py @@ -394,6 +394,7 @@ class EMCXIODriverISCSITestCase(test.TestCase): self.driver.create_volume(self.data.test_volume) map_data = self.driver.initialize_connection(self.data.test_volume, self.data.connector) + self.assertIsNone(map_data['data'].get('access_mode')) c1 = xms_data['clusters'][1] c1['chap-authentication-mode'] = 'initiator' c1['chap-discovery-mode'] = 'initiator' diff --git a/cinder/volume/drivers/emc/xtremio.py b/cinder/volume/drivers/emc/xtremio.py index 6578b05f2..6de8ca191 100644 --- a/cinder/volume/drivers/emc/xtremio.py +++ b/cinder/volume/drivers/emc/xtremio.py @@ -830,7 +830,6 @@ class XtremIOISCSIDriver(XtremIOVolumeDriver, driver.ISCSIDriver): 'target_iqn': portal['port-address'], 'target_lun': lunmap['lun'], 'target_portal': portal_addr, - 'access_mode': 'rw', 'target_iqns': [p['port-address'] for p in portals], 'target_portals': tg_portals, 'target_luns': [lunmap['lun']] * len(portals)} @@ -917,7 +916,6 @@ class XtremIOFibreChannelDriver(XtremIOVolumeDriver, 'target_discovered': False, 'target_lun': lun_num, 'target_wwn': self.get_targets(), - 'access_mode': 'rw', 'initiator_target_map': i_t_map}} @fczm_utils.RemoveFCZone