novaclient wrapper incorrectly handles exceptions

Bug #1530811 reported by Valeriy Ponomaryov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Valeriy Ponomaryov

Bug Description

If Novaclient returns exception, then manila wrapper for novaclient fails with following error:

 File "/opt/stack/new/manila/manila/compute/nova.py", line 160, in wrapper
     return res
 ERROR oslo_messaging.rpc.dispatcher UnboundLocalError: local variable 'res' referenced before assignment

link: http://logs.openstack.org/83/261183/4/check/gate-manila-tempest-dsvm-neutron-no-share-servers-multibackend/caac355/logs/screen-m-shr.txt.gz?level=TRACE#_2016-01-04_08_53_26_056

code: https://github.com/openstack/manila/blob/8247f350/manila/compute/nova.py#L160

Changed in manila:
status: New → In Progress
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
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/263207

Changed in manila:
importance: Undecided → Low
milestone: none → mitaka-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/263207
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=95940a4085b1800277baeb7467fa06e96936734c
Submitter: Jenkins
Branch: master

commit 95940a4085b1800277baeb7467fa06e96936734c
Author: vponomaryov <email address hidden>
Date: Mon Jan 4 12:46:03 2016 +0200

    Fix handling of Novaclient exceptions

    If Novaclient returns exception, then Manila wrapper for Novaclient
    fails with following error:

    File "/opt/stack/new/manila/manila/compute/nova.py", line 160, in wrapper
        return res
    UnboundLocalError: local variable 'res' referenced before assignment

    So, fix it and cover with unit tests.

    Change-Id: I5eec4b9e9f3857307daa2ade516f76c044c01631
    Closes-Bug: #1530811

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

This issue was fixed in the openstack/manila 2.0.0.0b2 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.