attempting to delete a non existant flavor extra spec returns 204

Bug #1219445 reported by Christopher Yeoh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Jake Liu

Bug Description

Attempting to delete a non existant flavor extra spec returns 204 instead of 404

Tags: api
Jake Liu (jake-liu)
Changed in nova:
assignee: nobody → Jake Liu (jake-liu)
Revision history for this message
Jake Liu (jake-liu) wrote :

Hi Chris, there are two ways to fix this:

1) Directly change 204 to 404 in
@wsgi.response(404)
def delete(self, req, flavor_id, id):

2) Use

@wsgi.response(204)
@extensions.expected_errors(404)
def delete(self, req, flavor_id, id):

Solution 2) also needs to update DB api to make sure instance_type_extra_specs_delete throw excetion so as to let delete() catch the exception and throw HTTPNotFound.

Which one do you think is better? Thanks.

Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

Not sure about what you mean by the first, but the the second is the way I was thinking it should be fixed.

Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → Confirmed
milestone: none → havana-rc1
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/44771
Committed: http://github.com/openstack/nova/commit/be2018c9ddcfb830ca8a3b9b4ab0dbc60d6bb732
Submitter: Jenkins
Branch: master

commit be2018c9ddcfb830ca8a3b9b4ab0dbc60d6bb732
Author: Jake Liu <email address hidden>
Date: Mon Sep 2 18:18:17 2013 -0400

    delete a non existent flavor extra spec returns 204

    Attempting to delete a non existent flavor extra spec returns
    204 instead of 404, the fix was return 404 for such case.

    Fix bug 1219445

    Change-Id: I61db53486b5696fe74f16ac2d98971092137fadf

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-rc1 → 2013.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.