NetApp Driver with Non-Cluster-Scoped Role and User Cannot Delete Shares

Bug #1765420 reported by Dustin Schoenbrun on 2018-04-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Manila
High
Goutham Pacha Ravi

Bug Description

When deploying the NetApp Driver with a non-cluster-scoped role and user, there are some commands that fail due to the user not being able to access certain NetApp APIs.

The role and user were created with the following commands on the NetApp Controller:

security login create -user-or-group-name openstack -application ssh -authentication-method password -role vsadmin -vserver tbarron_0

security login create -user-or-group-name openstack -application http -authentication-method password -role vsadmin -vserver tbarron_0

security login create -user-or-group-name openstack -application ontapi -authentication-method password -role vsadmin -vserver tbarron_0

When attempting to delete a share the command fails with the following stack trace:

2018-04-09 19:04:01.868 44 INFO manila.message.api [req-d5dac6de-0a01-451a-960b-f80b7757fd34 f9ef9c1c4e1942609605766807bcab2d d8141ab6de8a4c8398e475f47b07d426 - - -] Creating message record for request_id = req-d5dac6de-0a01-451a-960b-f80b7757fd34
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server [req-d5dac6de-0a01-451a-960b-f80b7757fd34 f9ef9c1c4e1942609605766807bcab2d d8141ab6de8a4c8398e475f47b07d426 - - -] Exception during message handling: NaApiError: NetApp API failed. Reason - 13005:Unable to find API: qos-policy-group-get-iter
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 163, in _process_incoming
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 220, in dispatch
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 190, in _do_dispatch
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 187, in wrapped
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server return f(self, *args, **kwargs)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/utils.py", line 571, in wrapper
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server return func(self, *args, **kwargs)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 2833, in delete_share_instance
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server exception=excep)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server self.force_reraise()
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server six.reraise(self.type_, self.value, self.tb)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 2808, in delete_share_instance
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server share_server=share_server)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/dataontap/cluster_mode/drv_single_svm.py", line 63, in delete_share
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server self.library.delete_share(context, share, **kwargs)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/utils.py", line 96, in trace_wrapper
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server result = f(self, *args, **kwargs)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py", line 782, in delete_share
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server qos_policy_for_share)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/utils.py", line 96, in trace_wrapper
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server result = f(self, *args, **kwargs)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/dataontap/client/client_cmode.py", line 3740, in mark_qos_policy_group_for_deletion
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server if self.qos_policy_group_exists(qos_policy_group_name):
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/utils.py", line 96, in trace_wrapper
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server result = f(self, *args, **kwargs)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/dataontap/client/client_cmode.py", line 3649, in qos_policy_group_exists
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server self.qos_policy_group_get(qos_policy_group_name)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/utils.py", line 96, in trace_wrapper
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server result = f(self, *args, **kwargs)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/dataontap/client/client_cmode.py", line 3673, in qos_policy_group_get
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server False)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/dataontap/client/client_base.py", line 88, in send_request
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server return self.connection.invoke_successfully(request, enable_tunneling)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server File "/usr/lib/python2.7/site-packages/manila/share/drivers/netapp/dataontap/client/api.py", line 287, in invoke_successfully
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server raise NaApiError(code, msg)
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server NaApiError: NetApp API failed. Reason - 13005:Unable to find API: qos-policy-group-get-iter
2018-04-09 19:04:01.879 44 ERROR oslo_messaging.rpc.server

Changed in manila:
milestone: none → rocky-1
milestone: rocky-1 → none
Changed in manila:
assignee: nobody → Goutham Pacha Ravi (gouthamr)
status: New → In Progress
Changed in manila:
importance: Undecided → High

Reviewed: https://review.openstack.org/559860
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=4de799677d9d8559a7df61cb8d3403d61f4dde5c
Submitter: Zuul
Branch: master

commit 4de799677d9d8559a7df61cb8d3403d61f4dde5c
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Apr 9 19:00:57 2018 -0400

    NetApp ONTAP: Fix delete-share for vsadmin users

    qos- APIs are unavailable to vsadmin users. Fix the
    code in the delete share flow to prevent failing on
    being unable to execute the qos-get-iter call.

    Change-Id: If9ce7c840fc968824d53002eaaea082e28631178
    Closes-Bug: 1765420

Changed in manila:
status: In Progress → Fix Released

This issue was fixed in the openstack/manila 7.0.0.0b2 development milestone.

Reviewed: https://review.openstack.org/575533
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=3d6ed0c33e9c41fade51c814526aa5a75cc978ac
Submitter: Zuul
Branch: stable/queens

commit 3d6ed0c33e9c41fade51c814526aa5a75cc978ac
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Apr 9 19:00:57 2018 -0400

    NetApp ONTAP: Fix delete-share for vsadmin users

    qos- APIs are unavailable to vsadmin users. Fix the
    code in the delete share flow to prevent failing on
    being unable to execute the qos-get-iter call.

    Change-Id: If9ce7c840fc968824d53002eaaea082e28631178
    Closes-Bug: 1765420
    (cherry picked from commit 4de799677d9d8559a7df61cb8d3403d61f4dde5c)

tags: added: in-stable-queens

Reviewed: https://review.openstack.org/584902
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=deab419d40cc049270c4fdf67565bc02b0e45290
Submitter: Zuul
Branch: stable/pike

commit deab419d40cc049270c4fdf67565bc02b0e45290
Author: Goutham Pacha Ravi <email address hidden>
Date: Mon Apr 9 19:00:57 2018 -0400

    NetApp ONTAP: Fix delete-share for vsadmin users

    qos- APIs are unavailable to vsadmin users. Fix the
    code in the delete share flow to prevent failing on
    being unable to execute the qos-get-iter call.

    Change-Id: If9ce7c840fc968824d53002eaaea082e28631178
    Closes-Bug: 1765420
    (cherry picked from commit 4de799677d9d8559a7df61cb8d3403d61f4dde5c)
    (cherry picked from commit 3d6ed0c33e9c41fade51c814526aa5a75cc978ac)

tags: added: in-stable-pike

This issue was fixed in the openstack/manila 6.0.2 release.

This issue was fixed in the openstack/manila 5.0.2 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers