Here's the traceback for why python-openstackclient can't import its identity plugin:

Traceback (most recent call last):
  File "/opt/stack/python-openstackclient/openstackclient/common/clientmanager.py", line 151, in get_plugin_modules
    __import__(ep.module_name)
  File "/opt/stack/python-openstackclient/openstackclient/identity/client.py", line 18, in <module>
    from keystoneclient.v2_0 import client as identity_client_v2
  File "/usr/local/lib/python3.6/dist-packages/keystoneclient/v2_0/__init__.py", line 1, in <module>
    from keystoneclient.v2_0.client import Client  # noqa
  File "/usr/local/lib/python3.6/dist-packages/keystoneclient/v2_0/client.py", line 21, in <module>
    from keystoneclient import httpclient
  File "<frozen importlib._bootstrap>", line 1020, in _handle_fromlist
  File "/usr/local/lib/python3.6/dist-packages/keystoneclient/__init__.py", line 72, in __getattr__
    return importlib.import_module('keystoneclient.%s' % name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.6/dist-packages/keystoneclient/httpclient.py", line 43, in <module>
    import keyring
  File "/usr/lib/python3/dist-packages/keyring/__init__.py", line 3, in <module>
    from .core import (set_keyring, get_keyring, set_password, get_password,
  File "/usr/lib/python3/dist-packages/keyring/core.py", line 153, in <module>
    init_backend()
  File "/usr/lib/python3/dist-packages/keyring/core.py", line 66, in init_backend
    keyrings = filter(limit, backend.get_all_keyring())
  File "/usr/lib/python3/dist-packages/keyring/util/__init__.py", line 21, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/keyring/backend.py", line 196, in get_all_keyring
    exceptions=TypeError))
  File "/usr/lib/python3/dist-packages/keyring/util/__init__.py", line 31, in suppress_exceptions
    for callable in callables:
  File "/usr/lib/python3/dist-packages/keyring/backend.py", line 188, in is_class_viable
    keyring_cls.priority
  File "/usr/lib/python3/dist-packages/keyring/util/properties.py", line 24, in __get__
    return self.fget.__get__(None, owner)()
  File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 37, in priority
    bus = secretstorage.dbus_init()
  File "/usr/lib/python3/dist-packages/secretstorage/__init__.py", line 47, in dbus_init
    return dbus.SessionBus()
  File "/usr/lib/python3/dist-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib/python3/dist-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /tmp/dbus-yQkwBYfBbJ: Connection refused

Does that ring any bells?

Best wishes,
    Neil


On Wed, May 20, 2020 at 6:04 PM Neil Jerram <neil@tigera.io> wrote:
+ ./stack.sh:main:1091                     :   create_keystone_accounts
+ lib/keystone:create_keystone_accounts:314 :   local admin_project
++ lib/keystone:create_keystone_accounts:315 :   oscwrap project show admin -f value -c id
WARNING: Failed to import plugin identity.
++ functions-common:oscwrap:2370            :   return 2
+ lib/keystone:create_keystone_accounts:315 :   admin_project='openstack: '\''project show admin -f value -c id'\'' is not an openstack command. See '\''openstack --help'\''.

I believe this is a completely mainline Keystone setup by devstack.  The top-level stack.sh code is

    echo_summary "Starting Keystone"

    if [ "$KEYSTONE_AUTH_HOST" == "$SERVICE_HOST" ]; then
        init_keystone
        start_keystone
        bootstrap_keystone
    fi

    create_keystone_accounts
    ...

bootstrap_keystone succeeded but create_keystone_accounts failed as shown above, trying to execute

    openstack project show "admin" -f value -c id

IIUC, the rootmost problem here is "WARNING: Failed to import plugin identity.", indicating that python-openstackclient is failing to import its openstackclient.identity.client module.  But I don't know any more about why that would be.

Any ideas?

Many thanks,
    Neil