← Back to team overview

openstack team mailing list archive

Re: novaclient get error in ubuntu12.04

 

It is my mistake.

I miss "--auth_strategy=keystone" in nova.conf

now it works fine.

2012/4/7 livemoon <mwjpiero@xxxxxxxxx>

> I install package in ubunut12.04(beta).
>
> if I use "glance index", it works well.
>
> but if I use "nova list", it error. I think keystone should be work fine
> because glance can work.
>
> my novarc is:
>
> export NOVA_USERNAME=admin
> export NOVA_API_KEY=123456
> export NOVA_PROJECT_ID=admin
> export NOVA_URL=http://127.0.0.1:5000/v2.0/
> export NOVA_VERSION=1.1
> export NOVA_AUTH_STRATEGY=keystone
>
> How to fix it:
>
> root@controller:~# nova --debug list
> connect: (localhost, 5000)
> send: 'POST /v2.0/tokens HTTP/1.1\r\nHost:
> localhost:5000\r\nContent-Length: 104\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": "C1oudopen"}}}'
> reply: 'HTTP/1.1 200 OK\r\n'
> header: Content-Type: application/json
> header: Vary: X-Auth-Token
> header: Date: Sat, 07 Apr 2012 02:39:23 GMT
> header: Transfer-Encoding: chunked
> connect: (localhost, 8774)
> send: u'GET /v1.1/c27f71f1e40c4fb8bb920089ae628c78/servers/detail
> HTTP/1.1\r\nHost: localhost:8774\r\nx-auth-project-id:
> admin\r\nx-auth-token: b1dc15d79d1746a3adfd704bc8cc575f\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-cfb89c76-aadf-4c2a-92cc-ca9dc457ae04
> header: Date: Sat, 07 Apr 2012 02:39:23 GMT
> DEBUG (shell:416) Malformed request url (HTTP 400)
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 413, in
> main
> OpenStackComputeShell().main(sys.argv[1:])
> File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 364, in
> main
> args.func(self.cs, args)
> File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line
> 520, in do_list
> utils.print_list(cs.servers.list(search_opts=search_opts), columns,
> File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line
> 279, in list
> return self._list("/servers%s%s" % (detail, query_string), "servers")
> File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 71, in
> _list
> resp, body = self.api.client.get(url)
> File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 136, in
> get
> return self._cs_request(url, 'GET', **kwargs)
> File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 124, in
> _cs_request
> **kwargs)
> File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 107, in
> request
> raise exceptions.from_response(resp, body)
> BadRequest: Malformed request url (HTTP 400)
> ERROR: Malformed request url (HTTP 400)
>
> --
> 非淡薄无以明志,非宁静无以致远
>



-- 
非淡薄无以明志,非宁静无以致远

References