Bug 860734 - Malformed cinder url
Malformed cinder url
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: openstack-cinder (Show other bugs)
18
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Pádraig Brady
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-26 11:21 EDT by Jaroslav Henner
Modified: 2014-02-05 07:20 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-05 07:20:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jaroslav Henner 2012-09-26 11:21:34 EDT
Description of problem:

Version-Release number of selected component (if applicable):
openstack-cinder-2012.2-0.5.rc1.fc18.noarch
python-cinder-2012.2-0.5.rc1.fc18.noarch
python-cinderclient-0.2.26-1.fc18.noarch


How reproducible:
Always

Steps to Reproduce:
1. cinder --debug list 
2.
3.
  
Actual results:
Following error message

Expected results:
No error


Additional info:
cinder --debug list 
connect: (127.0.0.1, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 127.0.0.1:5000\r\nContent-Length: 106\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "verybadpass"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Vary: X-Auth-Token
header: Content-Type: application/json
header: Date: Wed, 26 Sep 2012 15:11:14 GMT
header: Transfer-Encoding: chunked
connect: (localhost, 8776)
connect fail: (u'localhost', 8776)
connect: (localhost, 8776)
send: u'GET /v1/8e618b3c120949828e327484b17b5a63/volumes/detail HTTP/1.1\r\nHost: localhost:8776\r\nx-auth-project-id: admin\r\nx-auth-token: 15bf201da7bf4befacb6bc134da76d9a\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 65
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-Request-Id: req-04c251ba-7f67-4d0e-bafe-8d30fbf315ca
header: Date: Wed, 26 Sep 2012 15:11:14 GMT
DEBUG (shell:473) Malformed request url (HTTP 400) (Request-ID: req-04c251ba-7f67-4d0e-bafe-8d30fbf315ca)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cinderclient/shell.py", line 470, in main
    OpenStackCinderShell().main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/cinderclient/shell.py", line 421, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/cinderclient/v1/shell.py", line 139, in do_list
    volumes = cs.volumes.list(search_opts=search_opts)
  File "/usr/lib/python2.7/site-packages/cinderclient/v1/volumes.py", line 171, in list
    "volumes")
  File "/usr/lib/python2.7/site-packages/cinderclient/base.py", line 63, in _list
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 138, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 126, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 109, in request
    raise exceptions.from_response(resp, body)
BadRequest: Malformed request url (HTTP 400) (Request-ID: req-04c251ba-7f67-4d0e-bafe-8d30fbf315ca)
ERROR: Malformed request url (HTTP 400) (Request-ID: req-04c251ba-7f67-4d0e-bafe-8d30fbf315ca)
Comment 1 Jaroslav Henner 2012-09-26 11:36:50 EDT
[root@node-01 ~]# nova volume-list
ERROR: Malformed request url (HTTP 400) (Request-ID: req-3bcbf1b1-cbdf-4ccb-8f06-98dc2be6e83c)
[root@node-01 ~]# nova --debug volume-list

REQ: curl -i http://127.0.0.1:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "verybadpass"}}}'

connect: (127.0.0.1, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 127.0.0.1:5000\r\nContent-Length: 106\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "verybadpass"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Vary: X-Auth-Token
header: Content-Type: application/json
header: Date: Wed, 26 Sep 2012 15:33:26 GMT
header: Transfer-Encoding: chunked
RESP:{'date': 'Wed, 26 Sep 2012 15:33:26 GMT', 'transfer-encoding': 'chunked', 'status': '200', 'content-type': 'application/json', 'vary': 'X-Auth-Token'} {"access": {"token": {"expires": "2012-09-27T15:33:26Z", "id": "2bfadbff88a543559968285fe50784a0", "tenant": {"enabled": true, "description": null, "name": "admin", "id": "8e618b3c120949828e327484b17b5a63"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://localhost:8776/v1/8e618b3c120949828e327484b17b5a63", "region": "RegionOne", "internalURL": "http://localhost:8776/v1/8e618b3c120949828e327484b17b5a63", "id": "341a8a023ad34bd4ae7ef7b16898bea9", "publicURL": "http://localhost:8776/v1/8e618b3c120949828e327484b17b5a63"}], "endpoints_links": [], "type": "volume", "name": "nova-volume"}, {"endpoints": [{"adminURL": "http://localhost:9292/v1", "region": "RegionOne", "internalURL": "http://localhost:9292/v1", "id": "e657f0867ffd42c59ff8c80e0d205f05", "publicURL": "http://localhost:9292/v1"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://localhost:8774/v1.1/8e618b3c120949828e327484b17b5a63", "region": "RegionOne", "internalURL": "http://localhost:8774/v1.1/8e618b3c120949828e327484b17b5a63", "id": "0a334d73d32b4f9887e08702d00404a6", "publicURL": "http://localhost:8774/v1.1/8e618b3c120949828e327484b17b5a63"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://localhost:8773/services/Admin", "region": "RegionOne", "internalURL": "http://localhost:8773/services/Cloud", "id": "ba881dbb37894a58b760e52ec34aadd7", "publicURL": "http://localhost:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://localhost:35357/v2.0", "region": "RegionOne", "internalURL": "http://localhost:35357/v2.0", "id": "4badfc4b88114482905f5bbbd92a954c", "publicURL": "http://localhost:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "2e37568b0900407e9bd2b4b99391f2af", "roles": [{"name": "admin"}, {"name": "KeystoneAdmin"}, {"name": "KeystoneServiceAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["526f95b16bc74f77aa2acadb3b447586", "5b259ee25de84102a6abcb42112e8248", "141218fd7f4d4c5bb28fb5559d7267f0"]}}}


REQ: curl -i http://localhost:8776/v1/8e618b3c120949828e327484b17b5a63/volumes/detail -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 2bfadbff88a543559968285fe50784a0"

connect: (localhost, 8776)
connect fail: (u'localhost', 8776)
connect: (localhost, 8776)
send: u'GET /v1/8e618b3c120949828e327484b17b5a63/volumes/detail HTTP/1.1\r\nHost: localhost:8776\r\nx-auth-project-id: admin\r\nx-auth-token: 2bfadbff88a543559968285fe50784a0\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 65
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-Request-Id: req-4a327f77-5273-492d-a892-7603e0f17774
header: Date: Wed, 26 Sep 2012 15:33:26 GMT
RESP:{'date': 'Wed, 26 Sep 2012 15:33:26 GMT', 'status': '400', 'content-length': '65', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-4a327f77-5273-492d-a892-7603e0f17774'} {"badRequest": {"message": "Malformed request url", "code": 400}}

DEBUG (shell:534) Malformed request url (HTTP 400) (Request-ID: req-4a327f77-5273-492d-a892-7603e0f17774)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 531, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 467, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v1_1/shell.py", line 1086, in do_volume_list
    volumes = cs.volumes.list()
  File "/usr/lib/python2.7/site-packages/novaclient/v1_1/volumes.py", line 86, in list
    return self._list("/volumes/detail", "volumes")
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 62, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 239, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 226, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 208, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 202, in request
    raise exceptions.from_response(resp, body)
BadRequest: Malformed request url (HTTP 400) (Request-ID: req-4a327f77-5273-492d-a892-7603e0f17774)
ERROR: Malformed request url (HTTP 400) (Request-ID: req-4a327f77-5273-492d-a892-7603e0f17774)
Comment 2 Jaroslav Henner 2012-09-27 15:42:47 EDT
I may have configured something wrong, so I followed the instruction from the TestDay again and now it works like charm:

cinder create --display_name vol-00000001 5
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                cinder                |
|      created_at     |      2012-09-27T19:41:08.131331      |
| display_description |                 None                 |
|     display_name    |             vol-00000001             |
|          id         | 914e9e13-9607-441e-9689-71622fe4e8c1 |
|       metadata      |                  {}                  |
|         size        |                  5                   |
|     snapshot_id     |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+
Comment 3 Fedora End Of Life 2013-12-21 03:57:38 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Fedora End Of Life 2014-02-05 07:20:19 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.