Errors are not handled correctly during image updates

Bug #1464991 reported by Kirill Zaitsev
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Kirill Zaitsev
Kilo
Fix Released
Undecided
Unassigned

Bug Description

To reproduce:

Log in to horizon as unprivileged user. Navigate to image editing, try to mark an image as public.

Observed result: an error message, stating: Danger: There was an error submitting the form. Please try again.
Logs indicate, that an UnboundLocalError occurrs

  File "/Users/teferi/murano/horizon/openstack_dashboard/api/glance.py", line 129, in image_update
    return image
UnboundLocalError: local variable 'image' referenced before assignment

This is because image variable is not handled correctly in image_update function.

Changed in horizon:
assignee: nobody → Kirill Zaitsev (kzaitsev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
importance: Undecided → Medium
milestone: none → liberty-1
Matthias Runge (mrunge)
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/194614

Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/kilo)

Reviewed: https://review.openstack.org/194614
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=1e84c93dc8e611ddebebff24bd782a802f000e6f
Submitter: Jenkins
Branch: stable/kilo

commit 1e84c93dc8e611ddebebff24bd782a802f000e6f
Author: Kirill Zaitsev <email address hidden>
Date: Sun Jun 14 14:02:27 2015 +0300

    Handle errors during glance image updates correctly

    Before an UnboundLocalError would occur in case an error would happen
    during image updates, because of incorrect referencing of a variable.
    Moreover the error was muted by exceptions.handle with ignore=True,
    and could result in an incorrect success message.
    This change removes references to unused image variable and allows
    exceptions to be handled by the function, that calls image_update.

    Change-Id: I35ea98a146690565582dd9beea62941f97d32474
    Closes-Bug: #1464991
    (cherry picked from commit 7eb4e3595c5a30f95d976ea84493453730f3c806)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-1 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.