← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1567620] Re: Scripts requesting v3 get multiple choices with bad URLs

 

It seems that you've created a report for the same  issue twice, I'm
closing this one and not the one at
https://bugs.launchpad.net/nova/+bug/1567621 because someone has
declared themselves as being affected for that one.

** Changed in: nova
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1567620

Title:
  Scripts requesting v3 get multiple choices with bad URLs

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  Description
  ===========

  We have an old script which was requesting http://<nova-ip>:8774/v3
  and received a 300 multiple choices, the response body looks like this
  though:

  {"choices": [{"status": "SUPPORTED", "media-types": [{"base":
  "application/json", "type":
  "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0",
  "l│inks": [{"href": "http://127.0.0.1:8774/v2/v3";, "rel": "self"}]},
  {"status": "CURRENT", "media-types": [{"base": "application/json",
  "type": "application/vnd.op│enstack.compute+json;version=2.1"}], "id":
  "v2.1", "links": [{"href": "http://127.0.0.1:8774/v2.1/v3";, "rel":
  "self"}]}]}

  This actually will work with anything after /, e.g., http://<nova-
  ip>:8774/asd

  {"choices": [{"status": "SUPPORTED", "media-types": [{"base":
  "application/json", "type":
  "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0",
  "l│inks": [{"href": "http://127.0.0.1:8774/v2/asd";, "rel": "self"}]},
  {"status": "CURRENT", "media-types": [{"base": "application/json",
  "type": "application/vnd.o│penstack.compute+json;version=2.1"}], "id":
  "v2.1", "links": [{"href": "http://127.0.0.1:8774/v2.1/asd";, "rel":
  "self"}]}]}

  Steps to reproduce
  ==================
  A chronological list of steps which will bring off the
  issue you noticed:
  * I upgraded Kilo to Liberty
  * then I made a request to http://<nova-ip>:8774/v3
  * then I saw a response body like above

  Example code:

      import requests

      r = requests.get('http://<nova-ip>:8774/v3')
      print(r.status_code)
      print(r.content)

  Alternatively,

      curl -i http://<nova-ip>:8774/v3

  Expected result
  ===============

  I would have expected to see a response like:

  {"choices": [{"status": "SUPPORTED", "media-types": [{"base":
  "application/json", "type":
  "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0",
  "l│inks": [{"href": "http://127.0.0.1:8774/v2";, "rel": "self"}]},
  {"status": "CURRENT", "media-types": [{"base": "application/json",
  "type": "application/vnd.op│enstack.compute+json;version=2.1"}], "id":
  "v2.1", "links": [{"href": "http://127.0.0.1:8774/v2.1";, "rel":
  "self"}]}]}

  E.g., http://127.0.0.1:8774/v2.1 instead of
  http://127.0.0.1:8774/v2.1/v3

  Actual result
  =============

  As described above

  Environment
  ===========
  1. Version: 3f217a441af6595cb2a240ab72133aff133504b6 (stable/liberty)

  2. Which hypervisor did you use?
      Unrelated

  2. Which storage type did you use?
      Unrelated

  3. Which networking type did you use?
      Unrelated

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1567620/+subscriptions


References