nova volume-list ERROR: Bad request (HTTP 400)

Asked by weihongj on 2013-01-09

I follow the official document to install my openstack env. nova-volume installed on the controller node, when trying to run comment nova volume-list, but got error like:ERROR: Bad request (HTTP 400)
Following is the out with --debug:
[root@skcm5-svm nova]# nova --debug volume-list

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

connect: (192.168.88.17, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 192.168.88.17:5000\r\nContent-Length: 113\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
send: '{"auth": {"tenantName": "openstackDemo", "passwordCredentials": {"username": "admin", "password": "secretword"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Vary: X-Auth-Token
header: Content-Type: application/json
header: Content-Length: 2456
header: Date: Wed, 09 Jan 2013 12:38:24 GMT
RESP:{'date': 'Wed, 09 Jan 2013 12:38:24 GMT', 'vary': 'X-Auth-Token', 'content-length': '2456', 'status': '200', 'content-type': 'application/json'} {"access": {"token": {"expires": "2013-01-10T12:38:24Z", "id": "8cf69b66b8ea49bda6980ef5078d3e19", "tenant": {"enabled": true, "description": "Default Tenant", "name": "openstackDemo", "id": "53740c8a0e964bc798ccc5eed0698f01"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://192.168.88.17:8774/v2/53740c8a0e964bc798ccc5eed0698f01", "region": "RegionOne", "internalURL": "http://192.168.88.17:8774/v2/53740c8a0e964bc798ccc5eed0698f01", "id": "590792816d5340edbedc49f208eddb00", "publicURL": "http://192.168.88.17:8774/v2/53740c8a0e964bc798ccc5eed0698f01"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://192.168.88.17:9292/v1", "region": "RegionOne", "internalURL": "http://192.168.88.17:9292/v1", "id": "e1f4365f5f014c04bf6d3c8a326104ff", "publicURL": "http://192.168.88.17:9292/v1"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://192.168.88.17:8776/v1/53740c8a0e964bc798ccc5eed0698f01", "region": "RegionOne", "internalURL": "http://192.168.88.17:8776/v1/53740c8a0e964bc798ccc5eed0698f01", "id": "f8d4b02461ba425890c5baf3f55cabc0", "publicURL": "http://192.168.88.17:8776/v1/53740c8a0e964bc798ccc5eed0698f01"}], "endpoints_links": [], "type": "volume", "name": "volume"}, {"endpoints": [{"adminURL": "http://192.168.88.17:8773/services/Admin", "region": "RegionOne", "internalURL": "http://192.168.88.17:8773/services/Cloud", "id": "da2ff145e7ec47318092eaa6623f06da", "publicURL": "http://192.168.88.17:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://192.168.88.17:8888/v1", "region": "RegionOne", "internalURL": "http://192.168.88.17:8888/v1/AUTH_53740c8a0e964bc798ccc5eed0698f01", "id": "cb0f436025bf4e15b81b6d38bd9dcb5f", "publicURL": "http://192.168.88.17:8888/v1/AUTH_53740c8a0e964bc798ccc5eed0698f01"}], "endpoints_links": [], "type": "object-store", "name": "swift"}, {"endpoints": [{"adminURL": "http://192.168.88.17:35357/v2.0", "region": "RegionOne", "internalURL": "http://192.168.88.17:5000/v2.0", "id": "1929ed84589749e0929095233bfad27e", "publicURL": "http://192.168.88.17:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "8f3eff6d15de4b43b73222705a1cc559", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["22ffb0ef3f5d42098e51ee4a997c7d87"]}}}

REQ: curl -i http://192.168.88.17:8776/v1/53740c8a0e964bc798ccc5eed0698f01/volumes/detail -X GET -H "X-Auth-Project-Id: openstackDemo" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 8cf69b66b8ea49bda6980ef5078d3e19"

connect: (192.168.88.17, 8776)
send: u'GET /v1/53740c8a0e964bc798ccc5eed0698f01/volumes/detail HTTP/1.1\r\nHost: 192.168.88.17:8776\r\nx-auth-project-id: openstackDemo\r\nx-auth-token: 8cf69b66b8ea49bda6980ef5078d3e19\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: ''
connect: (192.168.88.17, 8776)
send: u'GET /v1/53740c8a0e964bc798ccc5eed0698f01/volumes/detail HTTP/1.1\r\nHost: 192.168.88.17:8776\r\nx-auth-project-id: openstackDemo\r\nx-auth-token: 8cf69b66b8ea49bda6980ef5078d3e19\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: ''
RESP:{'status': '400', 'content-length': 0, 'content-type': 'text/plain'}

DEBUG (shell:534) Bad request (HTTP 400)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 531, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 467, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 1099, in do_volume_list
    volumes = cs.volumes.list(search_opts=search_opts)
  File "/usr/lib/python2.6/site-packages/novaclient/v1_1/volumes.py", line 94, in list
    return self._list("/volumes/detail%s" % query_string, "volumes")
  File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 62, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 239, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 226, in _cs_request
    **kwargs)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 208, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 202, in request
    raise exceptions.from_response(resp, body)
BadRequest: Bad request (HTTP 400)
ERROR: Bad request (HTTP 400)

env for keystone:
export OS_USERNAME=admin
export OS_TENANT_NAME=openstackDemo
export OS_PASSWORD=secretword
export OS_AUTH_URL=http://192.168.88.17:5000/v2.0/
export OS_REGION_NAME=RegionOne

nova service run with keystone authentication.

anyone can help me?

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
2013-01-09
Last reply:
2013-01-11
Keith Tobin (keith-tobin) said : #1

I had a look at the log info you posted, as you will have seeing, you are getting a auth token from keystone just fine, then the request is sent to cinder, here it fails, giving you a 400. Can you post the cinder logs, depending on config the should be in /var/log/cinder/ and also make sure that debug is set to true in cinder config before log is created.

Can you help with this problem?

Provide an answer of your own, or ask weihongj for more information if necessary.

To post a message you must log in.