mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: don't run in BDR mode on a node marked as inactive
This commit is contained in:
@@ -82,15 +82,20 @@ monitor_bdr(void)
|
||||
if (record_status != RECORD_FOUND)
|
||||
{
|
||||
log_error(_("unable to retrieve record for local node (ID: %i), terminating"),
|
||||
local_node_info.node_id);
|
||||
log_hint(_("check that 'repmgr bdr register' was executed for this node\n"));
|
||||
local_node_info.node_id);
|
||||
log_hint(_("check that 'repmgr bdr register' was executed for this node"));
|
||||
PQfinish(local_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
|
||||
// check if inactive node
|
||||
// -> what to do?
|
||||
if (local_node_info.active == false)
|
||||
{
|
||||
log_error(_("local node (ID: %i) is marked as inactive in repmgr"),
|
||||
local_node_info.node_id);
|
||||
log_hint(_("if the node has been reactivated, run \"repmgr bdr register --force\" and restart repmgrd"));
|
||||
PQfinish(local_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
/* Log startup event */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user