some api controllers generate URLs incorrectly

Bug #1468796 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Liusheng

Bug Description

There are a small number of places where API controller code creates URLs using pecan.request.host_url and it should be using pecan.request.application_url

Fixing this will allow ceilometer to be hosted with other apis on the same port, using a prefix, which is a goal for qa and usability in general.

Changed in ceilometer:
status: New → In Progress
Revision history for this message
shubham chitranshi (chitranshi-shubham) wrote :

there are two places
ceilometer/api/controllers/v2/resources.py
ceilometer/api/controllers/root.py

where this needs to be changed.
Can I take this bug..??

Revision history for this message
Chris Dent (cdent) wrote :
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → liberty-2
importance: Undecided → Medium
Changed in ceilometer:
assignee: Chris Dent (chdent) → Liusheng (liusheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/195670
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=7d8aae08e7fb90db153699ca0179c92072f9d3fb
Submitter: Jenkins
Branch: master

commit 7d8aae08e7fb90db153699ca0179c92072f9d3fb
Author: Chris Dent <email address hidden>
Date: Thu Jun 25 16:14:57 2015 +0000

    Make ceilometer work correctly when hosted with a SCRIPT_NAME

    In the past ceilometer was generaly hosted at / and URL generation
    was relatively straightforward. It should also be possible to host
    at /foobar or /telemetry and for URL generation to still work. This
    changeset adds tests to confirm prefixed requests can work and fixes
    the small number of issues that were found.

    Note that because the ceilometer api has the temerity to not set
    location headers, we can't test that those are working, because
    there aren't any. In general that's the place where SCRIPT_NAME
    mounting would show bugs.

    But we can confirm that content-location headers are okay.

    Closes-Bug: #1468796
    Change-Id: I6e5cf440bc3bd8ffb4cc5c86aa19225b3c5f87ed

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: liberty-2 → 5.0.0
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.