OpenStack API returning blank endpoints

Bug #741972 reported by Mike Mayo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Nikhil Komawar

Bug Description

When you auth with the OS API, you get endpoints back in the headers, such as X-Server-Management-Url. If an endpoint doesn't exist you still get it, such as a blank X-Storage-Url and X-Cdn-Management-Url

Revision history for this message
Thierry Carrez (ttx) wrote :

What does the published API say about that ?
- that it should be returning empty strings ? (so you ask for change in API)
- that it should not return headers ? (so this is a bug)
- nothing at all ? (so you ask for a change in default behavior)

Changed in nova:
status: New → Incomplete
Revision history for this message
Mike Mayo (mike-mayo) wrote :

Good question. I looked over the spec and couldn't find anything about this topic.

So I'm proposing we change the default behavior to only return an endpoint header if it actually exists. Or at the very least, document that you may get a blank one back. That said, I think not returning the header at all is smarter since I imagine some people will want to run OpenStack for only a subset of services, which could one day mean some people are looking at a lot of blank headers.

Revision history for this message
Thierry Carrez (ttx) wrote :

A bit concerned about changing this behavior after FeatureFreeze, but I guess letting a release pass without deciding might not be better.

Changed in nova:
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Revision history for this message
Mark McLoughlin (markmc) wrote :

Ok, so this is just a question of removing these lines:

            res.headers['X-Storage-Url'] = ''
            res.headers['X-CDN-Management-Url'] = ''

and perhaps checking token before doing:

            res.headers['X-Storage-Url'] = token['storage_url']
            res.headers['X-CDN-Management-Url'] = token['cdn_management_url']

Sounds reasonable to me

tags: added: low-hanging-fruit osapi
Changed in nova:
assignee: nobody → nikhil komawar (nikhil-komawar)
Alex Meade (alex-meade)
Changed in nova:
status: Confirmed → In Progress
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/3830

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

Reviewed: https://review.openstack.org/3830
Committed: http://github.com/openstack/nova/commit/95771cf112128f5f22a6a5e2e1e0e2d251f29e53
Submitter: Jenkins
Branch: master

commit 95771cf112128f5f22a6a5e2e1e0e2d251f29e53
Author: Nikhil Komawar <email address hidden>
Date: Mon Feb 6 22:56:20 2012 +0000

    dont show blank endpoint headers

    fixes bug: 741972

    Change-Id: I4a661a13c5baaa79ee647a6c1cedcef29a2642f6

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.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.