Bug 852241 - Watchdog never starts if power configuration is not present
Watchdog never starts if power configuration is not present
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: Nick Coghlan
Depends On:
  Show dependency treegraph
Reported: 2012-08-27 21:11 EDT by Raymond Mancy
Modified: 2015-05-03 22:13 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-01-28 20:57:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Raymond Mancy 2012-08-27 21:11:14 EDT
Description of problem:

Watchdog does not start for system where no power config is present

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

How reproducible:

Steps to Reproduce:
1. Start a job with a system that has no power config present
2. Watchdog never starts
Actual results:

External watchdog expires recipe

Expected results:

Job runs as per normal

Additional info:

We allow systems to not have power configurations. There are real world cases
where not having a power configuration is wanted (i.e machine is under desk and we just want to switch it on and off).

The problem is that the watchdog is tied to the provision process on the LC via the power handler, and we do not bother having the LC handlea power action if we have no power config. This is probably the correct behaviour. 

Perhaps though what we should be doing is calling the model.auto_cmd_handler directly from mode.power_action if there is no power config present.
Comment 2 Dan Callaghan 2012-08-27 23:32:25 EDT
I think the recipe should start (that is, enter Running state and have a watchdog kill time defined) once the machine reaches Anaconda %pre. But you're right, until then the recipe will remain Waiting with no watchdog kill time. This was my oversight in commit 56c72d19 for bug 835373.
Comment 3 Raymond Mancy 2012-08-28 00:09:11 EDT
AFAICT the %pre will not cause it to enter a Running state as it explicitly tests whether the task is already running before it extends it (and does not if it isn't).  In fact perhaps this is the most logical place to have the start being recorded, although it looks we've gone out of our way not to do that, and I'm sure there is a good reason why.
Comment 4 Nick Coghlan 2012-10-17 00:39:38 EDT
Bulk reassignment of issues as Bill has moved to another team.
Comment 5 Dan Callaghan 2012-10-25 00:25:55 EDT
When provisioning a recipe we only issue a reboot if the system supports power control. We should just add an else: branch on there which starts the recipe immediately if there's no power control.
Comment 6 Raymond Mancy 2013-01-28 20:57:16 EST
This is now happening thanks to the install_start() method that is called from %pre

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