* Fixed a bug where Database resync's where trying to resync tables without history schema entries.

* Updated fence_delay to move the log filehandle close to a saner spot.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 3 years ago
parent e6dcff1cf1
commit 1770e9e0e0
  1. 7
      Anvil/Tools/Database.pm
  2. 2
      Anvil/Tools/ScanCore.pm
  3. 10
      tools/fence_delay

@ -15960,6 +15960,11 @@ sub resync_databases
{
# We don't sync 'states' as it's transient and sometimes per-DB.
next if $table eq "states";
# Don't sync any table that doesn't have a history schema
next if $table eq "alert_sent";
next if $table eq "states";
next if $table eq "update";
next if $table eq "oui";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { table => $table }});
@ -17899,7 +17904,9 @@ ORDER BY
foreach my $table (sort {$a cmp $b} keys %{$anvil->data->{sys}{database}{table}})
{
# We don't sync 'states' as it's transient and sometimes per-DB.
next if $table eq "alert_sent";
next if $table eq "states";
next if $table eq "update";
next if $table eq "oui";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {

@ -1602,7 +1602,7 @@ sub post_scan_analysis_node
# If we're still here, at least one issue exists. Any kind of load-shed or preventative live
# migration decision now depends on our peer's state. So see if we're both in the cluster or not.
my $problem = $anvil->Cluster->parse_cib({debug => 2});
my $problem = $anvil->Cluster->parse_cib({debug => $debug});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { problem => $problem }});
if (not $problem)
{

@ -120,9 +120,6 @@ sub do_exit
my ($conf, $log, $exit_status) = @_;
$exit_status = 9 if not defined $exit_status;
# Close the log file handle, if it exists.
$log->close() if $log;
record($conf, $log, "system::do_chown: [".$conf->{'system'}{do_chown}."].\n", 2);
if ($conf->{'system'}{do_chown})
{
@ -133,6 +130,9 @@ sub do_exit
chown $uid, $gid, $conf->{'system'}{'log'};
}
# Close the log file handle, if it exists.
$log->close() if $log;
exit ($exit_status);
}
@ -213,8 +213,8 @@ sub metadata
</resource-agent>
`;
# Done, exit.
do_exit($conf, $log, 0);
# Done
return(0);
}
# This handles the actual actions.

Loading…
Cancel
Save