[PATCH] testbot/WineRunBuild: Tweak the 'powered off VM' notification email.

Francois Gouget fgouget at codeweavers.com
Mon Sep 30 20:35:57 CDT 2019


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 at codeweavers.com>
---
 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 89582a103..71e7e39f4 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');
 }
-- 
2.20.1




More information about the wine-devel mailing list