From 0bce0a001ee11cca45140eb54cabbdbe14deeca3 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Wed, 30 Dec 2015 18:02:16 -0700 Subject: [PATCH] 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 --- cinder/volume/drivers/solidfire.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index 1eb37f6e994..153ae1768ce 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'],