pgpool2.git / summary / log / commit / refs

commit    0022378814e18ccf2c7570484100c6a5e9c8d46f
Author:   Yugo Nagata <nagata@sraoss.co.jp>
Date:     Mon Feb 24 11:23:41 2014 +0000

    Add dubug messages for analyzing errors in if_up_cmd


src/watchdog/wd_if.c | 12 +++++++++--- src/watchdog/wd_ping.c | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/watchdog/wd_if.c b/src/watchdog/wd_if.c index 2836052d2..9f60acabb 100644 --- a/src/watchdog/wd_if.c +++ b/src/watchdog/wd_if.c @@ -71,6 +71,7 @@ wd_IP_up(void) { if (!wd_is_unused_ip(pool_config->delegate_IP)) break; + pool_debug("wd_IP_up: waiting... count: %d", i+1); } if (i >= WD_TRY_PING_AT_IPUP) @@ -80,10 +81,7 @@ wd_IP_up(void) if (rtn == WD_OK) pool_log("wd_IP_up: ifconfig up succeeded"); else - { - WD_List->delegate_ip_flag = 0; pool_error("wd_IP_up: ifconfig up failed"); - } } else { @@ -230,16 +228,24 @@ exec_ifconfig(char * path,char * command) { if (errno == EINTR) continue; + + pool_debug("exec_ifconfig: wait() failed at errno: %d ", errno); return WD_NG; } if (WIFEXITED(status) == 0 || WEXITSTATUS(status) != 0) + { + pool_debug("exec_ifconfig: '%s' failed. exit status: %d", + command, WEXITSTATUS(status)); return WD_NG; + } else break; } close(pfd[0]); } + + pool_debug("exec_ifconfig: '%s' succeeded", command); return WD_OK; } diff --git a/src/watchdog/wd_ping.c b/src/watchdog/wd_ping.c index 96e2ba26a..cd84bfc78 100644 --- a/src/watchdog/wd_ping.c +++ b/src/watchdog/wd_ping.c @@ -244,7 +244,7 @@ exec_ping(void * arg) } else if (WEXITSTATUS(status) != 0) { - pool_debug("exec_ping: failed to ping %s", thread_arg->hostname); + pool_debug("exec_ping: failed to ping %s: exit code %d", thread_arg->hostname, WEXITSTATUS(status)); return WD_NG; } else [parent: 93da6e417927]