Added forced DB resyncs to striker-manage-peers

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent ed269aa450
commit 1824bb2eed
  1. 16
      tools/striker-manage-peers

@ -60,7 +60,11 @@ if (($< != 0) && ($> != 0))
}
# We'll try to connect in case we're adding additional peers.
$anvil->Database->connect();
$anvil->data->{sys}{database}{resync_needed} = 1;
$anvil->Database->connect({
debug => 2,
check_for_resync => 1,
});
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, secure => 0, key => "log_0132"});
# Am I adding, editing or deleting?
@ -537,7 +541,8 @@ sub process_entry
# Re-read the config.
$anvil->refresh();
# Connect, and configure, if needed.
# Flag a resync, connect, and configure, if needed.
$anvil->data->{sys}{database}{resync_needed} = 1;
$anvil->Database->connect({
debug => 3,
check_for_resync => 1,
@ -621,7 +626,12 @@ sub process_entry
sleep 1;
$anvil->Database->connect({check_for_resync => 1, db_uuid => $host_uuid});
$anvil->data->{sys}{database}{resync_needed} = 1;
$anvil->Database->connect({
debug => 2,
check_for_resync => 1,
db_uuid => $host_uuid,
});
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, secure => 0, key => "log_0132"});
}
}

Loading…
Cancel
Save