]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove QoS settings from SolidFire attributes
authorJohn Griffith <john.griffith8@gmail.com>
Thu, 31 Dec 2015 01:02:16 +0000 (18:02 -0700)
committerJohn Griffith <john.griffith8@gmail.com>
Sat, 27 Feb 2016 14:59:16 +0000 (07:59 -0700)
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

index 1eb37f6e9943b2d5c4c555d53532ae7d628e28e7..153ae1768cedacd33bab37d1270b8508f2cc791c 100644 (file)
@@ -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'],