[PATCH] testbot: Also mark the VM for maintenance if the reverts get stuck.
Francois Gouget
fgouget at codeweavers.com
Wed Jun 6 17:29:38 CDT 2018
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 at codeweavers.com>
---
Live QEmu snapshots are still unusable when when the clock is set to the
LibVirt default, that is:
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
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 a191f0e1c..10c0b70ed 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;
--
2.17.0
More information about the wine-devel
mailing list