Optional keyring support is broken

Bug #1183072 reported by Rob Crittenden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
High
Rob Crittenden

Bug Description

The import for keyring and pickle was moved into a function but there is no global-level place holder for the import so they are local to that function only:

$ keystone --debug --os-cache user-list
Unable to retrieve token from keyring global name 'keyring' is not defined
...
Failed to store token into keyring global name 'keyring' is not defined

Additionally there is a reference to the just-retrieved auth_ref needs to be used in get_auth_ref_from_keyring() rather than the one in self.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

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

Changed in python-keystoneclient:
assignee: nobody → Rob Crittenden (rcritten)
status: New → In Progress
Dolph Mathews (dolph)
Changed in python-keystoneclient:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/30174
Committed: http://github.com/openstack/python-keystoneclient/commit/68eed64a02bea4a3adb4c8761f8d8bc4f55e5ecd
Submitter: Jenkins
Branch: master

commit 68eed64a02bea4a3adb4c8761f8d8bc4f55e5ecd
Author: Rob Crittenden <email address hidden>
Date: Wed May 22 17:00:53 2013 -0400

    Fix optional keyring support, add basic keyring tests

    Commit 06d9437e8388b369546d760607f17cb5022750e9 made using a keyring
    optional by adding a function to handle the imports. The problem is that
    import needs to be available at a global level for it to be usable in
    other parts of the code.

    The function is replaced by a top-level try/except.

    Fixing the imports isn't enough to get keyring support working because
    in get_auth_ref_from_keyring() the wrong token was being used when
    evaluating token expiration. It was using the token already in the
    HTTPClient object and not the one returned from the keyring.

    Some simple tests were added to prevent future regressions. These
    tests will be skipped if the keyring or pickle packages are not
    installed.

    Change-Id: I1fe2c9e5cdf275df2047018368da2e4b3d2d6de2
    Fixes: bug #1183072

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in python-keystoneclient:
milestone: none → 0.3.0
status: Fix Committed → Fix Released
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.