Python client library for Nova

IOError in gnomekeyring.find_network_password_sync

Reported by Michael Fork on 2013-02-05
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
python-novaclient
High
Davanum Srinivas (DIMS)

Bug Description

Fresh ubuntu VM and devstack run:

openstack@devstack-20130205:~/devstack$ echo $OS_NO_CACHE
true
openstack@devstack-20130205:~/devstack$ nova --debug list
DEBUG (shell:732)
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 729, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 627, in main
    tenant_id, auth_token, management_url = (helper.tenant_id,
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 176, in tenant_id
    block = keyring.get_password('novaclient_auth', self._make_key())
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 37, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 144, in get_password
    items = gnomekeyring.find_network_password_sync(username, service)
IOError

I ran into this same issue - looks like we need to catch gnomekeyring.IOError in additional to what we are doing already

some other folks have faced this too ("Non-root user cannot access keyring unless in X Windows")
https://bitbucket.org/Mekk/mercurial_keyring/issue/6/non-root-user-cannot-access-keyring-unless

Fix proposed to branch: master
Review: https://review.openstack.org/21690

Changed in python-novaclient:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress

Reviewed: https://review.openstack.org/21690
Committed: http://github.com/openstack/python-novaclient/commit/d1d4f33aca4f9753dd31972ea53ddc831b52fbfc
Submitter: Jenkins
Branch: master

commit d1d4f33aca4f9753dd31972ea53ddc831b52fbfc
Author: Davanum Srinivas <email address hidden>
Date: Mon Feb 11 15:55:33 2013 -0500

    Fix IOError with gnomekeyring.find_network_password_sync

    find_network_password_sync throws a gnomekeyring.IOError
    when a non-root user tries to run nova client
    from a ssh console. If we don't catch this exception nova client
    throws the traceback (shown in the bug report) and stops.
    If we catch this exception (just like we catch ValueError),
    and return None, Nova client executes just fine.

    Fixes LP# 1116302

    Change-Id: If6937b3f8eafb1dc55224b2ca2bd0f93ae07f8c6

Changed in python-novaclient:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/22009
Committed: http://github.com/openstack/python-novaclient/commit/132465231a1517aa79c5fad0eb4949a7e02bd763
Submitter: Jenkins
Branch: master

commit 132465231a1517aa79c5fad0eb4949a7e02bd763
Author: Davanum Srinivas <email address hidden>
Date: Thu Feb 14 20:58:01 2013 -0500

    Issue when gnomekeyring is present but not the current backend

    Issue was identified in the review for the previous
    patch for bug 1116302. Took this chance to rename _IOError
    to a better name (KeyringIOError)

    Change-Id: I321353d519eaebea27617702f92ecafe2052eb8e

Changed in python-novaclient:
importance: Undecided → High
Changed in python-novaclient:
status: Fix Committed → In Progress
Jeff Sloyer (jsloyer) wrote :

The fix did not resolve the issue, DIMS fixed the issue and will upload the patch.

Changed in python-novaclient:
status: In Progress → Incomplete

Jeff Sloyer (IBM) tested the fix and found a problem. looks like we are missing an import

Fix proposed to branch: master
Review: https://review.openstack.org/22568

Changed in python-novaclient:
status: Incomplete → In Progress

Reviewed: https://review.openstack.org/22568
Committed: http://github.com/openstack/python-novaclient/commit/34c8a6bb7ad605b107a6f89b7018284811b5fadf
Submitter: Jenkins
Branch: master

commit 34c8a6bb7ad605b107a6f89b7018284811b5fadf
Author: Davanum Srinivas <email address hidden>
Date: Thu Feb 21 11:41:02 2013 -0500

    Missing import for gnomekeyring

    follow on to previous attempt to fix to bug 1116302,
    looks like we missed an import

    Fixes LP#1116302

    Change-Id: If56e3cedaa63a594907bb851a2701bd64806ed85

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-novaclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers