Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
22 changes: 13 additions & 9 deletions cinder/volume/drivers/hpe/hpe_3par_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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 = {}

Expand Down Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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:
Expand Down