V1 and V2 APIs need to be started from the same script

Bug #1086381 reported by Doug Hellmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Wishlist
Angus Salkeld

Bug Description

We need the same script to start both the V1 and V2 APIs for ceilometer for backwards compatibility.

Tags: effort-l
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :
Nick Barcet (nijaba)
Changed in ceilometer:
status: New → Confirmed
importance: Undecided → Wishlist
Julien Danjou (jdanjou)
tags: added: effort-l
Revision history for this message
Angus Salkeld (asalkeld) wrote :

As far as a solution goes:

I was thinking of starting each in it's own greenthread (maybe use the service infrastructure) and v2 api listens
on the metering_port and the v1 api listens on metering_port+1. then the v2 api redirects all v1 requests to
the +1 port.

Any other suggestions?

Revision history for this message
Lianhao Lu (lianhao-lu) wrote :

How about applying wsme/pecan to v1 api? What's the effort compared to port redirection?

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

They are both wsgi apps with unique path prefixes. We just need to load them into a wsgi container like gunicorn or mod_wsgi. We should not build a new tool.

Revision history for this message
Angus Salkeld (asalkeld) wrote :

gunicorn looks good, in fedora and ubuntu.

Changed in ceilometer:
assignee: nobody → Angus Salkeld (asalkeld)
Revision history for this message
Angus Salkeld (asalkeld) wrote :

Any routes experts out there?
Almost there but need to make a generic route setup.

https://review.openstack.org/#/c/23147/

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

Reviewed: https://review.openstack.org/23147
Committed: http://github.com/openstack/ceilometer/commit/fa6bdc284ccd3af20839ea92f17caae465a63d82
Submitter: Jenkins
Branch: master

commit fa6bdc284ccd3af20839ea92f17caae465a63d82
Author: Angus Salkeld <email address hidden>
Date: Fri Mar 8 15:28:25 2013 +1100

    Start both v1 and v2 api from one daemon.

    - Move bin/ceilometer-api-v2 to bin/ceilometer-api
    - use VersionSelectorApplication() as the base application.

    bug #1086381
    Change-Id: Ia74938eb351fc374450932a91b21c0755afca2e5
    Signed-off-by: Angus Salkeld <email address hidden>

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: grizzly-rc1 → 2013.1
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.