Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 623933 - RFE: add reservesys when previous tests fail
RFE: add reservesys when previous tests fail
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
0.5
All Linux
high Severity medium (vote)
: 0.9.3
: ---
Assigned To: Bill Peck
: FutureFeature, Reopened
: 596912 (view as bug list)
Depends On:
Blocks: 545868 853383
  Show dependency treegraph
 
Reported: 2010-08-13 03:53 EDT by Petr Sklenar
Modified: 2015-02-20 05:21 EST (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 853383 (view as bug list)
Environment:
Last Closed: 2012-09-06 10:55:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Sklenar 2010-08-13 03:53:04 EDT
Description of problem:
When we are fixing the test or fixing testing package then we need test /distribution/reservesys after each recipe. If scheduler could reserve machine for some time when previous test fails it would spare machine usage.

Version-Release number of selected component (if applicable):
https://beaker.engineering.redhat.com
Version - 0.5.53 

How reproducible:
always

Steps to Reproduce:
1. test A
2. test B
3. all other tests
last test: 4. when there were fail ^ schedule /distribition/reservesys
ELSE
nothing
  
Actual results:
nothing like that, each test which needs to be investigated has a reservesys

Expected results:


Additional info:
It could spare more scheduling of machines
Comment 2 Marian Csontos 2010-08-13 04:50:56 EDT
Thanks for a good idea.

Though I am not sure we can safely insert tasks into recipe as it could break multihost tests, this would not be difficult to implement in harness:

Simple on failure - extend watchdog and notify owner.
Comment 3 Šimon Lukašík 2010-08-13 05:23:00 EDT
I would really like to see this implemented. I think this feature when used with wisdom, could save some machine-time and man-time. For instance:

 - If you don't use reservesys and job fails, you need to wait for new machine to check/repair. So you wait for provisioning and test end. Note that some of the tests may last hours. It's also possible, that problem is not deterministic and second job will pass.

 - If you use reservesys and job didn't fail, you need to return each machine which you reserved. Is this exactly what people often forget?

It could be also implemented if reservesys would have some option like:
--task=/distribution/reservesys --taskparam="RETURN_WHEN_PASS=True"
Comment 4 Marian Csontos 2010-08-13 05:34:30 EDT
That's approximately what I am thinking about.

And it should also report results of manual runs :-)

task
|| /task | Fail ||
|| /reserve | Pass ||
|| /manual-run/task | Fail ||
|| /manual-run/task | Pass ||
|| /reserve/end | Pass ||
next_task
...

(unless one would want not to...)
Comment 5 Šimon Lukašík 2010-08-13 05:45:59 EDT
(In reply to comment #4)
> task
> || /task | Fail ||
> || /reserve | Pass ||
> || /manual-run/task | Fail ||
> || /manual-run/task | Pass ||
> || /reserve/end | Pass ||
> next_task
> ...

+1
Comment 6 David Kovalsky 2011-04-11 06:43:05 EDT
Caution has to be taken so all machines in Beaker are not blocked out. If a mass run on limited architectures (think s390s) fails and machine gets reserved for extra 24h (think - Friday evening) then this doesn't help you much and still holds the machine. See also bug 694733.

I guess we can use common sense and educate people :)
Comment 7 Šimon Lukašík 2011-04-11 06:59:22 EDT
David, I completely agree with common sense. :) 

Still, I think it worth to consider at least something like:

  --task=/distribution/reservesys --taskparam="RETURN_WHEN_PASS=True"

Such mechanism, I hope, when used instead of reservesys could save
some machine time.
Comment 8 Martin Cermak 2012-01-18 10:46:30 EST
Very good idea, +1!

The risk of machine block-out is serious however. Maybe some very short reserve time could be used by default and the user would have to run extendtestingtime.sh manually if he really planned to dig into the problem.
Comment 9 Bill Peck 2012-08-20 13:01:01 EDT
on gerrit for review
Comment 13 Bill Peck 2012-08-30 10:10:43 EDT
Hello Petr,

Here is the syntax to use for this

<task name="/distribution/reservesys" role="STANDALONE">
	<params>
		<param name="RESERVETIME" value="86400"/>
		<param name="RESERVE_IF_FAIL" value="1"/>
	</params>
</task>
Comment 14 Dan Callaghan 2012-08-30 19:12:38 EDT
(In reply to comment #12)
> any previous test failed then reservesys?

Yes, this one. Pass RESERVE_IF_FAIL="1" to reservesys as Bill has shown, and then the reservation will only happen if some other task in the recipe has failed. If everything passed then /distribution/reservesys will also immediately pass without reserving the system.
Comment 15 Dan Callaghan 2012-09-06 00:39:18 EDT
Beaker 0.9.3 has been released.
Comment 19 Dan Callaghan 2012-09-27 21:32:14 EDT
*** Bug 596912 has been marked as a duplicate of this bug. ***

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