Comment 3 for bug 1242992

Revision history for this message
Manuel Stein (manuel.stein) wrote :

Keyring is imported by tempest and python-openstackclient
./tempest/requirements.txt:keyring>=1.6.1
./python-openstackclient/requirements.txt:keyring>=1.6.1,<2.0
Though python-keystoneclient optionally imports the keyring backend, it hits admin account creation in devstack first.
It's a configuration issue of python-keyring, an invocation of set_keyring would help, but wouldn't respect user preferences.

It's a matter of the SecretService backend. I got it running by modifying
/usr/local/lib/python2.7/dist-packages/keyring/backends/SecretService.py
The ClassProperty "priority" tries to initialize dbus before checking for the display variable. Just pull the if clause upfront and you have a working RuntimeException that keeps keyring from trying to use it:

   def priority(cls):
        if not 'secretstorage' in globals():
            raise RuntimeError("SecretService required")
        if 'DISPLAY' not in os.environ:
            raise RuntimeError("SecretService cannot run without a DISPLAY "
                "environment variable")
        try:
            bus = secretstorage.dbus_init()
            secretstorage.Collection(bus)
        except secretstorage.exceptions.SecretServiceNotAvailableException:
            raise RuntimeError("Unable to get initialize SecretService")
        return 5