Bug 880424

Summary: Identity extension fails to start during beaker-server rpm upgrade
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: Nick Coghlan <ncoghlan>
Severity: unspecified Docs Contact:
Priority: low    
Version: 0.9CC: asaha, bpeck, dcallagh, jburke, kbaker, mishin, pbunyan, qwan, rglasz, rmancy
Target Milestone: 0.11   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Misc
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 852557 Environment:
Last Closed: 2013-01-17 04:33:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.