Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2101559

Summary: ERROR manila.share.manager manila.exception.NetAppException: No aggregates are available to Vserver svm-iscsi for provisioning shares.
Product: Red Hat OpenStack Reporter: swogat pradhan <swogatpradhan22>
Component: openstack-manilaAssignee: OpenStack Manila Bugzilla Bot <openstack-manila-bugs>
Status: CLOSED NOTABUG QA Contact: vhariria
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17.1 (Wallaby)CC: gouthamr, tkajinam, vimartin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-19 10:40:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description swogat pradhan 2022-06-27 19:59:05 UTC
Description of problem:
I am trying to add netapp as backend for manila but getting the following error:
2022-06-27 19:52:44.076 43 INFO manila.share.drivers.netapp.dataontap.cluster_mode.lib_base [req-e3a8ffc3-ed86-4fb6-aebf-9f9469330b32 - - - - -] Available licenses on tripleo_netapp_manila are base, cifs, cifs, fcp, fcp, iscsi, iscsi, nfs, nfs, snapmirror, snapmirror, snaprestore, snaprestore, tpm, tpm, ve, ve.
2022-06-27 19:52:44.204 43 ERROR manila.share.manager [req-e3a8ffc3-ed86-4fb6-aebf-9f9469330b32 - - - - -] Error encountered during initialization of driver NetAppCmodeSingleSvmShareDriver@hostgroup@tripleo_netapp_manila: manila.exception.NetAppException: No aggregates are available to Vserver svm-iscsi for provisioning shares. Ensure that one or more aggregates are assigned to the Vserver and that the configuration option netapp_aggregate_name_search_pattern is set correctly.
2022-06-27 19:52:44.204 43 ERROR manila.share.manager Traceback (most recent call last):
2022-06-27 19:52:44.204 43 ERROR manila.share.manager   File "/usr/lib/python3.6/site-packages/manila/share/manager.py", line 344, in _driver_setup
2022-06-27 19:52:44.204 43 ERROR manila.share.manager     self.driver.check_for_setup_error()
2022-06-27 19:52:44.204 43 ERROR manila.share.manager   File "/usr/lib/python3.6/site-packages/manila/share/drivers/netapp/dataontap/cluster_mode/drv_single_svm.py", line 44, in check_for_setup_error
2022-06-27 19:52:44.204 43 ERROR manila.share.manager     self.library.check_for_setup_error()
2022-06-27 19:52:44.204 43 ERROR manila.share.manager   File "/usr/lib/python3.6/site-packages/manila/share/drivers/netapp/utils.py", line 112, in trace_wrapper
2022-06-27 19:52:44.204 43 ERROR manila.share.manager     result = f(self, *args, **kwargs)
2022-06-27 19:52:44.204 43 ERROR manila.share.manager   File "/usr/lib/python3.6/site-packages/manila/share/drivers/netapp/dataontap/cluster_mode/lib_single_svm.py", line 79, in check_for_setup_error
2022-06-27 19:52:44.204 43 ERROR manila.share.manager     raise exception.NetAppException(msg)
2022-06-27 19:52:44.204 43 ERROR manila.share.manager manila.exception.NetAppException: No aggregates are available to Vserver svm-iscsi for provisioning shares. Ensure that one or more aggregates are assigned to the Vserver and that the configuration option netapp_aggregate_name_search_pattern is set correctly.
2022-06-27 19:52:44.204 43 ERROR manila.share.manager

Backend configuration:
[tripleo_netapp_manila]
share_driver=manila.share.drivers.netapp.common.NetAppDriver
netapp_login=admin
netapp_password=P@ssw0rd
netapp_server_hostname=172.25.202.25
share_backend_name=tripleo_netapp_manila
netapp_transport_type=http
netapp_storage_family=ontap_cluster
netapp_server_port=80
netapp_vserver=svm-iscsi
driver_handles_share_servers=False
netapp_aggregate_name_search_pattern='^((?!DM5000H).)*$'

Version-Release number of selected component (if applicable):


How reproducible:
Enable manila netapp backend

Steps to Reproduce:
1. install manila
2. add netapp backend to manila


Actual results:
2022-06-27 19:52:44.204 43 ERROR manila.share.manager manila.exception.NetAppException: No aggregates are available to Vserver svm-iscsi for provisioning shares. Ensure that one or more aggregates are assigned to the Vserver and that the configuration option netapp_aggregate_name_search_pattern is set correctly.

Expected results:
Manila should find the aggregates successfully

Additional info:
i have added two aggregates to the svm-iscsi Vserver in the name DM5000H_01_X and DM5000H_02_X.
I was able to make it work using the same configuration, when i first added the aggregates to vserver, but then after reconfiguring via tripleo script it stopped working.

Comment 1 Takashi Kajinami 2022-06-28 07:38:08 UTC
Please describe the version of RHOSP and RHEL you are using.
In case you are using RDO + CentOS then please report the bug to upstream launchpad instead of bugzilla.

bugzilla is used to track any problem with downstream product, not upstream distributions.

Comment 2 Goutham Pacha Ravi 2022-06-28 11:50:23 UTC
The regular expression used for the "netapp_aggregate_name_search_pattern" seems incorrect. If you'd like the driver to pick up the two aggregates you created (DM5000H_01_X and DM5000H_02_X), specifying the regex as "^DM5000H.*$" would do; the negative lookahead (?!) makes it so that aggregates named "^DM5000H.*$" are not matched.

Comment 3 swogat pradhan 2022-06-29 06:56:34 UTC
i changed the regex to the one you specified but i am still getting the same error. i am not usre what i am missing:

[tripleo_netapp_manila]
share_driver=manila.share.drivers.netapp.common.NetAppDriver
netapp_login=admin
netapp_password=P@ssw0rd
netapp_server_hostname=172.25.202.25
share_backend_name=tripleo_netapp_manila
netapp_transport_type=http
netapp_storage_family=ontap_cluster
netapp_server_port=80
#netapp_volume_name_template=share_%(share_id)s
netapp_vserver=svm-iscsi
#netapp_vserver_name_template=os_%s
#netapp_lif_name_template=os_%(net_allocation_id)s
#netapp_port_name_search_pattern=(.*)
driver_handles_share_servers=False
netapp_aggregate_name_search_pattern="^DM5000H.*$"
#netapp_root_volume_aggregate=
#netapp_root_volume=root
#netapp_trace_flags=

Comment 4 Goutham Pacha Ravi 2022-06-29 09:26:03 UTC
Swogat, 

This doesn't seem to be an issue with the configuration then. As the user "admin", execute the following on your ONTAP cluster: 

 > vserver show svm-iscsi -fields aggr-list 


This is what the driver is doing to fetch the list of aggregates assigned to the vserver. 
Next, since you're using the "admin" user, i presume you have cluster-wide access - the driver tries to eliminate "root aggregates" from the list of assigned aggregates; you can find the list with:

> aggr show -has-mroot true


Finally, the search pattern is applied against the aggregates that remain. 


As Takashi mentioned, please report a bug against upstream's openstack/manila if this isn't a RHEL OSP deployment: https://bugs.launchpad.net/manila

Comment 5 Victoria Martinez de la Cruz 2022-07-19 10:40:08 UTC
Seems this is not an RHEL OSP deployment and we should follow this on the upstream tracker. Closing this bug now.