Skip to content

3.2 features #905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Anvil/Tools/DRBD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1640,9 +1640,9 @@ LIMIT 1
foreach my $volume_href (@{$host_href->{volume}})
{
my $volume = $volume_href->{vnr};
my $drbd_path = $volume_href->{device}->[0]->{content};
my $lv_path = $volume_href->{disk}->[0];
my $by_res = "/dev/drbd/by-res/".$this_resource."/".$volume;
my $drbd_path = $by_res; # This used to be '/dev/drbd_<server_name>_<volume>' before it was phased out.
my $minor = $volume_href->{device}->[0]->{minor};
$anvil->data->{drbd}{config}{$host}{resource}{$this_resource}{volume}{$volume}{drbd_path} = "/dev/drbd".$minor;
### TODO: Anything using these are broken as the values get rewritten and
Expand Down
1 change: 1 addition & 0 deletions Anvil/Tools/ScanCore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2574,6 +2574,7 @@ LIMIT 1;";

foreach my $this_switch (sort {$a cmp $b} keys %{$anvil->data->{fence_data}{$agent}{switch}})
{
next if not defined $anvil->data->{fence_data}{$agent}{switch}{$this_switch}{name};
my $this_name = $anvil->data->{fence_data}{$agent}{switch}{$this_switch}{name};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
this_switch => $this_switch,
Expand Down
5 changes: 0 additions & 5 deletions anvil.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ Requires: fence-agents-virsh
Requires: firewalld
Requires: freeipmi
Requires: glibc-all-langpacks
Requires: gpm
Requires: hdparm
Requires: htop
Requires: iotop
Expand All @@ -86,9 +85,7 @@ Requires: kernel-devel
Requires: kernel-headers
Requires: lsscsi
Requires: lsof
Requires: mlocate
Requires: net-snmp-utils
Requires: NetworkManager-initscripts-updown
Requires: nvme-cli
Requires: parted
Requires: pciutils
Expand Down Expand Up @@ -166,11 +163,9 @@ Requires: createrepo
Requires: dejavu-sans-fonts
Requires: dejavu-sans-mono-fonts
Requires: dejavu-serif-fonts
Requires: dhcp-server
Requires: firefox
Requires: gcc
Requires: gdm
Requires: gnome-terminal
Requires: netpbm-progs
Requires: nmap
Requires: nodejs
Expand Down
18 changes: 14 additions & 4 deletions man/anvil-manage-server.8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Manpage for the Alteeve! anvil-manage-server tool
.\" Contact [email protected] to report issues, concerns or suggestions.
.TH anvil-manage-server "8" "September 11 2024" "Anvil! Intelligent Availability™ Platform"
.TH anvil-manage-server "8" "May 12 2025" "Anvil! Intelligent Availability™ Platform"
.SH NAME
anvil-manage-server \- Tool used to manage a server, like resyncing servers on a rebuilt host.
.SH SYNOPSIS
Expand All @@ -10,36 +10,46 @@ anvil-manage-server \- Tool used to manage a server, like resyncing servers on a
anvil-manage-server \- This tool allow the management of a server.
.IP
.SH OPTIONS
.TP
\-?, \-h, \fB\-\-help\fR
.IP
Show this man page.
.TP
\fB\-\-log\-secure\fR
.IP
When logging, record sensitive data, like passwords.
.TP
\-v, \-vv, \-vvv
Set the log level to 1, 2 or 3 respectively. Be aware that level 3 generates a significant amount of log data.
.IP
.SS "Commands:"
.TP
\fB\-\-boot\-after\fR <'none', 'stay-off', name or uuid>
.IP
This will control the boot order of the server when booting all servers (ie: after restoring power). If this is set to 'none', then the server will not wait on any other servers. When shutting down all servers, the boot order is reversed! That is to say, the specified server will shut down before the \fB\-\-boot\-after\fR server.
.TP
.IP
If this is set to '\fB\-\-boot\-after\fR stay-off', the server will not be booted, unless specifically asked to boot by the user.
.TP
.IP
If no server name or UUID is given, the current configuration will be reported. This requires \fB\-\-server\fR to be passed with a specific name or UUID.
.TP
\fB\-\-delay\fR <seconds, default '30'>
.IP
This can be used along with \fB\-\-boot\-after\fR to control the minimum amount of time to wait after the dependant server boots. Note that this is the minimum delay. The actual delay could be longer in practice.
.TP
.IP
.B Note
.IP
When shutting down all servers, the delay is ignored. Dependant servers will not shut down until this server is off, regardless of how long that takes.
.TP
\fB\-\-job\-uuid\fR
.IP
This is the jobs -> job_uuid of the job to run, if it exists.
.TP
\fB\-\-server\fR <'all', name or uuid>
.IP
This is the server to work on.
.TP
\fB\-\-resync\fR
.IP
This will check to see if the server is syncing 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 synced (alphabetically, stopping if there are insufficient resources).
.IP
.SH AUTHOR
Expand Down
16 changes: 8 additions & 8 deletions scancore-agents/scan-server/scan-server
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ sub collect_data
elsif ((not $anvil->data->{'scan-server'}{server_name}{$server_name}{server_boot_time}) or ($anvil->data->{servers}{server_uuid}{$server_uuid}{server_state} eq "shut off"))
{
# It booted. Record the start time.
my $runtime = $anvil->Server->get_runtime({server => $server_name});
my $runtime = $anvil->Server->get_runtime({debug => 2, server => $server_name});
$server_boot_time = $runtime ? time - $runtime : 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
runtime => $runtime,
Expand All @@ -555,7 +555,7 @@ sub collect_data
{
# It's not in the database yet, add it.
$added = 1;
my $runtime = $anvil->Server->get_runtime({server => $server_name});
my $runtime = $anvil->Server->get_runtime({debug => 2, server => $server_name});
$server_boot_time = $runtime ? time - $runtime : 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
runtime => $runtime,
Expand Down Expand Up @@ -920,7 +920,7 @@ sub collect_data
# off".
if ($old_server_state eq "shut off")
{
my $runtime = $anvil->Server->get_runtime({server => $server_name});
my $runtime = $anvil->Server->get_runtime({debug => 2, server => $server_name});
my $server_boot_time = time - $runtime;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
server_boot_time => $server_boot_time." (".$anvil->Get->date_and_time({use_time => $server_boot_time}).")",
Expand Down Expand Up @@ -1556,7 +1556,7 @@ sub get_and_parse_database_definition
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { database_definition => $database_definition }});

my $problem = $anvil->Server->parse_definition({
debug => 3,
debug => 2,
server => $server_name,
source => "from_db",
definition => $database_definition,
Expand Down Expand Up @@ -1586,7 +1586,7 @@ sub get_and_parse_disk_definition
$anvil->Storage->get_file_stats({file_path => $xml_file});

my $problem = $anvil->Server->parse_definition({
debug => 3,
debug => 2,
server => $server_name,
source => "from_disk",
definition => $on_disk_definition,
Expand Down Expand Up @@ -1675,7 +1675,7 @@ sub get_and_parse_virsh_definition
}

my $problem = $anvil->Server->parse_definition({
debug => 3,
debug => 2,
server => $server_name,
source => $source,
definition => $virsh_definition_inactive,
Expand Down Expand Up @@ -1743,7 +1743,7 @@ sub update_definitions_from_virsh
my ($anvil, $server_name, $server_uuid, $virsh_definition) = @_;

my $problem = $anvil->Server->parse_definition({
debug => 3,
debug => 2,
server => $server_name,
source => "from_virsh",
definition => $virsh_definition,
Expand Down Expand Up @@ -1792,7 +1792,7 @@ sub update_database_definition
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { server_definition_uuid => $server_definition_uuid }});

my $problem = $anvil->Server->parse_definition({
debug => 3,
debug => 2,
server => $server_name,
source => "new_definition",
definition => $new_definition,
Expand Down
8 changes: 4 additions & 4 deletions share/words.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2687,10 +2687,10 @@ The file: [#!variable!file!#] needs to be updated. The difference is:
<key name="log_0714">Closing the firewall port: [#!variable!port!#/#!variable!protocol!#] for the zone: [#!variable!zone!#]!</key>
<key name="log_0715">Closing the firewall port range: [#!variable!port!#/#!variable!protocol!#] for the zone: [#!variable!zone!#]!</key>
<key name="log_0716">Changes were made to the firewall, reloading now.</key>
<key name="log_0717">This server will boot: [#!variable!delay!#] after the server: [#!variable!server!#]. Checking if it's time to boot it or not.</key>
<key name="log_0718">The server: [#!variable!boot_after_server!#] hasn't booted yet, holding off booting: [#!variable!this_server!#].</key>
<key name="log_0717">This server will boot: [#!variable!delay!#] after the server: [#!variable!server!#] on the node: [#!variable!node!#]. Checking if it's time to boot it or not.</key>
<key name="log_0718">The server: [#!variable!boot_after_server!#] on the node: [#!variable!node!#] hasn't booted yet, holding off booting: [#!variable!this_server!#].</key>
<key name="log_0719">Evaluating the booting of the server: [#!variable!server!#].</key>
<key name="log_0720">The server: [#!variable!boot_after_server!#] has booted, but we need to wait: [#!variable!time_to_wait!#] seconds before we can start this server: [#!variable!this_server!#].</key>
<key name="log_0720">The server: [#!variable!boot_after_server!#] on the node: [#!variable!node!#] has booted, but we need to wait: [#!variable!time_to_wait!#] seconds before we can start this server: [#!variable!this_server!#].</key>
<key name="log_0721">The server: [#!variable!server!#] is ready to boot.</key>
<key name="log_0722">The server: [#!variable!server!#] was found to be running already, but it wasn't marked as booted. Marking it as if it just booted to handle any dependent servers.</key>
<key name="log_0723">The server: [#!variable!server!#] is configured to stay off, ignoring it.</key>
Expand Down Expand Up @@ -4107,7 +4107,7 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
====
The duplicate will be removed.</key>
<key name="warning_0004">Unable to stop servers, failed to parse the CIB. Will try again shortly.</key>
<key name="warning_0005">The server: [#!variable!server_name!#] can't stop yet. It's waiting for: [#!variable!wait_for_server_name!#] to turn "off", but it's status is: [#!variable!wait_for_server_status!# (#!variable!wait_for_server_role!#)].</key>
<key name="warning_0005">The server: [#!variable!server_name!#] can't stop yet. It's waiting for: [#!variable!wait_for_server_name!#] on the node: [#!variable!node!#] to be "shut off", but it's status is: [#!variable!wait_for_server_status!#].</key>
<key name="warning_0006">Not all servers asked to stop, will check again shortly.</key>
<key name="warning_0007">[ Warning ] - The job: [#!variable!command!#] was picked up by: [#!variable!pid!#], but that process is not running and it appears to only be: [#!variable!percent!# %] complete. Restarting the job.</key>
<key name="warning_0008">[ Warning ] - Failed to connect to the local host via Sys::Virt using the URI: [#!variable!uri!#]. The error, if any, was: [#!variable!error!#].</key>
Expand Down
Loading