in placement api, 404 response do not indicate what was not found

Bug #1634115 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Ed Leafe

Bug Description

In Placement api v1.0 some 404 response codes are directly the result of NotFound exception being raised from nova.objects.resource_provider without a message. This leads to the 404 response not including any indication of what was not found (other than the URL). This can be made more friendly and informative.

Tags: placement
Changed in nova:
assignee: nobody → Pushkar Umaranikar (pushkar-umaranikar)
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/387674

Changed in nova:
status: Triaged → In Progress
Changed in nova:
assignee: Pushkar Umaranikar (pushkar-umaranikar) → Ed Leafe (ed-leafe)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/387674
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f87af91d90f8f1322e92f9bc4d198a83162bb118
Submitter: Jenkins
Branch: master

commit f87af91d90f8f1322e92f9bc4d198a83162bb118
Author: Pushkar Umaranikar <email address hidden>
Date: Mon Oct 17 20:42:43 2016 +0000

    Placement api: 404 response do not indicate what was not found

    Add informative messages to the 404 error response from
    nova/objects/resource_provider.py

    For the method _update_inventory_in_db() from resource_provider.py,
    gabbi test validation is not added since it is not being used and
    from the placement API you create an inventory but then call
    set_inventory or add_inventory on a resource_provider.

    Similar change, i.e. adding informative messages to 404 error can be
    done for api tests from inventory.yaml and usage.yaml

    It includes adding informative logging in code for 404 exceptions and
    adding gabbi tests for those.
    This can be done in follow up patch.

    Change-Id: If53f84ac5f7521e9926b97bdcce3cf77ec5b4ffd
    Closes-Bug: #1634115

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b1

This issue was fixed in the openstack/nova 15.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/392321
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6a422d23e7330ae51a37f899adc9c73596f0dca0
Submitter: Jenkins
Branch: master

commit 6a422d23e7330ae51a37f899adc9c73596f0dca0
Author: Pushkar Umaranikar <email address hidden>
Date: Tue Nov 1 21:49:19 2016 +0000

    Placement api: Add informative message to 404 response.

    Add informative messages to the 404 error response from
    inventory.py and usage.py

    This change also includes adding/altering existing Gabbi tests
    for 404 response and add resonse_strings validation checks for
    that.

    Change-Id: Ica46a5479dec06b035f8b43d6738e9d124f6ae37
    Related-Bug: #1634115

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.