From: John Griffith Date: Thu, 31 Dec 2015 01:02:16 +0000 (-0700) Subject: Remove QoS settings from SolidFire attributes X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0bce0a001ee11cca45140eb54cabbdbe14deeca3;p=openstack-build%2Fcinder-build.git Remove QoS settings from SolidFire attributes There's a limit in the number of parent key objects that are stored on the SolidFire cluster object attributes (10). While we're not hitting the limit yet, we're getting dangerously close, so this patch removes the unnecessary QoS keys that are currently added. These keys can safely be removed because they are stored by Cinder already and can be retrieved via the type setting, or in the case of retype, the retype info that's stored on the volume attribute. Other keys shouldn't be modified at this time because they are used internally by the driver to make various decisions, and turning them into sub-keys or removing them altogether will involve more far reaching changes that aren't necessary in the short term to fix this particular bug. Change-Id: I617ba41331e95c45f86a08440e24e6c407033a46 Closes-Bug: #1530212 --- diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index 1eb37f6e9..153ae1768 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -500,23 +500,18 @@ class SolidFireDriver(san.SanISCSIDriver): raise exception.SolidFireAPIException(msg) sf_volume_id = data['result']['volumeID'] - qos = self._retrieve_qos_setting(vref) # NOTE(jdg): all attributes are copied via clone, need to do an update # to set any that were provided - qos_params = {'volumeID': sf_volume_id} + params = {'volumeID': sf_volume_id} create_time = vref['created_at'].isoformat() attributes = {'uuid': vref['id'], 'is_clone': 'True', 'src_uuid': src_uuid, 'created_at': create_time} - if qos: - qos_params['qos'] = qos - for k, v in qos.items(): - attributes[k] = str(v) - qos_params['attributes'] = attributes - data = self._issue_api_request('ModifyVolume', qos_params) + params['attributes'] = attributes + data = self._issue_api_request('ModifyVolume', params) model_update = self._get_model_info(sf_account, sf_volume_id) if model_update is None: @@ -1070,9 +1065,6 @@ class SolidFireDriver(san.SanISCSIDriver): attributes = {'uuid': volume['id'], 'is_clone': 'False', 'created_at': create_time} - if qos: - for k, v in qos.items(): - attributes[k] = str(v) vname = '%s%s' % (self.configuration.sf_volume_prefix, volume['id']) params = {'name': vname, @@ -1539,9 +1531,6 @@ class SolidFireDriver(san.SanISCSIDriver): if qos: params['qos'] = qos - for k, v in qos.items(): - attributes[k] = str(v) - params['attributes'] = attributes self._issue_api_request('ModifyVolume', params) return True @@ -1576,9 +1565,6 @@ class SolidFireDriver(san.SanISCSIDriver): 'is_clone': 'False', 'os_imported_at': import_time, 'old_name': sfname} - if qos: - for k, v in qos.items(): - attributes[k] = str(v) params = {'name': volume['name'], 'volumeID': sf_ref['volumeID'],