Hide Forgot
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
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.
The plan is to make owner_id not NULLable. We will just need to find owners for those ownerless systems in our database currently.