# Is 'libvirtd' running? We'll wait up to half the timeout for it to start (in case it _just_ started)
# libvirtd lists as disabled / stopped, but "starts" when called. So checking the daemon doesn't make
# before timing out.
# sense. Given virsh might fail, if we don't find the server, we'll also look for it in 'ps'.
my $wait_until = time + ($anvil->data->{environment}{OCF_RESKEY_CRM_meta_timeout} / 2000); # Devide by 2000 to convert to seconds and total second halved.
my $loop = 1;
my $look_for_pid = 0;
while($loop)
my $libvirtd_wait = 1;
my $warning_shown = 0;
while($libvirtd_wait)
{
{
my $running = $anvil->System->check_daemon({daemon => "libvirtd.service"});
$loop = 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { running => $running }});
my $found = 0;
if ($running)
my $shell_call = $anvil->data->{path}{exe}{setsid}." --wait ".$anvil->data->{path}{exe}{virsh}." list --all";
{
$libvirtd_wait = 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { libvirtd_wait => $libvirtd_wait }});
}
else
{
# On EL8 and above, libvirtd starts on demand, so this error isn't
@ -2377,10 +2377,10 @@ The file: [#!variable!file!#] needs to be updated. The difference is:
<keyname="log_0520">The server: [#!variable!server!#] is indeed running. It will be shut down now.</key>
<keyname="log_0520">The server: [#!variable!server!#] is indeed running. It will be shut down now.</key>
<keyname="log_0521">Checking the status of the server: [#!variable!server!#].</key>
<keyname="log_0521">Checking the status of the server: [#!variable!server!#].</key>
<keyname="log_0522">The 'libvirtd' daemon is not running. It may be starting up, will wait: [#!variable!wait_time!#] seconds...</key>
<keyname="log_0522">The 'libvirtd' daemon is not running. It may be starting up, will wait: [#!variable!wait_time!#] seconds...</key>
<keyname="log_0523">Found the server to be running using it's PID. The state of the server can't be determined, however. Please start the 'libvirtd' daemon!</key>
<keyname="log_0523">Found the server to be running using it's PID. The state of the server can't be determined, however. There appears to be a problem with 'virsh'!</key>
<keyname="log_0524">No PID for the server was found. It is not running on this host.</key>
<keyname="log_0524">No PID for the server was found. It is not running on this host.</key>
<keyname="log_0525">The server: [#!variable!server_name!#] is shutting down. Will wait for it to finish...</key>
<keyname="log_0525">The server: [#!variable!server_name!#] is shutting down. Will wait for it to finish...</key>
<keyname="log_0526">The server: [#!variable!server_name!#] is off.</key>
<keyname="log_0526">The server: [#!variable!server_name!#] is off (not found in virsh or by PID).</key>
<keyname="log_0527">The server: [#!variable!server_name!#] is running (state is: [#!variable!state!#]).</key>
<keyname="log_0527">The server: [#!variable!server_name!#] is running (state is: [#!variable!state!#]).</key>
<keyname="log_0528">We've been asked to migrating the server: [#!variable!server!#] to: [#!variable!target_host!#].</key>
<keyname="log_0528">We've been asked to migrating the server: [#!variable!server!#] to: [#!variable!target_host!#].</key>
<keyname="log_0529">Checking server state after: [#!variable!server!#] was migrated to this host.</key>
<keyname="log_0529">Checking server state after: [#!variable!server!#] was migrated to this host.</key>
@ -2681,7 +2681,7 @@ The file: [#!variable!file!#] needs to be updated. The difference is:
<keyname="log_0805">Getting a screenshot from: [#!variable!server_name!#] (uuid: [#!variable!server_uuid!#]) from the host: [#!variable!host_name!#].</key>
<keyname="log_0805">Getting a screenshot from: [#!variable!server_name!#] (uuid: [#!variable!server_uuid!#]) from the host: [#!variable!host_name!#].</key>
<keyname="log_0806">- Saving the screenshot: [#!variable!ppm_file!#].</key>
<keyname="log_0806">- Saving the screenshot: [#!variable!ppm_file!#].</key>
<keyname="log_0807">- Converting: [#!variable!ppm_file!#] to:
<keyname="log_0807">- Converting: [#!variable!source_file!#] to:
<keyname="log_0809">- Deleting the server: [#!variable!server_name!#]'s screenshot: [#!variable!file!#].</key>
<keyname="log_0809">- Deleting the server: [#!variable!server_name!#]'s screenshot: [#!variable!file!#].</key>
@ -4187,6 +4187,7 @@ We will try to proceed anyway.</key>
<keyname="warning_0170">[ Warning ] - The attempt to boot: [#!variable!host_name!#] appears to have failed. The return code received was: [#!variable!return_code!#] (expected '0'). The output, if any, was: [#!variable!output!#].</key>
<keyname="warning_0170">[ Warning ] - The attempt to boot: [#!variable!host_name!#] appears to have failed. The return code received was: [#!variable!return_code!#] (expected '0'). The output, if any, was: [#!variable!output!#].</key>
<keyname="warning_0171">[ Warning ] - The daemon: [#!variable!daemon!#] appears to have failed! Attempting to restart it now.</key>
<keyname="warning_0171">[ Warning ] - The daemon: [#!variable!daemon!#] appears to have failed! Attempting to restart it now.</key>
<keyname="warning_0172">[ Warning ] - The line: [#!variable!line!#] that was going to be added to the hosts file is invalid, removing it.</key>
<keyname="warning_0172">[ Warning ] - The line: [#!variable!line!#] that was going to be added to the hosts file is invalid, removing it.</key>
<keyname="warning_0173">[ Warning ] - Failed to convert: [#!variable!source_file!#] to: [#!variable!new_file!#] (format: [#!variable!format!#]! Return code was: [#!variable!return_code!#], expected '0'.</key>