Bug 831864 - 500 Internal Server Error from utilisation graph
500 Internal Server Error from utilisation graph
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: reports (Show other bugs)
0.8
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.9.0
: ---
Assigned To: Dan Callaghan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 19:21 EDT by Dan Callaghan
Modified: 2012-06-26 02:40 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-26 02:40:57 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 Dan Callaghan 2012-06-13 19:21:44 EDT
2012-06-13 19:14:39,559 cherrypy.msg INFO HTTP: Page handler: <bound method Reports.utilisation_graph of <bkr.server.reports.Reports object at 0x7f6a6a236990>>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/CherryPy-2.3.0-py2.6.egg/cherrypy/_cphttptools.py", line 121, in _run
    self.main()
  File "/usr/lib/python2.6/site-packages/CherryPy-2.3.0-py2.6.egg/cherrypy/_cphttptools.py", line 264, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in utilisation_graph
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 361, in expose
    *args, **kw)
  File "<generated code>", line 0, in run_with_transaction
  File "/usr/lib/python2.6/site-packages/peak/rules/core.py", line 153, in __call__
    return self.body(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/database.py", line 458, in sa_rwt
    retval = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 244, in _expose
    @abstract()
  File "<generated code>", line 0, in _expose
  File "/usr/lib/python2.6/site-packages/peak/rules/core.py", line 153, in __call__
    return self.body(*args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 390, in <lambda>
    fragment, options, args, kw)))
  File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 425, in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "/usr/lib/python2.6/site-packages/turbogears/errorhandling.py", line 77, in try_call
    return func(self, *args, **kw)
  File "/usr/lib/python2.6/site-packages/bkr/server/reports.py", line 147, in utilisation_graph
    groups = Group.query.join('systems').order_by(Group.group_name)
  File "<string>", line 1, in <lambda>
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/util.py", line 294, in go
    return fn(*args, **kw)
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/query.py", line 1224, in join
    from_joinpoint=from_joinpoint)
  File "<string>", line 1, in <lambda>
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/query.py", line 52, in generate
    fn(self, *args[1:], **kw)
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/query.py", line 1326, in _join
    raise NotImplementedError("query.join(a==b) not supported.")
NotImplementedError: query.join(a==b) not supported.
Comment 1 Dan Callaghan 2012-06-13 19:39:20 EDT
This is a regression that was introduced in commit ca896a6a for bug 797584. That commit introduced an association object SystemGroup and so Group.systems is no longer a usable join relationship.

I have a feeling we hit this same problem elsewhere already, the stack trace looks very familiar...
Comment 2 Dan Callaghan 2012-06-13 20:25:06 EDT
(In reply to comment #1)
> I have a feeling we hit this same problem elsewhere already, the stack trace
> looks very familiar...

I was thinking of bug 817568, which is the same issue (joining on Group.systems) but in a different place.

I've just checked all references to Group.systems and System.groups, they are not used in any other joins. We have a few places where we filter on those relationships using .contains() and .any() but it seems sqlalchemy is smart enough to figure out the right thing in those cases.
Comment 3 Dan Callaghan 2012-06-13 20:32:59 EDT
On Gerrit: http://gerrit.beaker-project.org/1135
Comment 5 Dan Callaghan 2012-06-26 02:40:57 EDT
Beaker 0.9.0 has been released.

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