Beginning to repurpose anvil-manage-server for server resync

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 9 months ago
parent 8028bf226f
commit b74900c2fc
  1. 52
      man/anvil-manage-server.8
  2. 13
      scancore-agents/scan-drbd/scan-drbd
  3. 2351
      tools/anvil-manage-server

@ -1,13 +1,13 @@
.\" Manpage for the Alteeve! anvil-manage-server tool
.\" Contact mkelly@alteeve.com to report issues, concerns or suggestions.
.TH anvil-manage-server "8" "October 19 2022" "Anvil! Intelligent Availability™ Platform"
.TH anvil-manage-server "8" "Mar 21 2024" "Anvil! Intelligent Availability™ Platform"
.SH NAME
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.
.SH SYNOPSIS
.B anvil-manage-server
\fI\,<command> \/\fR[\fI\,options\/\fR]
.SH DESCRIPTION
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
.SH OPTIONS
.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}{drive} = ""; # drive being modified (insert/eject ISO, growing drive)
$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
.SH AUTHOR
Written by Madison Kelly, Alteeve staff and the Anvil! project contributors.

@ -100,6 +100,8 @@ find_changes($anvil);
check_config($anvil);
find_missing_resources($anvil);
fix_things($anvil);
# Shut down.
@ -110,6 +112,17 @@ $anvil->ScanCore->agent_shutdown({agent => $THIS_FILE});
# Functions #
#############################################################################################################
# If this node has been rebuilt, we'll need to add missing DRBD resources. This isn't done in
# anvil-join-anvil as the backing VG may not show free space if the user simply deleted the '/home'
# partition.
sub find_missing_resources
{
my ($anvil) = @_;
return(0);
}
# This looks for issues that we can fix, and if any are found, we try to fix them.
sub fix_things
{

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save