* Fixed a bug in DRBD->gather_data() to remove trailing commas for existing TCP ports.

* Added the missing 'clear-mapping' switch to Get->switches in anvil-daemon.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 2 years ago
parent 3ca8aa45b2
commit a4ef93404c
  1. 8
      Anvil/Tools/DRBD.pm
  2. 2
      tools/anvil-daemon
  3. 3
      tools/anvil-manage-dr

@ -1253,6 +1253,14 @@ sub gather_data
}
next if not $proxy_found;
# Clear off trailing commas
$host1_tcp_ports =~ s/,$//;
$host2_tcp_ports =~ s/,$//;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
"s1:host1_tcp_ports" => $host1_tcp_ports,
"s2:host2_tcp_ports" => $host2_tcp_ports,
}});
# Save the new info.
$anvil->data->{new}{resource}{$resource}{host1_to_host2}{$host1_name}{$host2_name}{host1_ip_address} = $host1_ip_address;
$anvil->data->{new}{resource}{$resource}{host1_to_host2}{$host1_name}{$host2_name}{host1_tcp_port} = $host1_tcp_ports;

@ -117,7 +117,7 @@ if (not $anvil->data->{sys}{database}{connections})
}
# Read switches
$anvil->Get->switches({list => ["refresh-json", "run-once", "main-loop-only", "no-start", "startup-only"], man => $THIS_FILE});
$anvil->Get->switches({list => ["clear-mapping", "refresh-json", "run-once", "main-loop-only", "no-start", "startup-only"], 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__, level => 2, key => "log_0115", variables => { program => $THIS_FILE }});

@ -2436,6 +2436,7 @@ sub process_protect
protocol => "C",
fencing => "resource-and-stonith"
}});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { connections => $connections }});
# Node 1 to DR
$connections .= $anvil->Words->string({key => $file_key, variables => {
@ -2450,6 +2451,7 @@ sub process_protect
protocol => $dr_protocol,
fencing => "dont-care"
}});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { connections => $connections }});
# Node 2 to DR
$connections .= $anvil->Words->string({key => $file_key, variables => {
@ -2464,6 +2466,7 @@ sub process_protect
protocol => $dr_protocol,
fencing => "dont-care"
}});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { connections => $connections }});
my $new_resource_config = $anvil->Words->string({key => "file_0006", variables => {
server => $server_name,

Loading…
Cancel
Save