* Improved log messaging to not log of a potential boot failure when the local DRBD volume(s) are all UpToDate and the peer is offline.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent 2c747600b7
commit 02de75a6ab
  1. 25
      ocf/alteeve/server
  2. 1
      share/words.xml

@ -933,7 +933,30 @@ sub start_drbd_resource
else
{
# No access
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "alert", key => "warning_0136", variables => { host => $host }});
my $all_uptodate = 1;
foreach my $volume (sort {$a <=> $b} %{$anvil->data->{drbd}{status}{$local_host}{resource}{$resource}{connection}{$host}{volume}})
{
my $peer_disk_state = $anvil->data->{drbd}{status}{$local_host}{resource}{$resource}{connection}{$host}{volume}{$volume}{'peer-disk-state'};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
volume => $volume,
peer_disk_state => $peer_disk_state,
}});
if (lc($peer_disk_state) ne "uptodate")
{
$all_uptodate = 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { all_uptodate => $all_uptodate }});
}
}
if ($all_uptodate)
{
# Booting should be fine
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0747", variables => { host => $host }});
}
else
{
# Booting might fail...
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "alert", key => "warning_0136", variables => { host => $host }});
}
}
}
}

@ -2413,6 +2413,7 @@ The file: [#!variable!file!#] needs to be updated. The difference is:
<key name="log_0744">A cached request to reboot this host was found (likely from a --no-db update). Registering a job to reboot now!</key>
<key name="log_0745">Adjusting the resource: [#!variable!resource!#] to ensure it's compatible with the peer's config prior to connection.</key>
<key name="log_0746">The local resource: [#!variable!resource!#] is StandAlone, attempting to connect.</key>
<key name="log_0747">Failed to connect to the host: [#!variable!host!#]! Unable to up the resource on it. The volume(s) backing this server are UpToDate locally, so booting should be fine.</key>
<!-- Messages for users (less technical than log entries), though sometimes used for logs, too. -->
<key name="message_0001">The host name: [#!variable!target!#] does not resolve to an IP address.</key>

Loading…
Cancel
Save