NetApp NFS driver: dst_img_local referenced before assignment

Bug #1309047 reported by Alex Meade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Alex Meade
Icehouse
Fix Released
Undecided
Andrew Kerr

Bug Description

There is an incorrect try statement in netapp/nfs.py where if an error occurs when performing copyoffload. The finally statement will raise an error that masks the original issue. Details:

"Copy offload workflow unsuccessful. local variable 'dst_img_local' referenced before assignment"

Instead, this try statement should only wrap the lines that require the cleanup in the finally block instead of wrapping the entire code block.

Alex Meade (alex-meade)
Changed in cinder:
status: New → In Progress
assignee: nobody → Alex Meade (alex-meade)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to cinder (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/88343
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=48a53d32ee243d80b034b38e292e9bfb4b66f881
Submitter: Jenkins
Branch: master

commit 48a53d32ee243d80b034b38e292e9bfb4b66f881
Author: Alex Meade <email address hidden>
Date: Thu Apr 17 11:42:05 2014 -0400

    NetApp NFS: Do not reference dst_img_local before assignment

    This patch moves the assignment of the dst_img_local variable to before the
    try/finally block that references it so that the finally block will have this
    variable no matter where in the try block an error is raised.

    Change-Id: Iab48b46559f18a3d6b044abe4bc3e615e7fee075
    Closes-Bug: 1309047

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → juno-1
status: Fix Committed → Fix Released
Revision history for this message
Bob Callaway (bob-callaway) wrote :

this should be backported into icehouse

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/119080

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/124030

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/icehouse)

Change abandoned by Andrew Kerr (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/119080
Reason: Replaced by https://review.openstack.org/124030

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/icehouse)

Reviewed: https://review.openstack.org/124030
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=db5a25d70d3fe085521c9d548a192177562befc1
Submitter: Jenkins
Branch: stable/icehouse

commit db5a25d70d3fe085521c9d548a192177562befc1
Author: Andrew Kerr <email address hidden>
Date: Thu Apr 17 11:42:05 2014 -0400

    NetApp NFS: Do not reference dst_img_local before assignment

    This patch moves the assignment of the dst_img_local variable to before the
    try/finally block that references it so that the finally block will have this
    variable no matter where in the try block an error is raised.

    Change-ID: Iab48b46559f18a3d6b044abe4bc3e615e7fee075
    Closes-Bug: 1309047
    (cherry-picked from commit 48a53d32ee243d80b034b38e292e9bfb4b66f881)

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-1 → 2014.2
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.