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