diff --git a/repmgrd-bdr.c b/repmgrd-bdr.c index 0869a265..c74b63e6 100644 --- a/repmgrd-bdr.c +++ b/repmgrd-bdr.c @@ -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 */