Module: tools Branch: master Commit: 11ddd2e812b14c7558b9fc3642c0043ca7cab2d9 URL: https://source.winehq.org/git/tools.git/?a=commit;h=11ddd2e812b14c7558b9fc36...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Oct 1 03:35:57 2019 +0200
testbot/WineRunBuild: Tweak the 'powered off VM' notification email.
Show the Libvirt Domain's state and point to the job page as we do in the other WineRun* scripts.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/WineRunBuild.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index 89582a1..71e7e39 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -337,15 +337,18 @@ if (!$Debug and $VM->Status ne "running") Error("The VM is not ready for use (" . $VM->Status . ")\n"); WrapUpAndExit('queued'); } -if (!$VM->GetDomain()->IsPoweredOn()) +my $Domain = $VM->GetDomain(); +if (!$Domain->IsPoweredOn()) { # Maybe the VM was prepared in advance and got taken down by a power outage? # Requeue the task and treat this event as a failed revert to avoid infinite # loops. Error("The VM is not powered on\n"); NotifyAdministrator("Putting the ". $VM->Name ." VM offline", - "The VM is not powered on despite its status being 'running'.\n". - "The VM has been put offline and the TestBot will try to regain\n". + "The ". $VM->Name ." VM should have been powered on to run the task\n". + "below but its state was ". $Domain->GetStateDescription() ." instead.\n". + MakeSecureURL(GetTaskURL($JobId, $StepNo, $TaskNo)) ."\n\n". + "So the VM has been put offline and the TestBot will try to regain\n". "access to it."); WrapUpAndExit('queued', undef, undef, 'boterror vm off'); }