From e4e106211c900693cfe3f55b5f84dfd274bc654f Mon Sep 17 00:00:00 2001 From: Saikumar Pulluri Date: Fri, 19 Sep 2025 12:26:42 -0400 Subject: [PATCH] [NetApp] Remove total_volumes capability from default filter function We have added 'capabilities.total_volumes < 1024' for DEFAULT_FILTER_FUNCTION for NetApp iSCSI/NVMe drivers earlier thinking about only ONTAP9 cluster but this will fail for ASAr2 clusters as the maximum number of LUN limits are different. Removing the "capabilities.total_volumes < 1024" from DEFAULT_FILTER_FUNCTION to maintain the consistency across the NetApp ontap platforms. Closes-Bug: #2125054 Change-Id: Ic38e84b70bb3c8171a0804db7a425751429fce76 Signed-off-by: Saikumar Pulluri --- .../drivers/netapp/dataontap/block_base.py | 3 +-- .../drivers/netapp/dataontap/nvme_library.py | 3 +-- ...app-o9-asar2-platforms-afa7c4f580a6f8ef.yaml | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/bug-2124264-fix-default-filter-function-for-netapp-o9-asar2-platforms-afa7c4f580a6f8ef.yaml diff --git a/cinder/volume/drivers/netapp/dataontap/block_base.py b/cinder/volume/drivers/netapp/dataontap/block_base.py index 5aef6c5efef..1784663a94c 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_base.py +++ b/cinder/volume/drivers/netapp/dataontap/block_base.py @@ -87,8 +87,7 @@ class NetAppBlockStorageLibrary( 'xen', 'hyper_v'] DEFAULT_LUN_OS = 'linux' DEFAULT_HOST_TYPE = 'linux' - DEFAULT_FILTER_FUNCTION = ('capabilities.utilization < 70 and ' - 'capabilities.total_volumes < 1024') + DEFAULT_FILTER_FUNCTION = 'capabilities.utilization < 70' DEFAULT_GOODNESS_FUNCTION = '100 - capabilities.utilization' def __init__(self, driver_name, driver_protocol, **kwargs): diff --git a/cinder/volume/drivers/netapp/dataontap/nvme_library.py b/cinder/volume/drivers/netapp/dataontap/nvme_library.py index 81e0e62c3f4..a4335bff7e2 100644 --- a/cinder/volume/drivers/netapp/dataontap/nvme_library.py +++ b/cinder/volume/drivers/netapp/dataontap/nvme_library.py @@ -73,8 +73,7 @@ class NetAppNVMeStorageLibrary( ALLOWED_SUBSYSTEM_HOST_TYPES = ['aix', 'linux', 'vmware', 'windows'] DEFAULT_NAMESPACE_OS = 'linux' DEFAULT_HOST_TYPE = 'linux' - DEFAULT_FILTER_FUNCTION = 'capabilities.utilization < 70 and ' \ - 'capabilities.total_volumes < 1024' + DEFAULT_FILTER_FUNCTION = 'capabilities.utilization < 70' DEFAULT_GOODNESS_FUNCTION = '100 - capabilities.utilization' REQUIRED_CMODE_FLAGS = ['netapp_vserver'] NVME_PORT = 4420 diff --git a/releasenotes/notes/bug-2124264-fix-default-filter-function-for-netapp-o9-asar2-platforms-afa7c4f580a6f8ef.yaml b/releasenotes/notes/bug-2124264-fix-default-filter-function-for-netapp-o9-asar2-platforms-afa7c4f580a6f8ef.yaml new file mode 100644 index 00000000000..b8ef53a7aac --- /dev/null +++ b/releasenotes/notes/bug-2124264-fix-default-filter-function-for-netapp-o9-asar2-platforms-afa7c4f580a6f8ef.yaml @@ -0,0 +1,17 @@ +--- +fixes: + - | + NetApp driver `bug #2125054 + `_: Fixed + default_filter_fucntion for NetApp driver to maintain the + consistency across different platforms like ONTAP9 and ASAr2. + + Admin can add a custom filter to impose the total_volumes limit + for ONTAP backends like below. + filter_function=capabilities.total_volumes < + + Note: The admin needs to configure the scheduler_default_filters to include + the DriverFilter as well under [DEFAULT] stanza as part of cinder.conf, + please refer [1] for the default filter list. + + [1] https://docs.openstack.org/cinder/latest/configuration/block-storage/samples/cinder.conf.html