Francois Gouget : testbot: Also mark the VM for maintenance if the reverts get stuck.
Module: tools Branch: master Commit: fca14eaa91f0ba811c5b90c028f6e824d07f8742 URL: https://source.winehq.org/git/tools.git/?a=commit;h=fca14eaa91f0ba811c5b90c0... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Jun 7 00:29:38 2018 +0200 testbot: Also mark the VM for maintenance if the reverts get stuck. When a VM takes a long time to revert the LibvirtTool.pl process typically remains stuck in the Sys::Virt::DomainSnapshot::revert_to() call and cannot enforce the timeout itself, thus causing the timeout to be detected at the TestBot Engine level. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/WineTestBot/Engine/Scheduler.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm index a191f0e..10c0b70 100644 --- a/testbot/lib/WineTestBot/Engine/Scheduler.pm +++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm @@ -267,8 +267,15 @@ sub _CheckAndClassifyVMs() { # The child process got stuck! $FoundVMErrors = 1; + my $NewStatus = "dirty"; + if ($VM->Status eq "reverting" or $VM->Status eq "sleeping") + { + my $Errors = ($VM->Errors || 0) + 1; + $VM->Errors($Errors); + $NewStatus = "maintenance" if ($Errors >= $MaxVMErrors); + } + $VM->Status($NewStatus); $VM->KillChild(); - $VM->Status("dirty"); $VM->Save(); $VM->RecordResult($Sched->{records}, "boterror stuck process"); $Sched->{lambvms}->{$VMKey} = 1;
participants (1)
-
Alexandre Julliard