Bug 849818

Summary: Watchdogs grid doesn't handle watchdogs with NULL recipe_task_id
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: web UIAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: bpeck, dcallagh, kbaker, rmancy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-06 04:38:51 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-08-21 03:00:01 UTC
On visiting the list of watchdogs at /watchdogs/:

2012-08-20 22:57:50,598 cherrypy.msg INFO HTTP: Page handler: <bound method Watchdogs.index of <bkr.server.watchdog.Watchdogs object at 0x7f48da683a10>>
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 index
  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 "build/lib/bkr/server/templates/my_paginate_datagrid.py", line 165, in _pull
  File "/usr/lib/python2.6/site-packages/turbogears/widgets/datagrid.py", line 66, in get_field
    return self.getter(row)
  File "/usr/lib/python2.6/site-packages/bkr/server/watchdog.py", line 30, in <lambda>
    col(name='task_name', getter=lambda x: x.recipetask.link, title="Task Name"),
AttributeError: 'NoneType' object has no attribute 'link'
Error in code generated from template file 'build/lib/bkr/server/templates/grid.kid'

Comment 1 Dan Callaghan 2012-08-22 00:57:12 UTC
The watchdog.recipe_task_id column can be NULL while the recipe is in Waiting state, waiting for the system to reboot and the first task to be started. This is a new thing, as of commit 56c72d19 for bug 835373.

Comment 2 Dan Callaghan 2012-08-22 02:34:05 UTC
On Gerrit: http://gerrit.beaker-project.org/1299

Comment 4 Raymond Mancy 2012-08-27 01:18:50 UTC
This is too hard to test on a live system because of the timing constraints

Comment 5 Dan Callaghan 2012-09-06 04:38:51 UTC
Beaker 0.9.3 has been released.