NetApp ONTAP: Fix reporting of provisioned_capacity_gb
The ONTAP drivers in Cinder ("7mode" and "cmode") cannot reliably and efficiently track provisioned_capacity_gb as expected by the Cinder scheduler. The driver authors originally assumed that provisioned_capacity_gb is consumed space on the backend. This results in miscalculation of over subscription in the Cinder scheduler. The fix adopted here is to remove this wrong reporting and rely on calculation of the provisioned_capacity_gb in the scheduler. Change-Id: Ic106dbcae8ceaac265b710756ab1874e445ca826 Closes-Bug: #1714209
This commit is contained in:
parent
6c236bca3d
commit
42b8b7fe60
@ -378,7 +378,6 @@ FAKE_7MODE_POOLS = [
|
||||
'multiattach': False,
|
||||
'thin_provisioning_support': False,
|
||||
'thick_provisioning_support': True,
|
||||
'provisioned_capacity_gb': 0.0,
|
||||
'utilization': 30.0,
|
||||
'filter_function': 'filter',
|
||||
'goodness_function': 'goodness',
|
||||
|
@ -578,7 +578,6 @@ class NetAppBlockStorage7modeLibraryTestCase(test.TestCase):
|
||||
'QoS_support': False,
|
||||
'thin_provisioning_support': not thick,
|
||||
'thick_provisioning_support': thick,
|
||||
'provisioned_capacity_gb': 2.94,
|
||||
'free_capacity_gb': 1339.27,
|
||||
'total_capacity_gb': 1342.21,
|
||||
'reserved_percentage': 5,
|
||||
|
@ -412,7 +412,6 @@ class NetAppBlockStorageCmodeLibraryTestCase(test.TestCase):
|
||||
'multiattach': False,
|
||||
'total_capacity_gb': 10.0,
|
||||
'free_capacity_gb': 2.0,
|
||||
'provisioned_capacity_gb': 8.0,
|
||||
'netapp_dedupe_used_percent': 55.0,
|
||||
'netapp_aggregate_used_percent': 45,
|
||||
'utilization': 30.0,
|
||||
|
@ -100,13 +100,11 @@ class NetApp7modeNfsDriverTestCase(test.TestCase):
|
||||
fake.TOTAL_BYTES // units.Gi, '0.01')
|
||||
free_capacity_gb = na_utils.round_down(
|
||||
fake.AVAILABLE_BYTES // units.Gi, '0.01')
|
||||
provisioned_capacity_gb = total_capacity_gb - free_capacity_gb
|
||||
capacity = {
|
||||
'reserved_percentage': fake.RESERVED_PERCENTAGE,
|
||||
'max_over_subscription_ratio': fake.MAX_OVER_SUBSCRIPTION_RATIO,
|
||||
'total_capacity_gb': total_capacity_gb,
|
||||
'free_capacity_gb': free_capacity_gb,
|
||||
'provisioned_capacity_gb': provisioned_capacity_gb,
|
||||
}
|
||||
self.mock_object(self.driver,
|
||||
'_get_share_capacity_info',
|
||||
@ -128,7 +126,6 @@ class NetApp7modeNfsDriverTestCase(test.TestCase):
|
||||
'reserved_percentage': 7,
|
||||
'max_over_subscription_ratio': 19.0,
|
||||
'multiattach': False,
|
||||
'provisioned_capacity_gb': 4456.0,
|
||||
'utilization': 30.0,
|
||||
'filter_function': 'filter',
|
||||
'goodness_function': 'goodness'}]
|
||||
|
@ -179,13 +179,11 @@ class NetAppCmodeNfsDriverTestCase(test.TestCase):
|
||||
fake.TOTAL_BYTES // units.Gi, '0.01')
|
||||
free_capacity_gb = na_utils.round_down(
|
||||
fake.AVAILABLE_BYTES // units.Gi, '0.01')
|
||||
provisioned_capacity_gb = total_capacity_gb - free_capacity_gb
|
||||
capacity = {
|
||||
'reserved_percentage': fake.RESERVED_PERCENTAGE,
|
||||
'max_over_subscription_ratio': fake.MAX_OVER_SUBSCRIPTION_RATIO,
|
||||
'total_capacity_gb': total_capacity_gb,
|
||||
'free_capacity_gb': free_capacity_gb,
|
||||
'provisioned_capacity_gb': provisioned_capacity_gb,
|
||||
}
|
||||
self.mock_object(self.driver,
|
||||
'_get_share_capacity_info',
|
||||
@ -219,7 +217,6 @@ class NetAppCmodeNfsDriverTestCase(test.TestCase):
|
||||
'multiattach': False,
|
||||
'total_capacity_gb': total_capacity_gb,
|
||||
'free_capacity_gb': free_capacity_gb,
|
||||
'provisioned_capacity_gb': provisioned_capacity_gb,
|
||||
'netapp_dedupe_used_percent': 55.0,
|
||||
'netapp_aggregate_used_percent': 45,
|
||||
'utilization': 30.0,
|
||||
|
@ -341,9 +341,6 @@ class NetAppBlockStorage7modeLibrary(block_base.NetAppBlockStorageLibrary):
|
||||
free /= units.Gi
|
||||
pool['free_capacity_gb'] = na_utils.round_down(free, '0.01')
|
||||
|
||||
pool['provisioned_capacity_gb'] = (round(
|
||||
pool['total_capacity_gb'] - pool['free_capacity_gb'], 2))
|
||||
|
||||
thick = (
|
||||
self.configuration.netapp_lun_space_reservation == 'enabled')
|
||||
pool['thick_provisioning_support'] = thick
|
||||
|
@ -311,9 +311,6 @@ class NetAppBlockStorageCmodeLibrary(block_base.NetAppBlockStorageLibrary,
|
||||
size_available_gb = capacity['size-available'] / units.Gi
|
||||
pool['free_capacity_gb'] = na_utils.round_down(size_available_gb)
|
||||
|
||||
pool['provisioned_capacity_gb'] = round(
|
||||
pool['total_capacity_gb'] - pool['free_capacity_gb'], 2)
|
||||
|
||||
if self.using_cluster_credentials:
|
||||
dedupe_used = self.zapi_client.get_flexvol_dedupe_used_percent(
|
||||
ssc_vol_name)
|
||||
|
@ -885,8 +885,6 @@ class NetAppNfsDriver(driver.ManageableVD,
|
||||
total_size / units.Gi)
|
||||
capacity['free_capacity_gb'] = na_utils.round_down(
|
||||
total_available / units.Gi)
|
||||
capacity['provisioned_capacity_gb'] = (round(
|
||||
capacity['total_capacity_gb'] - capacity['free_capacity_gb'], 2))
|
||||
|
||||
return capacity
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
---
|
||||
fixes:
|
||||
- The ONTAP drivers ("7mode" and "cmode") have been fixed to not report
|
||||
consumed space as "provisioned_capacity_gb". They instead rely on
|
||||
the cinder scheduler's calculation of "provisioned_capacity_gb". This
|
||||
fixes the oversubscription miscalculations with the ONTAP drivers. This
|
||||
bugfix affects all three protocols supported by these drivers
|
||||
(iSCSI/FC/NFS).
|
||||
upgrade:
|
||||
- If using the NetApp ONTAP drivers (7mode/cmode), the configuration value
|
||||
for "max_over_subscription_ratio" may need to be increased to
|
||||
avoid scheduling problems where storage pools that previously were
|
||||
valid to schedule new volumes suddenly appear to be out of space
|
||||
to the Cinder scheduler. See
|
||||
documentation `here <https://docs.openstack
|
||||
.org/cinder/latest/admin/blockstorage-over-subscription.html>`_.
|
Loading…
Reference in New Issue
Block a user