[keystone][devstack][openstackclient] Problem with Keystone setup in stable/ussuri devstack install

Neil Jerram neil at tigera.io
Fri May 22 22:35:11 UTC 2020


On Fri, May 22, 2020 at 10:49 PM Alex Schultz <aschultz at redhat.com> wrote:

> On Fri, May 22, 2020 at 3:42 PM Neil Jerram <neil at tigera.io> wrote:
> >
> > 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?
> >
>
> I haven't seen this exact issue, but there was an issue with
> secretstorage & jeepney a while back around it actually hanging
> because it wasn't properly handling dbus connection problems.  I
> reported it against secretstorage but it ended up being an issue in
> jeepney. https://github.com/mitya57/secretstorage/issues/22
>
> This bit of code should generally be silently ignored and the backend
> should just be ignored if not available so it might be an issue in one
> of the dependencies.
>
> Hope that points you in the right direction.
>
> Thanks,
> -Alex
>

Many thanks Alex.

I believe I've just made some progress on this, and that the problem was
not correctly setting up the stack user.  I was previously running just

./stack.sh

as the default user on a semaphore VM.  I've now changed that to

sudo tools/create-stack-user.sh
cd ..
sudo mkdir -p /opt/stack
sudo mv devstack /opt/stack
sudo chown -R stack:stack /opt/stack
ls -la /opt/stack
sudo -u stack -i bash -c 'cd devstack && ./stack.sh'

and it seems to be getting a lot further.

Best wishes,
    Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20200522/b2f3f974/attachment.html>


More information about the openstack-discuss mailing list