VMAX driver - Incorrect stats reporting
There is an issue in the way free_capacity_gb is being calculated for the VMAX driver - it is using 'total_allocated_capacity' instead of calculating using 'total_used_cap', or taking 'fba_free_capacity'. There is also excess queries being made (and logs being produced), as the capacities are being requested for each pool. This is unnecessary since WLP support was removed - the capacities are reported at an SRP level and so will be the same for each service level/ workload combination. This patch rectifies these issues. Change-Id: Icdafd47865e3cf1e5b687f39f15b8ebfccbf67a3 Closes-Bug: 1731930
This commit is contained in:
parent
7dda6ef758
commit
8198b10c6b
@ -507,9 +507,10 @@ class VMAXCommonData(object):
|
||||
srp_details = {"srpSloDemandId": ["Bronze", "Diamond", "Gold",
|
||||
"None", "Optimized", "Silver"],
|
||||
"srpId": srp,
|
||||
"total_allocated_cap_gb": 5244.7,
|
||||
"total_used_cap_gb": 5244.7,
|
||||
"total_usable_cap_gb": 20514.4,
|
||||
"total_subscribed_cap_gb": 84970.1,
|
||||
"fba_used_capacity": 5244.7,
|
||||
"reserved_cap_percent": 10}
|
||||
|
||||
volume_details = [{"cap_gb": 2,
|
||||
@ -2994,7 +2995,7 @@ class VMAXProvisionTest(test.TestCase):
|
||||
array_info = self.common.pool_info['arrays_info'][0]
|
||||
ref_stats = (self.data.srp_details['total_usable_cap_gb'],
|
||||
float(self.data.srp_details['total_usable_cap_gb']
|
||||
- self.data.srp_details['total_allocated_cap_gb']),
|
||||
- self.data.srp_details['total_used_cap_gb']),
|
||||
self.data.srp_details['total_subscribed_cap_gb'],
|
||||
self.data.srp_details['reserved_cap_percent'])
|
||||
stats = self.provision.get_srp_pool_stats(array, array_info)
|
||||
|
@ -817,6 +817,9 @@ class VMAXCommon(object):
|
||||
(location_info, total_capacity_gb, free_capacity_gb,
|
||||
provisioned_capacity_gb,
|
||||
array_reserve_percent) = self._update_srp_stats(array_info)
|
||||
arrays[array_info['SerialNumber']] = (
|
||||
[total_capacity_gb, free_capacity_gb,
|
||||
provisioned_capacity_gb, array_reserve_percent])
|
||||
else:
|
||||
already_queried = True
|
||||
pool_name = ("%(slo)s+%(workload)s+%(srpName)s+%(array)s"
|
||||
|
@ -294,7 +294,6 @@ class VMAXProvision(object):
|
||||
"""
|
||||
total_capacity_gb = 0
|
||||
remaining_capacity_gb = 0
|
||||
allocated_capacity_gb = None
|
||||
subscribed_capacity_gb = 0
|
||||
array_reserve_percent = 0
|
||||
srp = array_info['srpName']
|
||||
@ -310,19 +309,17 @@ class VMAXProvision(object):
|
||||
return 0, 0, 0, 0, False
|
||||
try:
|
||||
total_capacity_gb = srp_details['total_usable_cap_gb']
|
||||
allocated_capacity_gb = srp_details['total_allocated_cap_gb']
|
||||
try:
|
||||
used_capacity_gb = srp_details['total_used_cap_gb']
|
||||
remaining_capacity_gb = float(
|
||||
total_capacity_gb - used_capacity_gb)
|
||||
except KeyError:
|
||||
remaining_capacity_gb = srp_details['fba_free_capacity']
|
||||
subscribed_capacity_gb = srp_details['total_subscribed_cap_gb']
|
||||
remaining_capacity_gb = float(
|
||||
total_capacity_gb - allocated_capacity_gb)
|
||||
array_reserve_percent = srp_details['reserved_cap_percent']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
LOG.debug(
|
||||
"Remaining capacity %(remaining_capacity_gb)s "
|
||||
"GBs is determined from SRP capacity ",
|
||||
{'remaining_capacity_gb': remaining_capacity_gb})
|
||||
|
||||
return (total_capacity_gb, remaining_capacity_gb,
|
||||
subscribed_capacity_gb, array_reserve_percent)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user