retry for manage share fails with an API error

Bug #1565903 reported by Yogesh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Goutham Pacha Ravi

Bug Description

Here are the steps -
1. Manage a share with invalid share_type
2. The share should result in "manage_error" state.
3. Now, try to manage the same share with valid share_type.

Expected Result - Share should be managed successfully.
Actual Result - An API error is raised -

KeyError - 'host

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :
Download full text (7.9 KiB)

se use appropriate property from share instance.
2016-04-04 11:55:49.608 DEBUG manila.share.api [req-f87d56c7-5af3-41c3-b7ad-2ce25876e606 f06ded8c557346bf9f3c255fe8793e96 707aa4f9804549ae828200b0c53816e9] Manage: Found shares 1. from (pid=20162) manage
/opt/stack/manila/manila/share/api.py:527
2016-04-04 11:55:49.726 CRITICAL manila.share.api [req-f87d56c7-5af3-41c3-b7ad-2ce25876e606 f06ded8c557346bf9f3c255fe8793e96 707aa4f9804549ae828200b0c53816e9] {'share_type_id': u'98badc75-55bd-4dc8-87e3-f
53ae01867c7', 'display_name': None, 'user_id': u'f06ded8c557346bf9f3c255fe8793e96', 'replication_type': u'dr', 'share_proto': u'NFS', 'display_description': None, 'is_public': False, 'project_id': u'707aa
4f9804549ae828200b0c53816e9', 'snapshot_support': True}
2016-04-04 11:55:49.727 ERROR manila.api.middleware.fault [req-f87d56c7-5af3-41c3-b7ad-2ce25876e606 f06ded8c557346bf9f3c255fe8793e96 707aa4f9804549ae828200b0c53816e9] Caught error: 'host'
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault Traceback (most recent call last):
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/opt/stack/manila/manila/api/middleware/fault.py", line 73, in __call__
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault return req.get_response(self.application)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1317, in send
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault application, catch_exc_info=False)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1281, in call_application
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault app_iter = application(self.environ, start_response)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault resp = self.call_func(req, *args, **self.kwargs)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault return self.func(req, *args, **kwargs)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/oslo_middleware/base.py", line 114, in __call__
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault response = req.get_response(self.application)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1317, in send
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault application, catch_exc_info=False)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1281, in call_application
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault app_iter = application(self.environ, start_response)
2016-04-04 11:55:49.727 TRACE manila.api.middleware.fault File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __cal...

Read more...

Changed in manila:
status: New → Confirmed
Yogesh (ykshirsa)
Changed in manila:
assignee: nobody → Yogesh (ykshirsa)
tags: added: low-hanging-fruit
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/301962

Changed in manila:
assignee: Yogesh (ykshirsa) → Goutham Pacha Ravi (gouthamr)
status: Confirmed → In Progress
Changed in manila:
assignee: Goutham Pacha Ravi (gouthamr) → Yogesh (ykshirsa)
Changed in manila:
assignee: Yogesh (ykshirsa) → Goutham Pacha Ravi (gouthamr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/301962
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=53364e07a3c3da8dc51bb9d8733f42e82e6f82e0
Submitter: Jenkins
Branch: master

commit 53364e07a3c3da8dc51bb9d8733f42e82e6f82e0
Author: yogesh <email address hidden>
Date: Thu Mar 24 17:36:36 2016 -0400

    Handle manage/unmanage for replicated shares

    Managing a share with a share type that has replication_type
    extra_spec must be allowed. Drivers are expected to fail
    this operation if the share was part of a replication relationship
    that Manila does not know about.

    Unmanaging a share with replicas must not be permitted
    until all replicas are removed.

    Managing and unmanaging of snapshots must not
    be permitted for a share that has replicas.

    Modify the NetApp driver for manage_existing to check
    for existing replicas.

    Also fix issue with manage retry where the share
    data was being altered inappropriately by a DB API.

    Closes-Bug: #1561641
    Closes-Bug: #1565903

    Co-Authored-By: Goutham Pacha Ravi <email address hidden>

    Change-Id: I82f1fef1e30114e017efd00fa7da70aceecab94c

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 3.0.0.0b1

This issue was fixed in the openstack/manila 3.0.0.0b1 development milestone.

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.