cifs entry on netapp cmode backend has silent error on creation

Bug #1356387 reported by Valeriy Ponomaryov on 2014-08-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Manila
Medium
Valeriy Ponomaryov

Bug Description

If we create share with share-network which have 'active_directory' security service, then we expect 'cifs entry' created on Cluster Mode backend.

Now, if we create nfs share with such share-network we won't see any error if cifs entry was not created, that is requirement for cifs shares.

Only when we try create cifs share we get error:

2014-08-13 16:49:50.847 ERROR manila.share.manager [req-31134759-e92e-4aec-bc03-8f0e514e7db5 cc674b8857534ab98e10290f44548b75 c1034c6ff2df458fb528a50260ac8cdb] Share 6a37dc1d-2ffe-49c3-9d9c-c175a7229ec1 failed on creation.
2014-08-13 16:49:50.913 ERROR oslo.messaging.rpc.dispatcher [req-31134759-e92e-4aec-bc03-8f0e514e7db5 cc674b8857534ab98e10290f44548b75 c1034c6ff2df458fb528a50260ac8cdb] Exception during message handling: NetApp api failed. Reason
- 13001:Failed to get CIFS server. Reason: entry doesn't exist.
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 205, in create_share
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher self.db.share_update(context, share_id, {'status': 'error'})
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/openstack/common/excutils.py", line 82, in __exit__
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 199, in create_share
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher context, share_ref, share_server=share_server)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 89, in wrap
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher return f(self, *args, **kwargs)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 594, in create_share
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher return self._create_export(share, vserver, vserver_client)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 707, in _create_export
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher export_location = helper.create_share(share_name, ip_address)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 1089, in create_share
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher host_ip, share_name = self._get_export_location(share)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 115, in send_request
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher return self._client.invoke_successfully(elem, enable_tunneling=True)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/netapp/api.py", line 224, in invoke_successfully
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher raise NaApiError(code, msg)
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher NaApiError: NetApp api failed. Reason - 13001:Failed to get CIFS server. Reason: entry doesn't exist.
2014-08-13 16:49:50.913 TRACE oslo.messaging.rpc.dispatcher
2014-08-13 16:49:50.921 ERROR oslo.messaging._drivers.common [req-31134759-e92e-4aec-bc03-8f0e514e7db5 cc674b8857534ab98e10290f44548b75 c1034c6ff2df458fb528a50260ac8cdb] Returning exception NetApp api failed. Reason - 13001:Failed
 to get CIFS server. Reason: entry doesn't exist. to caller
2014-08-13 16:49:50.922 ERROR oslo.messaging._drivers.common [req-31134759-e92e-4aec-bc03-8f0e514e7db5 cc674b8857534ab98e10290f44548b75 c1034c6ff2df458fb528a50260ac8cdb] ['Traceback (most recent call last):\n', ' File "/usr/local
/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args
)\n', ' File "/opt/stack/manila/manila/share/manager.py", line 205, in create_share\n self.db.share_update(context, share_id, {\'status\': \'error\'})\n', ' File "/opt/stack/manila/manila/openstack/common/excutils.py", line 8
2, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/opt/stack/manila/manila/share/manager.py", line 199, in create_share\n context, share_ref, share_server=share_server)\n', ' File "/opt/stack/manila
/manila/share/drivers/netapp/cluster_mode.py", line 89, in wrap\n return f(self, *args, **kwargs)\n', ' File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 594, in create_share\n return self._create_e
xport(share, vserver, vserver_client)\n', ' File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 707, in _create_export\n export_location = helper.create_share(share_name, ip_address)\n', ' File "/opt/st
ack/manila/manila/share/drivers/netapp/cluster_mode.py", line 1089, in create_share\n host_ip, share_name = self._get_export_location(share)\n', ' File "/opt/stack/manila/manila/share/drivers/netapp/cluster_mode.py", line 115, in send_request\n return self._client.invoke_successfully(elem, enable_tunneling=True)\n', ' File "/opt/stack/manila/manila/share/drivers/netapp/api.py", line 224, in invoke_successfully\n raise NaApiError(code, msg)\n', "NaApiError: NetApp api failed. Reason - 13001:Failed to get CIFS server. Reason: entry doesn't exist.\n"]

There can be different reasons for error of cifs entry creation, like temporary inavaiablity, so we need to try create this entry if it does not exist any time and log error if present.

tags: added: cmode driver
description: updated
Changed in manila:
importance: Undecided → Medium
Changed in manila:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress

Reviewed: https://review.openstack.org/114313
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=3bada9a258913124ad98b53dd104abe53469d7e9
Submitter: Jenkins
Branch: master

commit 3bada9a258913124ad98b53dd104abe53469d7e9
Author: Valeriy Ponomaryov <email address hidden>
Date: Thu Aug 14 21:29:10 2014 +0300

    Fix creation of cifs entry in cmode driver

    Cmode driver tries to create NetBIOS name in cifs server and fails, because
    this name should be unique, but driver did not use unique value for it.
    Also removed silent passing when cifs entry was not created.

    Change-Id: Ic05c7a0d2e6c544d06eb5f1e255c21083e5e6938
    Closes-Bug: #1356387
    Closes-Bug: #1356395

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
status: Fix Committed → Fix Released
Changed in manila:
milestone: none → juno-3
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers