Bug 857355 - SystemStatusAttributeExtension doesn't work with sqlalchemy 0.7
SystemStatusAttributeExtension doesn't work with sqlalchemy 0.7
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
0.9
Unspecified Linux
unspecified Severity unspecified (vote)
: 0.9.4
: ---
Assigned To: Dan Callaghan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-14 04:18 EDT by Amit Saha
Modified: 2015-07-26 18:14 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-11 19:50:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Amit Saha 2012-09-14 04:18:01 EDT
Description of problem:

The beaker server code and possibly others is not compatible with sqlalchemy 0.7.8 (which is the latest in Fedora). I had to downgrade it to 0.6.8 (which is the latest on RHEL 6) to get things working.

Version-Release number of selected component (if applicable):

Git checkout (develop branch)

How reproducible:

Easy.

Steps to Reproduce:
1.Setup beaker server alongwith the web application
2. Add a system using the Web UI or the script from beaker-virt (http://beaker-project.org/in-a-box/beaker-virt.html) 
  
Actual results:

    2012-09-13 06:38:39,235 turbogears.identity.savisit INFO updating visit (a76e19186da049be927d1e1955d7ff9eec32d4ca) to expire at 2012-09-13 12:38:22.876190
    2012-09-13 06:38:43,816 bkr.server.model DEBUG virt-10 status changed from <symbol 'NEVER_SET> to None
    2012-09-13 06:38:43,818 cherrypy.msg INFO HTTP: Page handler: <bound method Root.save of <bkr.server.controllers.Root object at 0x7f1ea2e2d390>>
    Traceback (most recent call last):
     File "/usr/lib/python2.7/site-packages/CherryPy-2.3.0-py2.7.egg/cherrypy/_cphttptools.py", line 121, in _run
       self.main()
     File "/usr/lib/python2.7/site-packages/CherryPy-2.3.0-py2.7.egg/cherrypy/_cphttptools.py", line 264, in main
       body = page_handler(*virtual_path, **self.params)
     File "<string>", line 3, in save
     File "/usr/lib/python2.7/site-packages/turbogears/controllers.py", line 361, in expose
       *args, **kw)
     File "<generated code>", line 0, in run_with_transaction
     File "/usr/lib/python2.7/site-packages/peak/rules/core.py", line 153, in __call__
       return self.body(*args, **kw)
     File "/usr/lib/python2.7/site-packages/turbogears/database.py", line 458, in sa_rwt
       retval = func(*args, **kw)
     File "<generated code>", line 0, in _expose
     File "/usr/lib/python2.7/site-packages/peak/rules/core.py", line 153, in __call__
       return self.body(*args, **kw)
     File "/usr/lib/python2.7/site-packages/turbogears/controllers.py", line 390, in <lambda>
       fragment, options, args, kw)))
     File "/usr/lib/python2.7/site-packages/turbogears/controllers.py", line 425, in _execute_func
       output = errorhandling.try_call(func, *args, **kw)
     File "/usr/lib/python2.7/site-packages/turbogears/errorhandling.py", line 77, in try_call
       return func(self, *args, **kw)
     File "<string>", line 3, in save
     File "/usr/lib/python2.7/site-packages/turbogears/controllers.py", line 207, in validate
       return errorhandling.run_with_errors(errors, func, *args, **kw)
     File "/usr/lib/python2.7/site-packages/turbogears/errorhandling.py", line 118, in run_with_errors
       return func(self, *args, **kw)
     File "<string>", line 3, in save
     File "/usr/lib/python2.7/site-packages/turbogears/identity/conditions.py", line 249, in require
       return fn(self, *args, **kwargs)
     File "/usr/lib/python2.7/site-packages/bkr/server/controllers.py", line 1292, in save
       system = System(fqdn=kw['fqdn'],owner=identity.current.user)
     File "<string>", line 4, in __init__
     File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/state.py", line 98, in initialize_instance
       return manager.original_init(*mixed[1:], **kwargs)
     File "/usr/lib/python2.7/site-packages/bkr/server/model.py", line 1614, in __init__
       self.status = status
     File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 155, in __set__
       instance_dict(instance), value, None)
     File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 547, in set
       value, old, initiator)
     File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 553, in fire_replace_event
       value = fn(state, value, previous, initiator or self)
     File "/usr/lib/python2.7/site-packages/bkr/server/model.py", line 2440, in set
       obj.status_durations[0].finish_time = datetime.utcnow()
    IndexError: list index out of range
     
    2012-09-13 06:38:52,331 turbogears.identity.savisit INFO updating visit (a76e19186da049be927d1e1955d7ff9eec32d4ca) to expire at 2012-09-13 12:38:43.806076




Expected results:

System successfully added.


Additional info:

You will not be able to start the server on Fedora due to package dependency issues and possible incompatiblities with Python 2.7 (for the latter, see: https://bugzilla.redhat.com/show_bug.cgi?id=856850).
Comment 1 Dan Callaghan 2012-09-17 07:41:21 EDT
On Gerrit: http://gerrit.beaker-project.org/1354
Comment 4 Dan Callaghan 2012-10-11 19:50:22 EDT
Beaker 0.9.4 has been released.

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