Authentication fails for zaqarclient in devstack

Bug #1516773 reported by Ryan Brown on 2015-11-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Undecided
Unassigned

Bug Description

By default, devstack stores the OS_AUTH_URL as <host>:<port> instead of <host>:<port>/v2

If I change that, authentication works and I'm able to list flavors etc. It seems like for auth_type v2password zaqar should be trying to append /v2/ if it isn't there.

```
[stack@devstack devstack]$ openstack --debug flavor list
START with options: ['--debug', 'flavor', 'list']
options: Namespace(access_token_endpoint='', auth_type='v2password', auth_url='http://192.168.122.60:35357', cacert='', client_id='', client_secret='***', clo
ud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', i
nsecure=None, interface='', log_file=None, os_baremetal_api_version='1.6', os_compute_api_version='', os_data_processing_api_version='1.1', os_dns_api_version
='', os_identity_api_version='', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_qu
eues_api_version='1.1', os_volume_api_version='', password='***', project_domain_id='default', project_domain_name='', project_id='', project_name='admin', pr
otocol='', region_name='', scope='', service_provider_endpoint='', timing=False, token='***', trust_id='', url='', user_domain_id='default', user_domain_name=
'', user_id='', username='admin', verbose_level=3, verify=None)
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version'
: u'1', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_ap
i_version': u'2', u'image_format': u'qcow2', u'object_api_version': u'1', u'image_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volum
e_api_version': u'1', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'v2password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', u'interface': None, u'network_api_version':
 u'2', u'image_format': u'qcow2', 'project_domain_id': 'default', u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_api_version':
 u'1', 'project_name': 'admin', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': '1.6', 'queues_api_version': '1.1', 'aut
h': {'username': 'admin', 'tenant_name': 'admin', 'password': '***', 'auth_url': 'http://192.168.122.60:35357'}, 'default_domain': 'default', u'container_api_
version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'timing': False, 'cacert': None, 'user_d
omain_id': 'default', 'data_processing_api_version': '1.1', 'deferred_help': False, u'identity_api_version': u'2.0', u'volume_api_version': u'1', 'cert': None
, u'secgroup_source': u'neutron', 'debug': True, u'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 2.0, cmd group openstack.identity.v2
object_store API version 1, cmd group openstack.object_store.v1
messaging API version 1.1, cmd group openstack.messaging.v1
dns API version 2, cmd group openstack.dns.v2
data_processing API version 1.1, cmd group openstack.data_processing.v1
baremetal API version 1.6, cmd group openstack.baremetal.v1
command: flavor list -> openstackclient.compute.v2.flavor.ListFlavor
Auth plugin v2password selected
auth_type: v2password
Using auth plugin: v2password
Using parameters {'username': 'admin', 'tenant_name': 'admin', 'password': '***', 'auth_url': 'http://192.168.122.60:35357'}
Get auth_ref
Making authentication request to http://192.168.122.60:35357/tokens
Starting new HTTP connection (1): 192.168.122.60
"POST /tokens HTTP/1.1" 404 93
Request returned failure status: 404
The resource could not be found. (HTTP 404)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 367, in run_subcommand
    self.prepare_to_run_command(cmd)
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 348, in prepare_to_run_command
    self.client_manager.auth_ref
  File "/usr/lib/python2.7/site-packages/openstackclient/common/clientmanager.py", line 191, in auth_ref
    self._auth_ref = self.auth.get_auth_ref(self.session)
  File "/usr/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.py", line 88, in get_auth_ref
    authenticated=False, log=False)
  File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 502, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/openstackclient/common/session.py", line 40, in request
    resp = super(TimingSession, self).request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneclient/session.py", line 402, in request
    raise exceptions.from_response(resp, method, url)
NotFound: The resource could not be found. (HTTP 404)
```

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers