pgpool2.git / summary / log / commit / refs
commit 7f752d7606f758c5959dc91bb96346bef11de6e4
Author: Muhammad Usama <m.usama@gmail.com>
Date: Mon Dec 21 14:03:35 2015 +0000
pgpool-II should fail to start when watchdog add request is rejected.
When watchdog ADD request is rejected due to configuration inconsistency,
the FATAL error in watchdog child should also take down the
pgpool-II main process with it.
The problem was pointed out by Yugo.
src/watchdog/watchdog.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/watchdog/watchdog.c b/src/watchdog/watchdog.c
index f03b6cd28..6fbb54a9d 100644
--- a/src/watchdog/watchdog.c
+++ b/src/watchdog/watchdog.c
@@ -3492,7 +3492,8 @@ static int watchdog_state_machine_joining(WD_EVENTS event, WatchdogNode* wdNode,
case WD_REJECT_MESSAGE:
if (wdNode->state == WD_ADD_MESSAGE_SENT)
ereport(FATAL,
- (errmsg("Add to watchdog cluster request is rejected by node \"%s:%d\"",wdNode->hostname,wdNode->wd_port),
+ (return_code(POOL_EXIT_FATAL),
+ errmsg("Add to watchdog cluster request is rejected by node \"%s:%d\"",wdNode->hostname,wdNode->wd_port),
errhint("check the watchdog configurations.")));
break;
@@ -3596,7 +3597,8 @@ static int watchdog_state_machine_initializing(WD_EVENTS event, WatchdogNode* wd
case WD_REJECT_MESSAGE:
if (wdNode->state == WD_ADD_MESSAGE_SENT)
ereport(FATAL,
- (errmsg("Add to watchdog cluster request is rejected by node \"%s:%d\"",wdNode->hostname,wdNode->wd_port),
+ (return_code(POOL_EXIT_FATAL),
+ errmsg("Add to watchdog cluster request is rejected by node \"%s:%d\"",wdNode->hostname,wdNode->wd_port),
errhint("check the watchdog configurations.")));
break;
default:
[parent: 8038107d8e1b]