Previously, the parameter 'iops_limit' in the ScaleIO connector was incorrectly set, and should have been 'iopsLimit'. Consequently, the IOPS of the volume would stay unlimited, even if the user sets a limit on the IOPS.
With this update, the correct parameter name is now set, and the 'iopsLimit' will be followed.
Description of problem:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> https://review.openstack.org/#/c/255065/ <<< still NOT implemented in python-os-brick-0.5.0-1.4.el7ost.noarch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Fix iopsLimit parameter in ScaleIO connector The parameter 'iops_limit' in the ScaleIO connector is wrong. The correct parameter should be 'iopsLimit'. Because of this error, the iops of the volume will stay unlimited even if the user sets a limit on the iops. This patch fixes this error.
>> os_brick/initiator/connector.py
>> os_brick/tests/initiator/test_connector.py
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--- connector_new-4dc8b36bce12369120df32e2431d8a6b71819fbb.py 2015-12-09 04:42:40.000000000 +0100
+++ connector_old-95f9f80c020c299522a04d6aa142267a724b34b4.py 2015-12-02 10:23:16.000000000 +0100
@@ -2024,7 +2024,7 @@
if self.bandwidth_limit is not None:
params['bandwidthLimitInKbps'] = self.bandwidth_limit
if self.iops_limit is not None:
- params['iopsLimit'] = self.iops_limit
+ params['iops_limit'] = self.iops_limit
request = (
"https://%(server_ip)s:%(server_port)s/api/instances/"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--- test_connector_new-1fad1ee951bc87d40c2dc1111f541aad6c078de3.py 2015-12-09 04:42:40.000000000 +0100
+++ test_connector_old-aa9ea37ae1df29712f9d1a8bd421a60b7a1e8e8d.py 2015-12-02 10:23:16.000000000 +0100
@@ -1970,18 +1970,6 @@
"""Fake REST server"""
api_call = url.split(':', 2)[2].split('/', 1)[1].replace('api/', '')
- if 'setMappedSdcLimits' in api_call:
- self.assertNotIn("iops_limit", kwargs['data'])
- if "iopsLimit" not in kwargs['data']:
- self.assertIn("bandwidthLimitInKbps",
- kwargs['data'])
- elif "bandwidthLimitInKbps" not in kwargs['data']:
- self.assertIn("iopsLimit", kwargs['data'])
- else:
- self.assertIn("bandwidthLimitInKbps",
- kwargs['data'])
- self.assertIn("iopsLimit", kwargs['data'])
-
try:
return self.mock_calls[api_call]
except KeyError:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// diff upstream_patch OSP_latest_build (python-os-brick-0.5.0-1.4.el7ost.noarch):
diff -u connector_new-4dc8b36bce12369120df32e2431d8a6b71819fbb.py connector.py |grep iops
if self.iops_limit is not None:
- params['iopsLimit'] = self.iops_limit
+ params['iops_limit'] = self.iops_limit
// the same goes for test_connector.py
(In reply to Jon Schlueter from comment #2)
> This patch should be present in OSP 9, and patch is already landed on
> liberty/stable
Thanks for the info, Jon!
My customer is asking if it will be backported to OSP 8. Any idea what are the chances of that happening?
Best,
Irina
(In reply to Irina Petrova from comment #3)
> (In reply to Jon Schlueter from comment #2)
> > This patch should be present in OSP 9, and patch is already landed on
> > liberty/stable
>
> Thanks for the info, Jon!
>
> My customer is asking if it will be backported to OSP 8. Any idea what are
> the chances of that happening?
>
> Best,
> Irinahttps://bugzilla.redhat.com/show_bug.cgi?id=1366592 is bug targeted for OSP 8 and yes it will be backported.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHEA-2016-1761.html
Description of problem: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> https://review.openstack.org/#/c/255065/ <<< still NOT implemented in python-os-brick-0.5.0-1.4.el7ost.noarch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Fix iopsLimit parameter in ScaleIO connector The parameter 'iops_limit' in the ScaleIO connector is wrong. The correct parameter should be 'iopsLimit'. Because of this error, the iops of the volume will stay unlimited even if the user sets a limit on the iops. This patch fixes this error. >> os_brick/initiator/connector.py >> os_brick/tests/initiator/test_connector.py ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --- connector_new-4dc8b36bce12369120df32e2431d8a6b71819fbb.py 2015-12-09 04:42:40.000000000 +0100 +++ connector_old-95f9f80c020c299522a04d6aa142267a724b34b4.py 2015-12-02 10:23:16.000000000 +0100 @@ -2024,7 +2024,7 @@ if self.bandwidth_limit is not None: params['bandwidthLimitInKbps'] = self.bandwidth_limit if self.iops_limit is not None: - params['iopsLimit'] = self.iops_limit + params['iops_limit'] = self.iops_limit request = ( "https://%(server_ip)s:%(server_port)s/api/instances/" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --- test_connector_new-1fad1ee951bc87d40c2dc1111f541aad6c078de3.py 2015-12-09 04:42:40.000000000 +0100 +++ test_connector_old-aa9ea37ae1df29712f9d1a8bd421a60b7a1e8e8d.py 2015-12-02 10:23:16.000000000 +0100 @@ -1970,18 +1970,6 @@ """Fake REST server""" api_call = url.split(':', 2)[2].split('/', 1)[1].replace('api/', '') - if 'setMappedSdcLimits' in api_call: - self.assertNotIn("iops_limit", kwargs['data']) - if "iopsLimit" not in kwargs['data']: - self.assertIn("bandwidthLimitInKbps", - kwargs['data']) - elif "bandwidthLimitInKbps" not in kwargs['data']: - self.assertIn("iopsLimit", kwargs['data']) - else: - self.assertIn("bandwidthLimitInKbps", - kwargs['data']) - self.assertIn("iopsLimit", kwargs['data']) - try: return self.mock_calls[api_call] except KeyError: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // diff upstream_patch OSP_latest_build (python-os-brick-0.5.0-1.4.el7ost.noarch): diff -u connector_new-4dc8b36bce12369120df32e2431d8a6b71819fbb.py connector.py |grep iops if self.iops_limit is not None: - params['iopsLimit'] = self.iops_limit + params['iops_limit'] = self.iops_limit // the same goes for test_connector.py