Creating the Keystone service and endpoint fails while deploying Queens with kolla-ansible

asked 2019-08-19 04:14:48 -0600

updated 2019-08-19 06:24:03 -0600

While trying to deploy Queens (I want to replicate our production environment to test upgrading) with kolla-ansible I ran into the following problem:

TASK [keystone : Creating the Keystone service and endpoint] ***********************************************************
failed: [oscontrol01] (item={u'interface': u'admin', u'url': u''}) => 
{"ansible_loop_var": "item", "changed": true, "item": {"interface": "admin", "url": ""}, 
"msg": "'Traceback (most recent call last):
  File \"/tmp/ansible_e1Iz7u/\", line 55, in main
    for _service in
  File \"/opt/ansible/local/lib/python2.7/site-packages/shade/\", line 565, in keystone_client
    \\'identity\\', keystoneclient.client.Client)
  File \"/opt/ansible/local/lib/python2.7/site-packages/shade/\", line 348, in _get_client
  File \"/opt/ansible/local/lib/python2.7/site-packages/os_client_config/\", line 370, in get_legacy_client
    service_key, min_version=min_version, max_version=max_version)
  File \"/opt/ansible/local/lib/python2.7/site-packages/os_client_config/\", line 309, in get_session_endpoint
    endpoint = self._get_highest_endpoint(service_types, kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/os_client_config/\", line 267, in _get_highest_endpoint
    return session.get_endpoint(**kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/\", line 1200, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/identity/\", line 380, in get_endpoint
    allow_version_hack=allow_version_hack, **kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/identity/\", line 271, in get_endpoint_data
    service_catalog = self.get_access(session).service_catalog
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/identity/\", line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/identity/generic/\", line 206, in get_auth_ref
    self._plugin = self._do_create_plugin(session)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/identity/generic/\", line 161, in _do_create_plugin
    \\'auth_url is correct. %s\\' % e)
DiscoveryFailure: Could not find versioned identity endpoints when attempting to authenticate. Please check that your auth_url is correct. Internal Server Error (HTTP 500)

The corresponding entries from the keystone log file for that request:

2019-08-19 10:57:27.351026 mod_wsgi (pid=27): Target WSGI script '/usr/bin/keystone-wsgi-admin' cannot be loaded as Python module.
2019-08-19 10:57:27.351080 mod_wsgi (pid=27): Exception occurred processing WSGI script '/usr/bin/keystone-wsgi-admin'.
2019-08-19 10:57:27.351114 Traceback (most recent call last):
2019-08-19 10:57:27.351136   File "/usr/bin/keystone-wsgi-admin", line 6, in <module>
2019-08-19 10:57:27.351249     from keystone.server.wsgi import initialize_admin_application
2019-08-19 10:57:27.351269   File "/usr/lib/python2.7/dist-packages/keystone/server/", line 29, in <module>
2019-08-19 10:57:27.351375     from keystone.server import common
2019-08-19 10:57:27.351391   File "/usr/lib/python2.7/dist-packages/keystone/server/", line 19, in <module>
2019-08-19 10:57:27.351479     from keystone.server import backends
2019-08-19 10:57:27.351495   File "/usr/lib/python2.7/dist-packages/keystone/server/", line 13, in <module>
2019-08-19 10:57:27.351589     from keystone import application_credential
2019-08-19 10:57:27.351606   File "/usr/lib/python2.7 ...
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-08-19 06:55:42 -0600

I made the following change to the file /usr/local/share/kolla-ansible/ansible/roles/keystone/templates/wsgi-keystone.conf.j2 on my kolla deploy machine:

I changed

{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntu' else '/usr/lib/python2.7/site-packages' %}


{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntuX' else '/usr/lib/python2.7/site-packages' %}

(I just added an X to the value ubuntu to make sure that python 2.7 is used instead of python 3).

Then I restarted the deployment and the endpoint creation worked.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-08-19 04:11:07 -0600

Seen: 301 times

Last updated: Aug 19 '19