share does not have share_server_id if share-server creation failed

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

Bug Description

If for some reason share server was not created and fell to 'ERROR' state, then share will not get share-server-id. We should know what server was expected to be used with each share.

Expected behaviour: if share is being created with multitenant driver it must have share-server-id, even if share server creation failed.

----------------------------------------------------------------

log from m-shr:

2014-08-04 11:39:12.221 ERROR oslo.messaging.rpc.dispatcher [req-55d72d46-cf24-4ab5-bd6d-ce15893afff1 082852b11b824b7685a684f0b7de26cd 604fd09cf1f14e009333a3965b7cb39d] Exception during message handling: Share server not found.
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-08-04 11:39:12.221 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-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-08-04 11:39:12.221 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-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 231, in delete_share
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher {'status': 'error_deleting'})
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/openstack/common/excutils.py", line 82, in __exit__
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 227, in delete_share
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher share_server=share_server)
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/generic.py", line 85, in wrap
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher raise exception.ManilaException(_('Share server not found.'))
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher ManilaException: Share server not found.
2014-08-04 11:39:12.221 TRACE oslo.messaging.rpc.dispatcher
2014-08-04 11:39:12.222 ERROR oslo.messaging._drivers.common [req-55d72d46-cf24-4ab5-bd6d-ce15893afff1 082852b11b824b7685a684f0b7de26cd 604fd09cf1f14e009333a3965b7cb39d] Returning exception Share server not found. to caller
2014-08-04 11:39:12.222 ERROR oslo.messaging._drivers.common [req-55d72d46-cf24-4ab5-bd6d-ce15893afff1 082852b11b824b7685a684f0b7de26cd 604fd09cf1f14e009333a3965b7cb39d] ['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 231, in delete_share\n {\'status\': \'error_deleting\'})\n', ' File "/opt/stack/manila/manila/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/opt/stack/manila/manila/share/manager.py", line 227, in delete_share\n share_server=share_server)\n', ' File "/opt/stack/manila/manila/share/drivers/generic.py", line 85, in wrap\n raise exception.ManilaException(_(\'Share server not found.\'))\n', 'ManilaException: Share server not found.\n']

----------------------------------------------------------------

DB:
mysql> select id, share_server_id, status from shares;
+--------------------------------------+--------------------------------------+----------------+
| id | share_server_id | status |
+--------------------------------------+--------------------------------------+----------------+
| bb6b1425-e7d7-4ed5-ba23-5687f2bc3da2 | 8a7cae32-5c26-4f1e-a403-d274fabb14e9 | available |
| ef216b94-3ad2-4763-a671-2164c4ed058f | NULL | error_deleting |
+--------------------------------------+--------------------------------------+----------------+

----------------------------------------------------------------

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

Reviewed: https://review.openstack.org/111788
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=82d30f625a9afc92acd6fa4029dc6fee6b9e6737
Submitter: Jenkins
Branch: master

commit 82d30f625a9afc92acd6fa4029dc6fee6b9e6737
Author: vponomaryov <email address hidden>
Date: Thu Aug 7 13:26:31 2014 +0300

    Fix update of share with share-server-id

    If for some reason share server was not created and fell to 'ERROR' state, then
    share will not get share-server-id. We should know what server was expected
    to be used with each share.

    Change-Id: I967a48481b79c9e80eb57806fc103704db209bb4
    Closes-Bug: #1352424

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