UncryptedFileKeyring broken

Bug #1260017 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keyring (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

$ cat .local/share/python_keyring/keyringrc.cfg
[backend]
default-keyring=keyring.backend.UncryptedFileKeyring

$ nova boot --flavor=m1.tiny --image=882f8369-b7ae-41bb-bdb3-28c2588eabfe inst-20131211-171805Traceback (most recent call last):
  File "/usr/bin/nova", line 6, in <module>
    from novaclient.shell import main
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 38, in <module>
    import keyring
  File "/usr/lib/python2.7/dist-packages/keyring/__init__.py", line 12, in <module>
    from .core import (set_keyring, get_keyring, set_password, get_password,
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 180, in <module>
    init_backend()
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 59, in init_backend
    set_keyring(load_config() or _get_best_keyring())
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 130, in load_config
    keyring = load_keyring(None, keyring_name)
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 89, in load_keyring
    class_ = getattr(module, class_name)
AttributeError: 'module' object has no attribute 'UncryptedFileKeyring'

$ dpkg-query --show python-keyring python-novaclient
python-keyring 3.3-1
python-novaclient 1:2.15.0-0ubuntu1

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python-keyring 3.3-1
ProcVersionSignature: Ubuntu 3.12.0-5.13-generic 3.12.2
Uname: Linux 3.12.0-5-generic x86_64
ApportVersion: 2.12.7-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Dec 11 12:15:39 2013
InstallationDate: Installed on 2011-10-19 (784 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: python-keyring
UpgradeStatus: Upgraded to trusty on 2013-05-20 (205 days ago)

Revision history for this message
Scott Moser (smoser) wrote :
Changed in python-keyring (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

It seems that upstream python-keyring just dropped this and didn't account for backwards compatibility.

The new setting should be like this:
[backend]
#default-keyring=keyring.backend.UncryptedFileKeyring # old value
default-keyring=keyring.backends.file.PlaintextKeyring

Changed in python-keyring (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

The old names were deprecated since 1.1, you did have time to update your config. The two packages in Ubuntu that relied on old names have been fixed, so I don't think we'll revert this change.

Changed in python-keyring (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Scott Moser (smoser) wrote :

For what its worth, providing backwards compatibility for this *user surfaced* configuration consists of doing this:

$ diff -u keyring/backend.py.smdist keyring/backend.py
--- /usr/share/pyshared/keyring/backend.py.smdist 2013-12-12 10:25:28.576780465 -0500
+++ /usr/share/pyshared/keyring/backend.py 2013-12-12 10:26:46.753677810 -0500
@@ -9,6 +9,7 @@
 from keyring import errors
 from keyring.util import properties
 from keyring.py27compat import add_metaclass, filter
+from keyring.backends.file import PlaintextKeyring as UncryptedFileKeyring

 import keyring.util

To be clear, your suggestion that you fixed all the packages in Ubuntu that might have used this is not sufficient to actually provide backwards compatibility.

I found this by using a package in ubuntu that previously worked and was broken after an upgrade.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.