Glance v2 api can not set or delete a property of a image when the value of the property is an empty string

Bug #1332103 reported by Hua Wang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Zhi Yan Liu

Bug Description

Glance v2 api can not set or delete a property of a image when the value of the property is an empty string.

__delitem__ and __setitem__ methods of ExtraPropertiesProxy class in glance/api/property_protections.py may have some problems. When the value of a property is an empty string, the methods will raise KeyError.

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

I can reproduce this issue only if property protection feature enabled.

Changed in glance:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :
Changed in glance:
assignee: nobody → Zhi Yan Liu (lzy-dev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Zhi Yan Liu (<email address hidden>) on branch: master
Review: https://review.openstack.org/101425

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :
Revision history for this message
Henrique Truta (henriquetruta) wrote :

Are you still working on this?

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

Reviewed: https://review.openstack.org/101426
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=fe172d61145ce2cca388f880806b7cf3a6cae6c5
Submitter: Jenkins
Branch: master

commit fe172d61145ce2cca388f880806b7cf3a6cae6c5
Author: Zhi Yan Liu <email address hidden>
Date: Fri Jun 20 14:10:10 2014 +0800

    Fixes the failure of updating or deleting image empty property

    When property protection feature enabled, end user couldn't uses
    Glance v2 API to update or delete a property of an image successfully
    which value is empty, client will receive a http 500 error and a
    relevant error log could be found in glance-api service log.

    Closes-bug: #1332103

    Change-Id: I1f9f181cea714e6ba26388d125bb7023e7a14305
    Signed-off-by: Zhi Yan Liu <email address hidden>

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: juno-3 → 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.