repmgrd: don't run in BDR mode on a node marked as inactive

This commit is contained in:
Ian Barwick
2017-07-14 09:59:56 +09:00
parent aeba2e31f1
commit 875cdf5102

View File

@@ -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 */