From e499ab995de9c6dca353a115c6c68bd04594cdd9 Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Thu, 2 Feb 2017 19:04:36 +0000 Subject: [PATCH] Disable multiattach for all drivers This patch disables setting multiattach flag to True in driver capabilities. Since we reworked the driver attach/detach API, we need to ensure that the issue of detaching a shared volume works properly on the Nova side. A shared flag might need to be required to return in initialize_connection to support multiattach, so for now we will disable the capability. Change-Id: I4f8229a4465d009e06de86da255f442020151113 --- cinder/tests/unit/volume/drivers/dell_emc/test_ps.py | 2 +- .../unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_fc.py | 2 +- .../unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_iscsi.py | 2 +- cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py | 2 +- cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py | 2 +- .../unit/volume/drivers/netapp/dataontap/test_block_7mode.py | 2 +- .../unit/volume/drivers/netapp/dataontap/test_block_cmode.py | 2 +- .../unit/volume/drivers/netapp/dataontap/test_nfs_7mode.py | 2 +- .../unit/volume/drivers/netapp/dataontap/test_nfs_cmode.py | 2 +- cinder/tests/unit/volume/drivers/test_pure.py | 2 +- cinder/volume/drivers/dell_emc/ps.py | 2 +- cinder/volume/drivers/dell_emc/xtremio.py | 2 +- cinder/volume/drivers/fujitsu/eternus_dx_common.py | 2 +- cinder/volume/drivers/hitachi/vsp_common.py | 2 +- cinder/volume/drivers/hpe/hpe_3par_common.py | 2 +- cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py | 2 +- cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py | 2 +- cinder/volume/drivers/lvm.py | 2 +- cinder/volume/drivers/netapp/dataontap/block_7mode.py | 2 +- cinder/volume/drivers/netapp/dataontap/block_cmode.py | 2 +- cinder/volume/drivers/netapp/dataontap/nfs_7mode.py | 2 +- cinder/volume/drivers/netapp/dataontap/nfs_cmode.py | 2 +- cinder/volume/drivers/pure.py | 2 +- cinder/volume/drivers/reduxio/rdx_iscsi_driver.py | 2 +- cinder/volume/drivers/zte/zte_ks.py | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/dell_emc/test_ps.py b/cinder/tests/unit/volume/drivers/dell_emc/test_ps.py index fea5d28e76a..4360643790f 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/test_ps.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/test_ps.py @@ -419,7 +419,7 @@ class PSSeriesISCSIDriverTestCase(test.TestCase): self.assertEqual(not thin_enabled, stats['thick_provisioning_support']) self.assertEqual('Dell EMC', stats['vendor_name']) - self.assertTrue(stats['multiattach']) + self.assertFalse(stats['multiattach']) def test_get_space_in_gb(self): self.assertEqual(123.0, self.driver._get_space_in_gb('123.0GB')) diff --git a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_fc.py b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_fc.py index f7dd16c75c5..7d87cb879a1 100644 --- a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_fc.py +++ b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_fc.py @@ -1185,7 +1185,7 @@ class VSPHORCMFCDriverTest(test.TestCase): """Normal case: Refreshing data required.""" stats = self.driver.get_volume_stats(True) self.assertEqual('Hitachi', stats['vendor_name']) - self.assertTrue(stats['multiattach']) + self.assertFalse(stats['multiattach']) @mock.patch.object(vsp_utils, 'execute', side_effect=_execute) def test_get_volume_stats_no_refresh(self, execute): diff --git a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_iscsi.py b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_iscsi.py index d99ac2a3047..eb448c5abd1 100644 --- a/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_iscsi.py +++ b/cinder/tests/unit/volume/drivers/hitachi/test_hitachi_vsp_horcm_iscsi.py @@ -1256,7 +1256,7 @@ class VSPHORCMISCSIDriverTest(test.TestCase): """Normal case: Refreshing data required.""" stats = self.driver.get_volume_stats(True) self.assertEqual('Hitachi', stats['vendor_name']) - self.assertTrue(stats['multiattach']) + self.assertFalse(stats['multiattach']) @mock.patch.object(vsp_utils, 'execute', side_effect=_execute) def test_get_volume_stats_no_refresh(self, execute): diff --git a/cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py b/cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py index 14bec46e0a2..f4fcabd4ff4 100644 --- a/cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py +++ b/cinder/tests/unit/volume/drivers/ibm/test_ds8k_proxy.py @@ -1194,7 +1194,7 @@ class DS8KProxyTest(test.TestCase): "reserved_percentage": 0, "consistencygroup_support": True, "consistent_group_snapshot_enabled": True, - "multiattach": True + "multiattach": False } self.driver._update_stats() diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py index ac05b6c65c6..3b9be0336fe 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py @@ -375,7 +375,7 @@ FAKE_7MODE_POOLS = [ 'total_capacity_gb': 0.0, 'free_capacity_gb': 0.0, 'max_over_subscription_ratio': 20.0, - 'multiattach': True, + 'multiattach': False, 'thin_provisioning_support': False, 'thick_provisioning_support': True, 'provisioned_capacity_gb': 0.0, diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py index d781a19fc3e..c1a1f93114a 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py @@ -580,7 +580,7 @@ class NetAppBlockStorage7modeLibraryTestCase(test.TestCase): 'total_capacity_gb': 1342.21, 'reserved_percentage': 5, 'max_over_subscription_ratio': 10.0, - 'multiattach': True, + 'multiattach': False, 'utilization': 30.0, 'filter_function': 'filter', 'goodness_function': 'goodness', diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py index 80b5fc6f059..23b17d4ea53 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py @@ -403,7 +403,7 @@ class NetAppBlockStorageCmodeLibraryTestCase(test.TestCase): 'consistencygroup_support': True, 'reserved_percentage': 5, 'max_over_subscription_ratio': 10.0, - 'multiattach': True, + 'multiattach': False, 'total_capacity_gb': 10.0, 'free_capacity_gb': 2.0, 'provisioned_capacity_gb': 8.0, diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_7mode.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_7mode.py index 378878a9430..ab8d9844984 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_7mode.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_7mode.py @@ -125,7 +125,7 @@ class NetApp7modeNfsDriverTestCase(test.TestCase): 'total_capacity_gb': 4468.0, 'reserved_percentage': 7, 'max_over_subscription_ratio': 19.0, - 'multiattach': True, + 'multiattach': False, 'provisioned_capacity_gb': 4456.0, 'utilization': 30.0, 'filter_function': 'filter', diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_cmode.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_cmode.py index e5552d729de..fc36e9e77c0 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_cmode.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_cmode.py @@ -212,7 +212,7 @@ class NetAppCmodeNfsDriverTestCase(test.TestCase): 'QoS_support': True, 'reserved_percentage': fake.RESERVED_PERCENTAGE, 'max_over_subscription_ratio': fake.MAX_OVER_SUBSCRIPTION_RATIO, - 'multiattach': True, + 'multiattach': False, 'total_capacity_gb': total_capacity_gb, 'free_capacity_gb': free_capacity_gb, 'provisioned_capacity_gb': provisioned_capacity_gb, diff --git a/cinder/tests/unit/volume/drivers/test_pure.py b/cinder/tests/unit/volume/drivers/test_pure.py index 556d8230102..4ad0e726ce1 100644 --- a/cinder/tests/unit/volume/drivers/test_pure.py +++ b/cinder/tests/unit/volume/drivers/test_pure.py @@ -2698,7 +2698,7 @@ class PureVolumeUpdateStatsTestCase(PureBaseSharedDriverTestCase): 'storage_protocol': None, 'consistencygroup_support': True, 'thin_provisioning_support': True, - 'multiattach': True, + 'multiattach': False, 'QoS_support': False, 'total_capacity_gb': TOTAL_CAPACITY, 'free_capacity_gb': TOTAL_CAPACITY - USED_SPACE, diff --git a/cinder/volume/drivers/dell_emc/ps.py b/cinder/volume/drivers/dell_emc/ps.py index 5c3a841c429..d597f834eea 100644 --- a/cinder/volume/drivers/dell_emc/ps.py +++ b/cinder/volume/drivers/dell_emc/ps.py @@ -299,7 +299,7 @@ class PSSeriesISCSIDriver(san.SanISCSIDriver): data['total_capacity_gb'] = 0 data['free_capacity_gb'] = 0 - data['multiattach'] = True + data['multiattach'] = False provisioned_capacity = 0 diff --git a/cinder/volume/drivers/dell_emc/xtremio.py b/cinder/volume/drivers/dell_emc/xtremio.py index 2f870dcfc35..6eb8bd51746 100644 --- a/cinder/volume/drivers/dell_emc/xtremio.py +++ b/cinder/volume/drivers/dell_emc/xtremio.py @@ -523,7 +523,7 @@ class XtremIOVolumeDriver(san.SanDriver): 'reserved_percentage': self.configuration.reserved_percentage, 'QoS_support': False, - 'multiattach': True, + 'multiattach': False, } self._stats.update(self.client.get_extra_capabilities()) diff --git a/cinder/volume/drivers/fujitsu/eternus_dx_common.py b/cinder/volume/drivers/fujitsu/eternus_dx_common.py index 061f05ca5a8..c0283a19377 100644 --- a/cinder/volume/drivers/fujitsu/eternus_dx_common.py +++ b/cinder/volume/drivers/fujitsu/eternus_dx_common.py @@ -903,7 +903,7 @@ class FJDXCommon(object): self.stats['total_capacity_gb'] = 0 self.stats['free_capacity_gb'] = 0 - self.stats['multiattach'] = True + self.stats['multiattach'] = False LOG.debug('update_volume_stats, ' 'eternus_pool:%(eternus_pool)s, ' diff --git a/cinder/volume/drivers/hitachi/vsp_common.py b/cinder/volume/drivers/hitachi/vsp_common.py index 234b4611065..12c435ddcc1 100644 --- a/cinder/volume/drivers/hitachi/vsp_common.py +++ b/cinder/volume/drivers/hitachi/vsp_common.py @@ -519,7 +519,7 @@ class VSPCommon(object): data['free_capacity_gb'] = free_gb data['reserved_percentage'] = self.conf.safe_get('reserved_percentage') data['QoS_support'] = False - data['multiattach'] = True + data['multiattach'] = False LOG.debug("Updating volume status. (%s)", data) self._stats = data diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index a421e0645e5..8a374f66af9 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -1343,7 +1343,7 @@ class HPE3PARCommon(object): AVG_BUSY_PERC: stat_capabilities[AVG_BUSY_PERC], 'filter_function': filter_function, 'goodness_function': goodness_function, - 'multiattach': True, + 'multiattach': False, 'consistencygroup_support': True, } diff --git a/cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py b/cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py index 5d35e5212ef..a496c53996f 100644 --- a/cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py +++ b/cinder/volume/drivers/ibm/ibm_storage/ds8k_proxy.py @@ -386,7 +386,7 @@ class DS8KProxy(proxy.IBMStorageProxy): "reserved_percentage": self.configuration.reserved_percentage, "consistencygroup_support": True, "consistent_group_snapshot_enabled": True, - "multiattach": True + "multiattach": False } if self._replication_enabled: diff --git a/cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py b/cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py index a3e717196de..bd76d1e8980 100644 --- a/cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py +++ b/cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py @@ -1460,7 +1460,7 @@ class XIVProxy(proxy.IBMStorageProxy): self.meta['stat']["vendor_name"] = 'IBM' self.meta['stat']["driver_version"] = self.full_version self.meta['stat']["storage_protocol"] = connection_type - self.meta['stat']['multiattach'] = True # XIV xupports multiattach + self.meta['stat']['multiattach'] = False self.meta['stat']['QoS_support'] = ( self._check_storage_version_for_qos_support()) diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 1fdf76b1f03..2271468db58 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -272,7 +272,7 @@ class LVMVolumeDriver(driver.VolumeDriver): total_volumes=total_volumes, filter_function=self.get_filter_function(), goodness_function=self.get_goodness_function(), - multiattach=True + multiattach=False )) data["pools"].append(single_pool) diff --git a/cinder/volume/drivers/netapp/dataontap/block_7mode.py b/cinder/volume/drivers/netapp/dataontap/block_7mode.py index c6891579910..d73206bd378 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/block_7mode.py @@ -324,7 +324,7 @@ class NetAppBlockStorage7modeLibrary(block_base.NetAppBlockStorageLibrary): pool = dict() pool['pool_name'] = volume_name pool['QoS_support'] = False - pool['multiattach'] = True + pool['multiattach'] = False pool['reserved_percentage'] = ( self.reserved_percentage) pool['max_over_subscription_ratio'] = ( diff --git a/cinder/volume/drivers/netapp/dataontap/block_cmode.py b/cinder/volume/drivers/netapp/dataontap/block_cmode.py index 15639b1093a..731e02ec0e6 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/block_cmode.py @@ -291,7 +291,7 @@ class NetAppBlockStorageCmodeLibrary(block_base.NetAppBlockStorageLibrary, # Add driver capabilities and config info pool['QoS_support'] = True - pool['multiattach'] = True + pool['multiattach'] = False pool['consistencygroup_support'] = True pool['reserved_percentage'] = self.reserved_percentage pool['max_over_subscription_ratio'] = ( diff --git a/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py b/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py index 478879c4a98..878b4d5d1f6 100644 --- a/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py @@ -156,7 +156,7 @@ class NetApp7modeNfsDriver(nfs_base.NetAppNfsDriver): pool = dict() pool['pool_name'] = nfs_share pool['QoS_support'] = False - pool['multiattach'] = True + pool['multiattach'] = False pool.update(capacity) thick = not self.configuration.nfs_sparsed_volumes diff --git a/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py b/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py index 32d07b8501b..10ef1cdb4cd 100644 --- a/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py @@ -269,7 +269,7 @@ class NetAppCmodeNfsDriver(nfs_base.NetAppNfsDriver, # Add driver capabilities and config info pool['QoS_support'] = True pool['consistencygroup_support'] = True - pool['multiattach'] = True + pool['multiattach'] = False # Add up-to-date capacity info nfs_share = ssc_vol_info['pool_name'] diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 717754b07f3..505da982a27 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -542,7 +542,7 @@ class PureBaseVolumeDriver(san.SanDriver): # Add flags for supported features data['consistencygroup_support'] = True data['thin_provisioning_support'] = True - data['multiattach'] = True + data['multiattach'] = False data['QoS_support'] = False # Add capacity info for scheduler diff --git a/cinder/volume/drivers/reduxio/rdx_iscsi_driver.py b/cinder/volume/drivers/reduxio/rdx_iscsi_driver.py index 5ceab736291..9b3f7979546 100644 --- a/cinder/volume/drivers/reduxio/rdx_iscsi_driver.py +++ b/cinder/volume/drivers/reduxio/rdx_iscsi_driver.py @@ -361,7 +361,7 @@ class ReduxioISCSIDriver(san.SanISCSIDriver): "reserved_percentage": self.configuration.reserved_percentage, "QoS_support": False, - 'multiattach': True + 'multiattach': False }]} return self._stats diff --git a/cinder/volume/drivers/zte/zte_ks.py b/cinder/volume/drivers/zte/zte_ks.py index 27fb2a7e357..2ba839e8670 100644 --- a/cinder/volume/drivers/zte/zte_ks.py +++ b/cinder/volume/drivers/zte/zte_ks.py @@ -663,7 +663,7 @@ class ZTEVolumeDriver(driver.VolumeDriver): 'vendor_name': sys_info['cVendor'], 'driver_version': sys_info['cVersionName'], 'storage_protocol': 'iSCSI', - 'multiattach': True, + 'multiattach': False, 'total_capacity_gb': pool_info['total'], 'free_capacity_gb': pool_info['free'], 'reserved_percentage': 0,