Ask Your Question
0

glance: Unauthorized (401) in Liberty

asked 2015-11-25 10:54:31 -0500

Herr-Herner gravatar image

updated 2015-11-25 10:56:12 -0500

I am running Ubuntu 14.04.3 and try to install OpenStack Liberty. Keystone is running, but I had no luck with Glance. I always get a 401 and I am sure that all credentials ar correct:

The Keystone log contains:

2015-11-25 17:43:54.913446 2015-11-25 17:43:54.913 2255 WARNING keystone.common.wsgi [req-0982767e-5a26-4acb-86f3-5ffbda5c2198 - - - - -] Expecting to find id or name in user - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error.

Have look to the following trace:

openstack --debug image list

START with options: ['--debug', 'image', 'list']
options: Namespace(access_token_endpoint='', auth_type='password', auth_url='http://os-controller:35357/v3', cacert='', client_id='', client_secret='', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', insecure=None, interface='', log_file=None, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='2', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', password='XYZ', project_domain_id='default', project_domain_name='', project_id='', project_name='admin', protocol='', region_name='', scope='', timing=False, token='', trust_id='', url='', user_domain_id='default', user_domain_name='', user_id='', username='admin', verbose_level=3, verify=None)
defaults: {'auth_type': 'password', 'compute_api_version': '2', 'database_api_version': '1.0', 'api_timeout': None, 'baremetal_api_version': '1', 'cacert': None, 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'key': None, 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '1', 'verify': True, 'identity_api_version': '2', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'dns_api_version': '2', 'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', 'compute_api_version': '2', 'database_api_version': '1.0', 'interface': None, 'network_api_version': '2', 'image_format': 'qcow2', 'object_api_version': '1', 'image_api_version': '2', 'verify': True, 'timing': False, 'dns_api_version': '2', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, 'baremetal_api_version': '1', 'auth': {'username': 'admin', 'project_name': 'admin', 'user_domain_id': 'default', 'tenant_name': 'admin', 'auth_url': 'http://os-controller:35357/v3', 'password': 'XYZ', 'project_domain_id': 'default'}, 'default_domain': 'default', 'image_api_use_tasks': False, 'floating_ip_source': 'neutron', 'key': None, 'cacert': None, 'deferred_help': False, 'identity_api_version': '3', 'volume_api_version': '1', 'cert': None, 'secgroup_source': 'neutron', 'debug': True, 'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 1, cmd group openstack.volume.v1
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
command: image list -> openstackclient.image.v2.image.ListImage
Auth plugin password selected
auth_type: password
Using auth plugin: password
Using parameters {'username': 'admin', 'project_name': 'admin', 'auth_url': 'http://os-controller:35357/v3', 'user_domain_id': 'default', 'tenant_name': 'admin', 'password': 'XYZ', 'project_domain_id': 'default'}
Get auth_ref
REQ: curl -g -i -X GET http://os-controller:35357/v3 -H "Accept: application/json" -H "User-Agent: python-openstackclient"
Starting new HTTP connection (1): os-controller
"GET /v3 HTTP/1.1" 200 269
RESP: [200] Content-Length: 269 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.7 (Ubuntu) Connection: Keep-Alive Date: Wed, 25 Nov 2015 16:43:54 GMT x-openstack-request-id: req-c2fe880b-6478-4522-bcd3-bc48c98548cc Content-Type: application/json X-Distribution: Ubuntu
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://os-controller:35357/v3/", "rel": "self"}]}}

Making authentication request to http://os-controller:35357/v3/auth/tokens
"POST /v3/auth/tokens HTTP/1.1" 201 1721
take_action(Namespace(columns=[], formatter='table ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-01 04:40:27 -0500

mobaer gravatar image

Documentation seems to be a bit outdated for glance installation. Have you tested openstack image list instead of glance image-list?

I had better luck with the following configuration (replaced auth_url with identity_uri)

auth_uri = http://controller:5000
identity_uri = http://controller:35357/
admin_tenant_name = service
admin_user = glance
admin_password = XYZ 

However to upload an image I need to source the admin-openrc.sh, grab a token openstack token issue and upload it using the token glance --os-auth-token [TOKEN_ID] image-create ....

edit flag offensive delete link more
0

answered 2015-12-01 05:18:03 -0500

RHK gravatar image

Please try to update the glance user password on keytsone.

on glance node

less /etc/glance/glance-api.conf admin_password = ....

on keystone node

keystone user-password-update --pass <admin_password> glance

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-11-25 10:54:31 -0500

Seen: 1,247 times

Last updated: Dec 01 '15