From 631ce7484ba52fadf227a8606d527ff5b12c3889 Mon Sep 17 00:00:00 2001 From: jlothe Date: Wed, 29 Jul 2026 20:33:06 +0530 Subject: [PATCH] Added changes to enable deprecated qos params Signed-off-by: jlothe --- .../unit/volume/drivers/hpe/test_hpe3par.py | 18 +++++++++++++++ cinder/volume/drivers/hpe/hpe_3par_common.py | 22 +++++++++++-------- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py index 7f84a0058c6..2266d92f17b 100644 --- a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py +++ b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py @@ -1263,6 +1263,24 @@ def test_qos_alletra_mp_uses_kb_bandwidth(self): 'vvs-test', {'ioMaxLimit': 1000, 'bwMaxLimitKB': 50000}) + def test_qos_r6_10_6_0_uses_deprecated_qos(self): + """Ensure R6 10.6.0 restores R5 deprecated QOS settings.""" + + conf = self.setup_configuration() + common = hpecommon.HPE3PARCommon(conf) + mock_client = mock.Mock() + common.client = mock_client + common.API_VERSION = hpecommon.API_VERSION_10_6_0 + + common._set_qos_rule(self.QOS_SPECS, 'vvs-test') + + mock_client.createQoSRules.assert_called_once_with( + 'vvs-test', + {'ioMinGoal': 100, 'ioMaxLimit': 1000, + 'bwMinGoalKB': 25000, 'bwMaxLimitKB': 50000, + 'latencyGoal': 25, + 'priority': 1}) + def test_qos_alletra_mp_invalid_without_max_limits(self): """Alletra MP QOS requires at least one max limit. diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index 6bb44c929cc..08486151128 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -82,6 +82,7 @@ REMOTE_COPY_API_VERSION = 30202290 API_VERSION_2023 = 100000000 API_VERSION_2025 = 100500000 +API_VERSION_10_6_0 = 100600000 hpe3par_opts = [ cfg.StrOpt('hpe3par_api_url', @@ -317,11 +318,12 @@ class HPE3PARCommon(object): 4.0.26 - Added comment for cloned volumes. Bug #2062524 4.0.27 - Skip license check for new WSAPI (of 2025). Bug #2119709 4.0.28 - Improved QOS handling for Alletra MP. Bug #2143385 + 4.0.29 - Restore R5 deprecated QOS settings for R6 10.6.0 """ - VERSION = "4.0.28" + VERSION = "4.0.29" stats = {} @@ -2022,14 +2024,16 @@ def _get_qos_value(self, qos, key, default=None): else: return default - def _is_alletra_mp(self): - """Check if the backend is AlletraMP based on WSAPI version. + def _is_alletra_mp_r5_qos_version(self): + """Check if the API version falls in the Alletra MP R5 QOS range. - AlletraMP uses WSAPI version >= 100500000 (API_VERSION_2025). + Alletra MP R5 deprecated ioMinGoal, bwMinGoalKB, latencyGoal, + and priority. They are supported again in R6 10.6.0. - :returns: True if AlletraMP, False otherwise + :returns: True if max-only QOS handling is required, False otherwise """ - return self.API_VERSION >= API_VERSION_2025 + return (API_VERSION_2025 <= self.API_VERSION < + API_VERSION_10_6_0) def _get_qos_by_volume_type(self, volume_type): qos = {} @@ -2072,14 +2076,14 @@ def _set_qos_rule(self, qos, vvs_name): latency = self._get_qos_value(qos, 'latency') priority = self._get_qos_value(qos, 'priority', 'normal') - # Check if backend is AlletraMP - is_alletra_mp = self._is_alletra_mp() + is_alletra_mp_r5_qos_version = ( + self._is_alletra_mp_r5_qos_version()) qosRule = {} # For Alletra MP, ioMinGoal, bwMinGoalKB, latencyGoal, and priority # are deprecated. Only use max limits. - if is_alletra_mp: + if is_alletra_mp_r5_qos_version: # For Alletra MP, at least one of maxIOPS or maxBWS must be # provided. if max_io is None and max_bw is None: