placement api root resource is only '/' not '' which can lead to unexpected 404s

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

Bug Description

The placement api handler for root is defined as matching '/'. This works fine in those situations where the requested URL actually includes the '/' but in some situations it can be easy to not include it. If, for example, the API is mounted under a prefix like '/placement' (as in the default devstack setup) then it is possible to make a request to http://example.com/placement and get a 404 whereas http://example.com/placement/ will get the expected microversion information.

This ought to be easy to fix and was basically an oversight.

Chris Dent (cdent)
Changed in nova:
assignee: nobody → Chris Dent (cdent)
Chris Dent (cdent)
Changed in nova:
status: New → Confirmed
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/374870

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit f21e7e33298a359f54e4eb5c7089a6a4f13537ee
Author: Chris Dent <email address hidden>
Date: Thu Sep 22 14:40:45 2016 +0000

    [placement] Allow both /placement and /placement/ to work

    When mounted under a prefix (such as /placement) the service was
    only returning the home document at /placement/ not /placement. In
    the context of having a prefix, we'd generally like the latter to
    work and for '/' to work when there is no prefix. This allows both.

    Note that this doesn't make /placement/resource_providers/ work, and
    we don't want that.

    Change-Id: I0ac92bf9982227d5f4915175182e5230aeb039b4
    Closes-Bug: #1626490

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.

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.