root@controller ~]# vi /etc/nova/nova.conf
……
[keystone_authtoken]
auth_uri = http://controller:5000
auth_host = controller
auth_protocol = http
auth_port = 35357
identity_uri = http://controller:35357
admin_user = nova
admin_tenant_name = service
admin_password = NOVA_PASS
安装上面设置后
tail /var/log/nova/api.log
2015-03-19 09:33:37.514 570 WARNING keystoneclient.middleware.auth_token [-] Unexpected response from keystone service: {u'error': {u'message': u'The resource could not be found.', u'code': 404, u'title': u'Not Found'}}
2015-03-19 09:33:37.515 570 WARNING keystoneclient.middleware.auth_token [-] Authorization failed for token
2015-03-19 09:33:37.519 563 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers
[root@controller ~]# nova --debug list
......
REQ: curl -i 'http://controller:8774/v2/9b807b0dd7de4bba87c3e4704d9fa5e9/servers/detail' -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: e0b3b0758a854bdc853cad4469cc31ce"
INFO (connectionpool:203) Starting new HTTP connection (1): controller
DEBUG (connectionpool:295) "GET /v2/9b807b0dd7de4bba87c3e4704d9fa5e9/servers/detail HTTP/1.1" 401 23
RESP: [401] {'date': 'Thu, 19 Mar 2015 01:36:43 GMT', 'content-length': '23', 'content-type': 'text/plain', 'www-authenticate': "Keystone uri='http://controller:5000'"}
RESP BODY: Authentication required
DEBUG (shell:783) Unauthorized (HTTP 401)
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 780, in main
OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 716, in main
args.func(self.cs, args)
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 1138, in do_list
search_opts=search_opts)
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/servers.py", line 583, in list
return self._list("/servers%s%s" % (detail, query_string), "servers")
File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 64, in _list
_resp, body = self.api.client.get(url)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 309, in get
return self._cs_request(url, 'GET', **kwargs)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 301, in _cs_request
raise e
Unauthorized: Unauthorized (HTTP 401)
ERROR: Unauthorized (HTTP 401)
为什么这个nova这个用户不行呀,是不是过期了,如何检查这个用户
大家帮帮忙,自己是新手,实在着急
|