The pid of any process started by the Engine is recorded in the VM's ChildPid field. Also the Engine kills any tool that would still be running before clearing the ChildPid field. So the Engine would not have started LibvirtTool if another process was using that VM.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/LibvirtTool.pl | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl index e348834a2..c27e603f4 100755 --- a/testbot/bin/LibvirtTool.pl +++ b/testbot/bin/LibvirtTool.pl @@ -297,18 +297,7 @@ sub Monitor() if ($IsPoweredOn) { $ErrMessage = $VM->GetDomain()->PowerOff(); - if (defined $ErrMessage) - { - Error "$ErrMessage\n"; - } - else - { - # Another process might have been trying to connect to the VM's - # TestAgent server. Wait for it to time out so it does not set the - # VM offline right after we have put it back online. - LogMsg "Powered off $VMKey. Sleep until all other processes accessing it are gone.\n"; - sleep(3 * $WaitForToolsInVM); - } + Error "$ErrMessage\n" if (defined $ErrMessage); $IsPoweredOn = undef; } }