Bug 1093052

Summary: [RFE] allow GET method on /recipes/#/watchdog to query current watchdog
Product: [Retired] Beaker Reporter: Bill Peck <bpeck>
Component: lab controllerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.16CC: aigao, asaha, dcallagh, rmancy, xma
Target Milestone: 0.17Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-10 23:28:21 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 Bill Peck 2014-04-30 13:27:30 UTC
Description of problem:

Please extend the RestAPI to allow querying of the watchdog

https://beaker-project.org/docs/alternative-harnesses/#post--recipes-(recipe_id)-watchdog

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

This would allow a simple cron job to alert the user both with wall and email to when the system will be expiring.

Comment 2 Dan Callaghan 2014-05-16 07:21:35 UTC
On Gerrit: http://gerrit.beaker-project.org/3084

Comment 4 Dan Callaghan 2014-05-23 04:05:49 UTC
Suggested steps for verifying:
1. Submit a job with:
    <task name="/distribution/command">
        <param name="CMDS_TO_RUN" value="curl -s http://$LAB_CONTROLLER:8000/recipes/$RECIPEID/watchdog ; rhts-extend $LAB_CONTROLLER $TESTID 1000 ; curl -s http://$LAB_CONTROLLER:8000/recipes/$RECIPEID/watchdog" />
    </task>
2. Check TESTOUT.log to see the fetched watchdog values

Expected results:
First curl command should produce the current watchdog time in seconds (I guess around 10800 = 3 hours). Second curl command should produce the new watchdog time that was set (around 1000).

Comment 6 Dan Callaghan 2014-05-23 06:29:29 UTC
Hmm the JSON response might make it a bit annoying to parse in a shell script, which was Bill's original intention I think...

Comment 7 Nick Coghlan 2014-05-23 08:07:52 UTC
It's the kind of simple JSON response where cut can deal with it fairly easily, though.

Comment 8 Dan Callaghan 2014-06-10 23:28:21 UTC
Beaker 0.17.0 has been released.