anvil-manage-server \- Tool used to manage a server running on an Anvil! cluster.
anvil-manage-server \- Tool used to manage a server, like resync'ing servers on a rebuilt host.
.SHSYNOPSIS
.Banvil-manage-server
\fI\,<command> \/\fR[\fI\,options\/\fR]
.SHDESCRIPTION
anvil-manage-server \- This tool allow the management of a server's hardware.
anvil-manage-server \- This tool allow the management of a server.
.TP
.SHOPTIONS
.TP
@ -25,49 +25,11 @@ Set the log level for this run to 1, 2 or 3 (higher == more verbose).
.TP
.SS"Commands:"
.TP
\-k, \fB\-\-anvil\fR <name or uuid>
If specified, and \fBserver\fR is not specified, this will list the servers running on the Anvil! system currently. If, in the unlikely event that two servers exist on different Anvil! systems but with the same name, this will help identify which server you want to work on.
\fB\-\-server\fR all, or <name or uuid>
This is the server to work on.
.TP
\-k, \fB\-\-server\fR <name or uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
.TP
\-k, \fB\-\-\fR <uuid>
$anvil->data->{switches}{boot} = ""; # This is a comma-separated list of ordered boot devices
$anvil->data->{switches}{cores} = ""; # This sets the server to use this number of CPU cores.
$anvil->data->{switches}{eject} = ""; # This will eject whatever ISO (if any) in the '--drive'.
$anvil->data->{switches}{'expand-to'} = ""; # When the drive is a disk (backed by a DRBD resource), this is the new desired size to grow to.
$anvil->data->{switches}{insert} = ""; # This is the ISO to insert into the --drive
$anvil->data->{switches}{'job-uuid'} = "";
$anvil->data->{switches}{ram} = ""; # This is the amount of RAM to set the server to use.
$anvil->data->{switches}{server} = ""; # server name or uuid
$anvil->data->{switches}{y} = ""; # Don't prompt for confirmation. Only useful when there isn't a job UUID.
\fB\-\-resync\fR
This will check to see if the server is sync'ing on this host. If it is not, and if there are sufficient free resources, the server will be configured locally. This will create a local logical volume, which will be used to connect to the peer's replicated storage. The definition file will be written out, if needed. If '\fB\-\-server\fR' isn't used, all servers will be sync'ed (alphatically, stopping if there are insufficient resources).
.IP
.SHAUTHOR
Written by Madison Kelly, Alteeve staff and the Anvil! project contributors.
# Is 'libvirtd' running? We'll wait up to half the timeout for it to start (in case it _just_ started)
# before timing out.
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 $look_for_pid = 0;
my $libvirtd_wait = 1;
my $warning_shown = 0;
while($libvirtd_wait)
{
my $running = $anvil->System->check_daemon({daemon => "libvirtd.service"});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { running => $running }});
if ($running)
{
$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_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_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_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_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>
@ -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_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>
@ -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_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_0173">[ Warning ] - Failed to convert: [#!variable!source_file!#] to: [#!variable!new_file!#] (format: [#!variable!format!#]! Return code was: [#!variable!return_code!#], expected '0'.</key>