Keystone token authentication with glance-replicator produces 401 error
Issue
After setting up glance-replicator
to replicate images across WAN deployments, authentication with keystonrc
on each Glance node and the running of Glance operations was successful. However, authenticating glance-replicator
with tokens returns 401 Not Authorized
errors, as follows:
~(keystone_glance)]$ glance-replicator livecopy <IP> <IP> -v -d -t=$TOKEN
<etc>
Response: 401 Unauthorized {'date': '<date>', 'content-length': '253', 'content-type': 'text/plain; charset=UTF-8'}
Traceback (most recent call last):
File "/usr/bin/glance-replicator", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/glance/cmd/replicator.py", line 807, in main
command(options, args)
File "/usr/lib/python2.7/site-packages/glance/cmd/replicator.py", line 514, in replication_livecopy
for image in master_client.get_images():
File "/usr/lib/python2.7/site-packages/glance/cmd/replicator.py", line 155, in get_images
response = self._http_request('GET', url, {}, '')
File "/usr/lib/python2.7/site-packages/glance/cmd/replicator.py", line 129, in _http_request
raise AuthenticationException(response.read())
glance.cmd.replicator.AuthenticationException: 401 Unauthorized
This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
Environment
- Red Hat OpenStack Platform 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.