VM->ChildDeadline may be unset not only while in debug mode if the VM is in maintenance mode, but also if another VM sharing the same hypervisor domain is in maintenance mode. So rather than relying on the VM status, just use a default value as a fallback.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/LibvirtTool.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl index f3ea1987f..f135b9b51 100755 --- a/testbot/bin/LibvirtTool.pl +++ b/testbot/bin/LibvirtTool.pl @@ -579,8 +579,7 @@ sub Revert() if ($ExtraTimeout) { Debug(Elapsed($Start), " Extend the $VMKey revert deadline by $ExtraTimeout\n"); - my $Deadline = $VM->Status eq "maintenance" ? (time() + $VMToolTimeout) : - $VM->ChildDeadline; + my $Deadline = $VM->ChildDeadline || (time() + $VMToolTimeout); $VM->ChildDeadline($Deadline + $ExtraTimeout); $VM->Save(); }