NetApp driver needs to handle auth failures better

Bug #2060857 reported by Goutham Pacha Ravi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Triaged
Low
Unassigned

Bug Description

Description
===========
When using the NetApp driver, we found that, if the auth password has special characters, the failure has a weird way of showing up. This may throw the troubleshooter into rabbit holes if the ONTAP system is reachable, or if there's some API access issue exists beyond basic authentication.

The issue was hit in a Kubernetes deployment of OpenStack Manila; and relevant configuration is here: https://paste.openstack.org/show/bP85pkraaREneppmsrAz/

but this may be reproduced easily even on DevStack.

Steps to reproduce
==================

A chronological list of steps which will help reproduce the issue you hit:
* Configure the NetApp driver with OpenStack Manila with the following config:

```
    [netapp]
    netapp_server_hostname = <ip>
    netapp_login = admin
    netapp_vserver = ntap-rhv-dev-rhos
    netapp_password="pa$$w0rd"

```

Expected result
===============
If the password has special characters, I expect that the driver will assist in escaping these appropriately prior to the ONTAP API communication; or, a proper error message is displayed so that the administrator escapes special characters appropriately in their configuration. In the example above, changing the password to "pa\$\$w0rd" allowed authentication to succeed.

Actual result
=============

An error log from the failure:

2024-04-10 12:20:33.458 16 ERROR manila.share.manager [None req-87856f2d-e0a4-4632-a321-861e5d7c8203 - - - - - -] Error encountered during initialization of driver NetAppCmodeSingleSvmShareDriver@hostgroup@netapp: File "<string>", line
 1
2024-04-10 12:20:33.458 16 ERROR manila.share.manager Traceback (most recent call last):
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/manager.py", line 356, in _driver_setup
2024-04-10 12:20:33.458 16 ERROR manila.share.manager self.driver.do_setup(ctxt)
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/cluster_mode/drv_single_svm.py", line 41, in do_setup
2024-04-10 12:20:33.458 16 ERROR manila.share.manager self.library.do_setup(context)
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/utils.py", line 115, in trace_wrapper
2024-04-10 12:20:33.458 16 ERROR manila.share.manager result = f(self, *args, **kwargs)
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py", line 178, in do_setup
2024-04-10 12:20:33.458 16 ERROR manila.share.manager self._client = self._get_api_client()
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/utils.py", line 115, in trace_wrapper
2024-04-10 12:20:33.458 16 ERROR manila.share.manager result = f(self, *args, **kwargs)
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py", line 224, in _get_api_client
2024-04-10 12:20:33.458 16 ERROR manila.share.manager client = client_cmode.NetAppCmodeClient(
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/client_cmode.py", line 58, in __init__
2024-04-10 12:20:33.458 16 ERROR manila.share.manager (major, minor) = self.get_ontapi_version(cached=False)
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/client_base.py", line 46, in get_ontapi_version
2024-04-10 12:20:33.458 16 ERROR manila.share.manager result = self.send_request('system-get-ontapi-version',
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/client_base.py", line 89, in send_request
2024-04-10 12:20:33.458 16 ERROR manila.share.manager return self.connection.invoke_successfully(
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/api.py", line 717, in invoke_successfully
2024-04-10 12:20:33.458 16 ERROR manila.share.manager return self.get_client(use_zapi=use_zapi).invoke_successfully(
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/api.py", line 374, in invoke_successfully
2024-04-10 12:20:33.458 16 ERROR manila.share.manager result = self.invoke_elem(
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/api.py", line 354, in invoke_elem
2024-04-10 12:20:33.458 16 ERROR manila.share.manager response_element = self._get_result(
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/api.py", line 432, in _get_result
2024-04-10 12:20:33.458 16 ERROR manila.share.manager processed_response = self._parse_response(response)
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "/usr/lib/python3.9/site-packages/manila/share/drivers/netapp/dataontap/client/api.py", line 427, in _parse_response
2024-04-10 12:20:33.458 16 ERROR manila.share.manager xml = etree.XML(response)
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "src/lxml/etree.pyx", line 3216, in lxml.etree.XML
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "src/lxml/parser.pxi", line 1899, in lxml.etree._parseMemoryDocument
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "src/lxml/parser.pxi", line 1787, in lxml.etree._parseDoc
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "src/lxml/parser.pxi", line 1144, in lxml.etree._BaseParser._parseDoc
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
2024-04-10 12:20:33.458 16 ERROR manila.share.manager File "<string>", line 1
2024-04-10 12:20:33.458 16 ERROR manila.share.manager lxml.etree.XMLSyntaxError: Space required after the Public Identifier, line 1, column 50
2024-04-10 12:20:33.458 16 ERROR manila.share.manager

Environment
===========
1. version of OpenStack Manila: 2023.1 / Antelope

2. storage backend information:
NetApp ONTAP
NetApp Release 9.9.1P4: Mon Oct 11 09:20:31 UTC 2021

Tags: netapp
Vida Haririan (vhariria)
tags: added: netapp
Vida Haririan (vhariria)
Changed in manila:
status: New → Triaged
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.