From d8f31d9d84584b2011813eabba83aa1a001e1f2f Mon Sep 17 00:00:00 2001 From: Digimer Date: Tue, 2 Aug 2022 17:25:28 -0400 Subject: [PATCH] * Added the anvil-boot-server man page. Signed-off-by: Digimer --- Anvil/Tools/Cluster.pm | 2 +- man/Makefile.am | 1 + man/alteeve-repo-setup.8 | 2 +- man/anvil-boot-server.8 | 48 ++++++++++++++++++++++++++++++++++++++++ man/anvil-daemon.8 | 2 +- tools/anvil-boot-server | 15 ++----------- 6 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 man/anvil-boot-server.8 diff --git a/Anvil/Tools/Cluster.pm b/Anvil/Tools/Cluster.pm index b7c8e965..f2a0f895 100644 --- a/Anvil/Tools/Cluster.pm +++ b/Anvil/Tools/Cluster.pm @@ -561,7 +561,7 @@ B<< Note >>; The method relies on pacemaker to boot the node. As such, if for so =head3 wait (optional, default '1') -This controls whether the method waits for the server to shut down before returning. By default, it will go into a loop and check every 2 seconds to see if the server is still running. Once it's found to be off, the method returns. If this is set to C<< 0 >>, the method will return as soon as the request to shut down the server is issued. +This controls whether the method waits for the server to actually boot up before returning. By default, it will go into a loop and check every 2 seconds to see if the server is still running. Once it's found to be running, the method returns. If this is set to C<< 0 >>, the method will return as soon as the request to shut down the server is issued. =cut sub boot_server diff --git a/man/Makefile.am b/man/Makefile.am index 63190658..3de3c36b 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -8,5 +8,6 @@ dist_man5_MANS = \ dist_man8_MANS = \ alteeve-repo-setup.8 \ + anvil-boot-server.8 \ anvil-daemon.8 \ scancore.8 diff --git a/man/alteeve-repo-setup.8 b/man/alteeve-repo-setup.8 index cd976f14..afe1d254 100644 --- a/man/alteeve-repo-setup.8 +++ b/man/alteeve-repo-setup.8 @@ -40,7 +40,7 @@ When logging, record sensitive data, like passwords. This tool does not use the main Anvil::Tools modules, so debugging is limited to messaged shown during the run. This enables those debug messages. .SS "Commands:" .TP -\-k, \fB\-\---key\fR +\-k, \fB\-\-key\fR If you have a key, provide it this way. This will configure the host to use the enterprise repository. .TP \-y, \fB\-\-yes\fR diff --git a/man/anvil-boot-server.8 b/man/anvil-boot-server.8 new file mode 100644 index 00000000..0b314f28 --- /dev/null +++ b/man/anvil-boot-server.8 @@ -0,0 +1,48 @@ +.\" Manpage for the Anvil! server boot program +.\" Contact mkelly@alteeve.com to report issues, concerns or suggestions. +.TH anvil-boot-server "8" "August 02 2022" "Anvil! Intelligent Availability™ Platform" +.SH NAME +anvil-boot-server \- Tool used to boot servers (virtual machines) on the Anvil! IA cluster. +.SH SYNOPSIS +.B alteeve-repo-setup +\fI\, \/\fR[\fI\,options\/\fR] +.SH DESCRIPTION +anvil-boot-server \- This tool allows booting of hosted servers on an Anvil! cluster, or a specific sub-node if desired. +.TP +This method, when used with '\fB\-\-server\fR all', will honour server boot priority and delays. +.TP +.SH OPTIONS +.TP +\-?, \-h, \fB\-\-help\fR +Show this man page. +.TP +\fB\-\-log-secure\fR +When logging, record sensitive data, like passwords. +.TP +\-d, \fB\-\-debug\fR +This tool does not use the main Anvil::Tools modules, so debugging is limited to messaged shown during the run. This enables those debug messages. +.SS "Commands:" +.TP +\fB\-\-job-uuid\fR +This is set to the job UUID when the request to boot is coming from a database job. When set, the referenced job will be updated and marked as complete / failed when the run completes. +.TP +\fB\-\-no-wait\fR +This controls whether the request to boot the server waits for the server to actually boot up before returning. Normally, the program will check every couple of seconds to see if the server has actually booted before returning. Setting this tells the program to return as soon as the request to boot the server has been passed on to the resource manager. +.TP +\fB\-\-server\fR +This is either 'all', the name, or server UUID (as set in the definition XML) of the server to boot. +.TP +When set to 'all', all servers assigned to the local sub-cluster are booted. Servers on other Anvil! nodes are not started. +.TP +\fB\-\-server-uuid\fR +This is the server UUID of the server to boot. Generally this isn't needed, except when two servers somehow share the same name. This should not be possible, but this option exists in case it happens anyway. +.TP +\fB\-\-wait\fR +When using '\fB\-\-server\fR all', the request to boot each server will normally not wait for the server to boot. When this is set, this behaviour is changed and the boot will wait before moving on to boot the next server. +.TP +Be away that when this is used, if a server fails to boot, no further servers will be started. +.IP +.SH AUTHOR +Written by Madison Kelly, Alteeve staff and the Anvil! project contributors. +.SH "REPORTING BUGS" +Report bugs to users@clusterlabs.org diff --git a/man/anvil-daemon.8 b/man/anvil-daemon.8 index c0afd305..1fea3440 100644 --- a/man/anvil-daemon.8 +++ b/man/anvil-daemon.8 @@ -21,7 +21,7 @@ Set the log level to 1, 2 or 3 respectively. Be aware that level 3 generates a s .SS "Commands:" .TP \fB\-\-refresh-json\fR (derecated) -Short hand for '--run-once', '--main-loop-only' and '--no-start'. Used to be use to refresh the JSON file used by striker's web interface to know hardware states. +Short hand for '\fB\-\-run-once\fR', '\fB\-\-main-loop-only\fR' and '\fB\-\-no-start\fR'. Used to be use to refresh the JSON file used by striker's web interface to know hardware states. .TP \fB\-\-main-loop-only\fR This skips the one-time, start-up tasks and just goes into the main-loop. diff --git a/tools/anvil-boot-server b/tools/anvil-boot-server index 11945879..69179256 100755 --- a/tools/anvil-boot-server +++ b/tools/anvil-boot-server @@ -27,20 +27,9 @@ $| = 1; my $anvil = Anvil::Tools->new(); -$anvil->data->{switches}{'job-uuid'} = ""; -$anvil->data->{switches}{'no-wait'} = ""; # When set, we'll not wait when we boot a single server -$anvil->data->{switches}{'server'} = ""; -$anvil->data->{switches}{'server-uuid'} = ""; -$anvil->data->{switches}{'wait'} = ""; # When set, we'll wait for each server we boot when using '--all' -$anvil->Get->switches; +$anvil->Get->switches({list => ["job-uuid", "no-wait", "server", "server-uuid", ""], man => $THIS_FILE}); +$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => $anvil->data->{switches}}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 1, secure => 0, key => "log_0115", variables => { program => $THIS_FILE }}); -$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { - 'switches::job-uuid' => $anvil->data->{switches}{'job-uuid'}, - 'switches::no-wait' => $anvil->data->{switches}{'no-wait'}, - 'switches::server' => $anvil->data->{switches}{'server'}, - 'switches::server-uuid' => $anvil->data->{switches}{'server-uuid'}, - 'switches::wait' => $anvil->data->{switches}{'wait'}, -}}); $anvil->Database->connect(); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, secure => 0, key => "log_0132"});