From a846f9ecbcc85d4d446faae52690f53b7ab9f84c Mon Sep 17 00:00:00 2001 From: Digimer Date: Sat, 22 May 2021 12:25:29 -0400 Subject: [PATCH] * Fix to the database resync logic. The previous change to only resync if 10+ lines differed broke striker-manage-peers as the difference in host counts is what triggered the pairing of strikers. Signed-off-by: Digimer --- Anvil/Tools/Database.pm | 6 ++++-- tools/anvil-daemon | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Anvil/Tools/Database.pm b/Anvil/Tools/Database.pm index 0d5cef26..21345a29 100644 --- a/Anvil/Tools/Database.pm +++ b/Anvil/Tools/Database.pm @@ -16112,8 +16112,10 @@ ORDER BY # To avoid resyncs triggered by the differences that might occur if the row # count changed slightly between counting both/all DBs, we won't resync - # until there's at least 10 rows different. - if ($difference > 10) + # until there's at least 10 rows different. The exception is the hosts file, + # as it needs to resync on a single line difference when adding peer Striker + # dashboards. + if (($table eq "hosts") or ($difference > 10)) { $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, priority => "alert", key => "log_0219", variables => { missing => $difference, diff --git a/tools/anvil-daemon b/tools/anvil-daemon index 0a721d47..41f5227d 100755 --- a/tools/anvil-daemon +++ b/tools/anvil-daemon @@ -17,6 +17,9 @@ # - Write a script that runs in crontab at UTC 17:00 that sends an email if Scancore or anvil-daemon are disabled. # - Examine limites in: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitCPU= # - Write a background program to scan the BCN and uses OUI data to try and find / auto-configure PDUs and UPSes +# - +# - Increase DRBD's default timeout +# - Check for and enable persistent journald logging # # NOTE: # - For later; 'reboot --force --force' immediately kills the OS, like disabling ACPI on EL6 and hitting the