From da1eb8e2c70e15ed5c58d6953c42817843ec1618 Mon Sep 17 00:00:00 2001 From: Maurice Escher Date: Wed, 6 May 2020 10:26:00 +0200 Subject: [PATCH] [NetApp] add max_over_subscription_ratio to pool stats The max_over_subscription_ratio configuration, which can be set per share back end, is now visible in scheduler-stats/pools/detail API. Change-Id: Idc0eb39d91cf572a480443a5f68f9d3bac8a6342 Closes-Bug: #1877063 --- .../share/drivers/netapp/dataontap/cluster_mode/lib_base.py | 2 ++ manila/tests/share/drivers/netapp/dataontap/fakes.py | 5 +++++ ...over-subscription-ratio-pool-stats-eea763b3b9b3ba7d.yaml | 6 ++++++ 3 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/netapp-cdot-add-max-over-subscription-ratio-pool-stats-eea763b3b9b3ba7d.yaml diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py index 935d1cffd5..ffa50595e9 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py @@ -340,6 +340,7 @@ class NetAppCmodeFileStorageLibrary(object): for aggr_name in sorted(aggregates): reserved_percentage = self.configuration.reserved_share_percentage + max_over_ratio = self.configuration.max_over_subscription_ratio total_capacity_gb = na_utils.round_down(float( aggr_space[aggr_name].get('total', 0)) / units.Gi) @@ -360,6 +361,7 @@ class NetAppCmodeFileStorageLibrary(object): 'allocated_capacity_gb': allocated_capacity_gb, 'qos': qos_support, 'reserved_percentage': reserved_percentage, + 'max_over_subscription_ratio': max_over_ratio, 'dedupe': [True, False], 'compression': [True, False], 'netapp_flexvol_encryption': netapp_flexvol_encryption, diff --git a/manila/tests/share/drivers/netapp/dataontap/fakes.py b/manila/tests/share/drivers/netapp/dataontap/fakes.py index a5bf13ce38..c93f224317 100644 --- a/manila/tests/share/drivers/netapp/dataontap/fakes.py +++ b/manila/tests/share/drivers/netapp/dataontap/fakes.py @@ -680,6 +680,7 @@ POOLS = [ 'free_capacity_gb': 1.1, 'allocated_capacity_gb': 2.2, 'reserved_percentage': 5, + 'max_over_subscription_ratio': 2.0, 'dedupe': [True, False], 'compression': [True, False], 'thin_provisioning': [True, False], @@ -702,6 +703,7 @@ POOLS = [ 'free_capacity_gb': 2.0, 'allocated_capacity_gb': 4.0, 'reserved_percentage': 5, + 'max_over_subscription_ratio': 2.0, 'dedupe': [True, False], 'compression': [True, False], 'thin_provisioning': [True, False], @@ -727,6 +729,7 @@ POOLS_VSERVER_CREDS = [ 'free_capacity_gb': 1.1, 'allocated_capacity_gb': 0.0, 'reserved_percentage': 5, + 'max_over_subscription_ratio': 2.0, 'dedupe': [True, False], 'compression': [True, False], 'thin_provisioning': [True, False], @@ -746,6 +749,7 @@ POOLS_VSERVER_CREDS = [ 'free_capacity_gb': 2.0, 'allocated_capacity_gb': 0.0, 'reserved_percentage': 5, + 'max_over_subscription_ratio': 2.0, 'dedupe': [True, False], 'compression': [True, False], 'thin_provisioning': [True, False], @@ -1317,6 +1321,7 @@ def get_config_cmode(): config = na_fakes.create_configuration_cmode() config.local_conf.set_override('share_backend_name', BACKEND_NAME) config.reserved_share_percentage = 5 + config.max_over_subscription_ratio = 2.0 config.netapp_login = CLIENT_KWARGS['username'] config.netapp_password = CLIENT_KWARGS['password'] config.netapp_server_hostname = CLIENT_KWARGS['hostname'] diff --git a/releasenotes/notes/netapp-cdot-add-max-over-subscription-ratio-pool-stats-eea763b3b9b3ba7d.yaml b/releasenotes/notes/netapp-cdot-add-max-over-subscription-ratio-pool-stats-eea763b3b9b3ba7d.yaml new file mode 100644 index 0000000000..a83d8ac1d3 --- /dev/null +++ b/releasenotes/notes/netapp-cdot-add-max-over-subscription-ratio-pool-stats-eea763b3b9b3ba7d.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The NetApp cDOT driver now reports the max_over_subscription_ratio + configuration, which can be set per share back end, via + scheduler-stats/pools/detail API.