[pgpool-committers: 2946] pgpool: Fixing network interface monitoring mechanism of watchdog.

Muhammad Usama m.usama at gmail.com
Fri Jan 22 03:34:49 JST 2016


Fixing network interface monitoring mechanism of watchdog.

When the network cable is unplugged some Linux flavors un-assign all the IP
addresses assigned to that network on which the cable was unplugged while other
keeps the IP addresses and only un-sets the LOWER_UP bit in the if_flags.
The problem was we were only considering the first case where all IP addresses
gets removed when the network is unplugged, and the mechanism was failing on the
system where the flag bit indicates the network cable unplug.
The fix is to, along with the address change notifications, the watchdog now
also listens to link change notifications (RTM_NEWLINK and RTM_DELLINK) and upon
receiving the link change event it checks the ifa_flags bits to decide if the
link is active or inactive

The commit also adds a new configuration parameter "wd_monitoring_interfaces_list"
to make this network interface monitoring configurable. This new config parameter
can be assigned the list of interface names to monitor and watchdog will continue
if at least one interface is active from that list.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=d2f40a7ae574c9a3684040fae3f28557460b96cc

Modified Files
--------------
doc/pgpool-en.html                         |  17 +++
src/config/pool_config.c                   | 101 +++++++------
src/config/pool_config.l                   |  27 ++++
src/include/pool_config.h                  |   2 +
src/include/watchdog/watchdog.h            |   3 +
src/include/watchdog/wd_utils.h            |   4 +-
src/sample/pgpool.conf.sample              |   7 +
src/sample/pgpool.conf.sample-master-slave |   6 +
src/sample/pgpool.conf.sample-replication  |   6 +
src/sample/pgpool.conf.sample-stream       |   6 +
src/utils/pool_process_reporting.c         |  13 ++
src/watchdog/watchdog.c                    | 222 ++++++++++++++++++++++++---
src/watchdog/wd_if.c                       | 234 +++++++++--------------------
13 files changed, 413 insertions(+), 235 deletions(-)



More information about the pgpool-committers mailing list