Ask Your Question
0

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

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

geschnei gravatar image

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

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'http://osapi-int.example.com:35357'}) => 
{"ansible_loop_var": "item", "changed": true, "item": {"interface": "admin", "url": "http://osapi-int.example.com:35357"}, 
"msg": "'Traceback (most recent call last):
  File \"/tmp/ansible_e1Iz7u/ansible_module_kolla_keystone_service.py\", line 55, in main
    for _service in cloud.keystone_client.services.list():
  File \"/opt/ansible/local/lib/python2.7/site-packages/shade/openstackcloud.py\", line 565, in keystone_client
    \\'identity\\', keystoneclient.client.Client)
  File \"/opt/ansible/local/lib/python2.7/site-packages/shade/openstackcloud.py\", line 348, in _get_client
    **kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/os_client_config/cloud_config.py\", 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/cloud_config.py\", 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/cloud_config.py\", line 267, in _get_highest_endpoint
    return session.get_endpoint(**kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/session.py\", line 1200, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/identity/base.py\", line 380, in get_endpoint
    allow_version_hack=allow_version_hack, **kwargs)
  File \"/opt/ansible/local/lib/python2.7/site-packages/keystoneauth1/identity/base.py\", 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/base.py\", 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/base.py\", 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/base.py\", 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/wsgi.py", 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/common.py", 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/backends.py", 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 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

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

geschnei gravatar image

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' %}

to

{% 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

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: 2019-08-19 04:11:07 -0500

Seen: 26 times

Last updated: Aug 19