]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
XtremIO fix attach readonly bug
authorShay Halsband <shay.halsband@emc.com>
Sun, 15 Nov 2015 10:31:00 +0000 (12:31 +0200)
committerShay Halsband <shay.halsband@emc.com>
Tue, 24 Nov 2015 08:00:02 +0000 (10:00 +0200)
* 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

cinder/tests/unit/test_emc_xtremio.py
cinder/volume/drivers/emc/xtremio.py

index f90a93c235f16ee6f1f16429be4182dc49764c23..0676522129cfc65d0608748f53915623091e0b2f 100644 (file)
@@ -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'
index 6578b05f21767f9929c338a7066c3623afb85ebf..6de8ca191fb0003bdc32a5d2ad5e69c8d1658f28 100644 (file)
@@ -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