python-novalicent==2.6.10 returns authentication failure when using correct credentials.
log says:
=======================================================================================
DEBUG:__main__:ACTION: authenticating against nova
DEBUG:novaclient.client:REQ: curl -i https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient"
DEBUG:novaclient.client:REQ BODY: {"auth": {"tenantName": "<email address hidden>", "passwordCredentials": {"username": "<email address hidden>", "password": "xxxxxxxxx"}}}
DEBUG:novaclient.client:RESP:{'status': '403', 'content-length': '96', 'server': 'Apache-Coyote/1.1', 'date': 'Fri, 20 Jul 2012 21:05:57 GMT', 'nncoection': 'close', 'content-type': 'application/json;charset=UTF-8'} {"forbidden":{"message":"Full authentication is required to access this resource","code":403}}
ERROR:__main__:ERROR: volume check failed
Traceback (most recent call last):
File "bock.py", line 128, in bock_health
self.NOVA.authenticate()
File "/home/ubuntu/.venv/local/lib/python2.7/site-packages/novaclient/v1_1/client.py", line 125, in authenticate
self.client.authenticate()
File "/home/ubuntu/.venv/local/lib/python2.7/site-packages/novaclient/client.py", line 276, in authenticate
auth_url = self._v2_auth(auth_url)
File "/home/ubuntu/.venv/local/lib/python2.7/site-packages/novaclient/client.py", line 344, in _v2_auth
self._authenticate(url, body)
File "/home/ubuntu/.venv/local/lib/python2.7/site-packages/novaclient/client.py", line 365, in _authenticate
resp, body = self._time_request(token_url, "POST", body=body)
File "/home/ubuntu/.venv/local/lib/python2.7/site-packages/novaclient/client.py", line 135, in _time_request
resp, body = self.request(url, method, **kwargs)
File "/home/ubuntu/.venv/local/lib/python2.7/site-packages/novaclient/client.py", line 129, in request
raise exceptions.from_response(resp, body)
Forbidden: Full authentication is required to access this resource (HTTP 403)
=====================================================================================
here is the pip patch for problematic authentication:
(.venv)ubuntu@db19f47c-e3e5-4099-840f-aa5359de1813:~/.venv$ pip freeze
httplib2==0.7.4
prettytable==0.6.1
python-novaclient==2.6.10
simplejson==2.6.0
while with python-novaclient==2012.1, authentication against nova went smoothly with the same credentials.
log says:
=====================================================================================
DEBUG:__main__:ACTION: authenticating against nova
DEBUG:novaclient.client:REQ: curl -i https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient"
DEBUG:novaclient.client:REQ BODY: {"auth": {"tenantName": "<email address hidden>", "passwordCredentials": {"username": "<email address hidden>", "password": "xxxxxxx"}}}
DEBUG:novaclient.client:RESP:{'status': '200', 'content-length': '6872', 'expires': '-1', 'server': 'Apache-Coyote/1.1', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Fri, 20 Jul 2012 21:40:39 GMT', 'content-type': 'application/json'} {"access": {
"token": { .......
=====================================================================================
here is the pip patch for successful authentication:
(.venv)ubuntu@db19f47c-e3e5-4099-840f-aa5359de1813:~/.venv$ pip freeze
httplib2==0.7.4
prettytable==0.5
python-novaclient==2012.1
simplejson==2.6.0
The only difference between the two requests is an additional /tokens in the auth URL. Is it possible that your configuration included '/tokens' in the endpoint? The code will append '/tokens' so it shouldn't be in the configured endpoint.