Bug 880424 - Identity extension fails to start during beaker-server rpm upgrade
Summary: Identity extension fails to start during beaker-server rpm upgrade
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.9
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: 0.11
Assignee: Dan Callaghan
QA Contact: Nick Coghlan
URL:
Whiteboard: Misc
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-27 00:12 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 852557
Environment:
Last Closed: 2013-01-17 04:33:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2012-11-27 00:12:36 UTC
+++ This bug was initially created as a clone of Bug #852557 +++

--- Additional comment from Dan Callaghan on 2012-11-27 09:30:29 EST ---

In this case the error was a different one, with the same result (TG identity failed to start). From /var/log/beaker/server-debug.log:

2012-11-25 19:00:40,519 turbogears.identity INFO Identity starting
2012-11-25 19:00:40,519 root ERROR tg.utils: Could not import ldapsa because the class was not found
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/turbogears/util.py", line 512, in load_class
    return getattr(module, classname)
AttributeError: 'module' object has no attribute 'ldapsa'
2012-11-25 19:00:40,520 turbogears.startup ERROR Error starting TurboGears extension 'identity = turbogears.identity.visitor': Unknown Identity configuration error
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/turbogears/startup.py", line 298, in startTurboGears
    ext.start_extension()
  File "/usr/lib/python2.6/site-packages/turbogears/identity/visitor.py", line 45, in start_extension
    create_extension_model()
  File "/usr/lib/python2.6/site-packages/turbogears/identity/visitor.py", line 64, in create_extension_model
    provider = create_default_provider()
  File "/usr/lib/python2.6/site-packages/turbogears/identity/base.py", line 68, in create_default_provider
    "IdentityProvider plugin missing: %s" % provider_plugin)
IdentityConfigurationException: Unknown Identity configuration error

--- Additional comment from Dan Callaghan on 2012-11-27 09:58:54 EST ---

(In reply to comment #7)

This happened right around the time of the 0.10.3 hotfix upgrade. TurboGears uses setuptools entry points to look up its identity plugins. So I'm guessing if the application happens to start up at the exact moment that rpm is upgrading the beaker-server package (and replacing the setuptools junk that lives in /usr/lib/python2.6/site-packages/bkr.server-*.egg-info) it might fail to find the right entry point.

TurboGears also supports specifying the identity plugin by module + class name, which is actually what we have in bkr/server/config/app.cfg. It's not even supposed to be specified in server.cfg at all, it's been left in there accidentally. So the fix is just to remove the identity.provider setting from server.cfg.

Comment 1 Dan Callaghan 2012-11-27 00:14:24 UTC
The only code change needed here is to remove identity.provider from the default server.cfg we ship, and to add some upgrade notes to make sure administrators remove it from their configs.

Comment 2 Dan Callaghan 2012-11-27 00:29:18 UTC
On Gerrit: http://gerrit.beaker-project.org/1509

Comment 5 Dan Callaghan 2013-01-17 04:33:21 UTC
Beaker 0.11.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.