Bug 691796 - machines without owner cause beakerd heartburn
Summary: machines without owner cause beakerd heartburn
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.6
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-29 13:53 UTC by Bill Peck
Modified: 2019-05-22 13:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-29 07:13:21 UTC


Attachments (Terms of Use)

Description Bill Peck 2011-03-29 13:53:33 UTC
Description of problem:

If beakerd is unable to schedule a machine (for example power control fails), and the machine does not have an owner the following traceback will be thrown:

2011-03-29 09:47:46,304 beakerd DEBUG Entering scheduled_recipes routine
2011-03-29 09:47:46,304 beakerd INFO scheduled_recipes: RS:3247
2011-03-29 09:49:36,702 beakerd ERROR Cobbler task failed for recipe 4624: 'Cobbler Task:2011-03-29_094746_power Failed'
2011-03-29 09:49:36,708 beakerd ERROR Failed to commit in scheduled_recipes
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bkr/server/tools/beakerd.py", line 486, in scheduled_recipes
    recipe.system.mark_broken(reason=str(e), recipe=recipe)
  File "/usr/lib/python2.4/site-packages/bkr/server/model.py", line 2377, in mark_broken
    mail.broken_system_notify(self, reason, recipe)
  File "/usr/lib/python2.4/site-packages/bkr/server/mail.py", line 112, in broken_system_notify
    send_mail(sender, system.owner.email_address,
AttributeError: 'NoneType' object has no attribute 'email_address'
2011-03-29 09:49:36,709 beakerd DEBUG Exiting scheduled_recipes routine


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


Steps to Reproduce:
1. set the owner to None and misconfigure power settings for a system
2. schedule against that machine

Actual results:
Job stays in scheduled state and keeps trying to schedule it.

Expected results:
Scheduler should abort job

Comment 1 Dan Callaghan 2011-03-29 23:44:47 UTC
I caused this particular one. I think there are a few places where I have assumed that owner is not NULLable, although clearly it is. I will go back and fix them up.

Comment 4 Dan Callaghan 2011-04-07 00:35:43 UTC
The plan is to make owner_id not NULLable. We will just need to find owners for those ownerless systems in our database currently.


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