These scripts should not modify a VM if its status is not 'running'. This includes not putting it offline.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/WineRunBuild.pl | 7 ++----- testbot/bin/WineRunReconfig.pl | 7 ++----- testbot/bin/WineRunTask.pl | 7 ++----- testbot/bin/WineRunWineTest.pl | 7 ++----- 4 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index 3a1b649e7..c4c136595 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -331,12 +331,9 @@ if ($VM->Type ne "build") if (!$Debug and $VM->Status ne "running") { # Maybe the administrator tinkered with the VM state? In any case the VM - # is not ours to use so requeue the task and abort. + # is not ours to use so requeue the task and abort. Note that the VM will + # not be put offline (again, not ours). Error("The VM is not ready for use (" . $VM->Status . ")\n"); - NotifyAdministrator("Putting the ". $VM->Name ." VM offline", - "The VM status should be 'running' but is '". $VM->Status ."' instead.\n". - "The VM has been put offline and the TestBot will try to regain\n". - "access to it."); WrapUpAndExit('queued'); } if (!$VM->GetDomain()->IsPoweredOn()) diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl index 606027182..91654ea94 100755 --- a/testbot/bin/WineRunReconfig.pl +++ b/testbot/bin/WineRunReconfig.pl @@ -334,12 +334,9 @@ if ($VM->Type ne "build" and $VM->Type ne "wine") if (!$Debug and $VM->Status ne "running") { # Maybe the administrator tinkered with the VM state? In any case the VM - # is not ours to use so requeue the task and abort. + # is not ours to use so requeue the task and abort. Note that the VM will + # not be put offline (again, not ours). Error("The VM is not ready for use (" . $VM->Status . ")\n"); - NotifyAdministrator("Putting the ". $VM->Name ." VM offline", - "The VM status should be 'running' but is '". $VM->Status ."' instead.\n". - "The VM has been put offline and the TestBot will try to regain\n". - "access to it."); WrapUpAndExit('queued'); } my $Domain = $VM->GetDomain(); diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 53aa578a5..1ffd87537 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -389,12 +389,9 @@ if ($VM->Type ne "win32" and $VM->Type ne "win64") if (!$Debug and $VM->Status ne "running") { # Maybe the administrator tinkered with the VM state? In any case the VM - # is not ours to use so requeue the task and abort. + # is not ours to use so requeue the task and abort. Note that the VM will + # not be put offline (again, not ours). Error("The VM is not ready for use (" . $VM->Status . ")\n"); - NotifyAdministrator("Putting the ". $VM->Name ." VM offline", - "The VM status should be 'running' but is '". $VM->Status ."' instead.\n". - "The VM has been put offline and the TestBot will try to regain\n". - "access to it."); WrapUpAndExit('queued'); } my $Domain = $VM->GetDomain(); diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl index e3db27930..c6770aa9d 100755 --- a/testbot/bin/WineRunWineTest.pl +++ b/testbot/bin/WineRunWineTest.pl @@ -389,12 +389,9 @@ if ($VM->Type ne "wine") if (!$Debug and $VM->Status ne "running") { # Maybe the administrator tinkered with the VM state? In any case the VM - # is not ours to use so requeue the task and abort. + # is not ours to use so requeue the task and abort. Note that the VM will + # not be put offline (again, not ours). Error("The VM is not ready for use (" . $VM->Status . ")\n"); - NotifyAdministrator("Putting the ". $VM->Name ." VM offline", - "The VM status should be 'running' but is '". $VM->Status ."' instead.\n". - "The VM has been put offline and the TestBot will try to regain\n". - "access to it."); WrapUpAndExit('queued'); } my $Domain = $VM->GetDomain();