[v2] Duplicate image id return 500 instead of 409

Bug #1366503 reported by Feilong Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Feilong Wang

Bug Description

Duplicate image id will return HTTP 500 error instead of 409 in Glance V2 API, see https://review.openstack.org/#/c/119285/1,publish

Feilong Wang (flwang)
Changed in glance:
importance: Undecided → Medium
assignee: nobody → Fei Long Wang (flwang)
Feilong Wang (flwang)
Changed in glance:
status: New → Triaged
Revision history for this message
Feilong Wang (flwang) wrote :

After investigation, I think there are two bugs about this. The first one is we're using **id** in image schema but using **image_id** in new_image and most of the functions. It will cause a key error since the id can't recognized. I will open another bug to track this. The second bug is the image id duplicate exception is not catched in https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L59

Changed in glance:
importance: Medium → High
Feilong Wang (flwang)
Changed in glance:
importance: High → Medium
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/119613

Changed in glance:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

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

commit 62ae4650b7a14e8f8cac95733d7bf190f034a317
Author: Fei Long Wang <email address hidden>
Date: Tue Sep 9 11:29:50 2014 +1200

    Duplicated image id return 409 instead of 500 in API v2

    Based on current code, in API v2 duplicated image id will
    return HTTP 500 error instead of 409. This patch fix this
    issue and add an unit test case for that.

    Closes-Bug: 1366503

    Change-Id: Ia6c27f9edffd63619d63013e456072d811daf127

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