Francois Gouget : testbot/Engine: Make sure not to schedule jobs on VMs undergoing maintenance!.
Alexandre Julliard
julliard at winehq.org
Tue Sep 10 13:33:03 CDT 2019
Module: tools
Branch: master
Commit: faf695bc06e43191a6af80075c0eda859bdf7942
URL: https://source.winehq.org/git/tools.git/?a=commit;h=faf695bc06e43191a6af80075c0eda859bdf7942
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Sep 10 11:07:52 2019 +0200
testbot/Engine: Make sure not to schedule jobs on VMs undergoing maintenance!.
After a series of revert failures the scheduler would put the VM in
maintenance mode but still put it in the list of VMs that can be
reverted to run a new task.
Now such VMs are put in the busy list so no task is scheduled on them.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/lib/WineTestBot/Engine/Scheduler.pm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index 3ce9089..1b42ea9 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -274,15 +274,22 @@ sub _CheckAndClassifyVMs()
{
my $Errors = ($VM->Errors || 0) + 1;
$VM->Errors($Errors);
- $NewStatus = "maintenance" if ($Errors >= $MaxVMErrors);
+ if ($Errors >= $MaxVMErrors)
+ {
+ $NewStatus = "maintenance";
+ $Sched->{busyvms}->{$VMKey} = 1;
+ }
}
$VM->Status($NewStatus);
$VM->KillChild();
$VM->Save();
$VM->RecordResult($Sched->{records}, "boterror stuck process");
- $Sched->{lambvms}->{$VMKey} = 1;
- $Host->{dirty}++;
- $Host->{active}++;
+ if ($NewStatus eq "dirty")
+ {
+ $Sched->{lambvms}->{$VMKey} = 1;
+ $Host->{dirty}++;
+ $Host->{active}++;
+ }
}
elsif ($VM->Status =~ /^(?:dirty|running|reverting)$/)
{
More information about the wine-cvs
mailing list