New feature: Simplify Watchdog related configuration parameters.
authorBo Peng <pengbo@sraoss.co.jp>
Mon, 10 Aug 2020 15:57:46 +0000 (00:57 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Mon, 10 Aug 2020 15:57:46 +0000 (00:57 +0900)
commita840ecb2c0aa15448f7fc63a7b0bb46949a9c24f
tree2c2add8bebc15e0538b81613a8c227ccc030afa9
parentcbf00a98f04d9d0235e7cbd5d97ba1ec22cadd9d
New feature: Simplify Watchdog related configuration parameters.

This commit simplifies watchdog related configuration parameters
by using a common config file for each pgpool node and a pgpool_node_id file.

Previously we need to configure the following parameters on each pgpool node,
because of the difference between local and remote pgpool nodes settings.
- wd_hostname
- wd_port
- wd_heartbeat_port
- heartbeat_device
- heartbeat_destination0
- heartbeat_destination_port0
- heartbeat_destination1
- heartbeat_destination_port1
- other_pgpool_hostname0
- other_pgpool_port0
- other_wd_port0
- other_pgpool_hostname1
- other_pgpool_port1
- other_wd_port1

This commit simplifies watchdog related configuration by using a common config file
for each pgpool node and a pgpool_node_id file, and users just copy the configuration file
to each pgpool node without editing.

The parameters above are changed to (for 3 pgpool nodes):
(For example)
==============================
 hostname0 = 'server1'
 wd_port0 = 9000
 pgpool_port0 = 9999

 hostname1 = 'server2'
 wd_port1 = 9000
 pgpool_port1 = 9999

 hostname2 = 'server3'
 wd_port2 = 9000
 pgpool_port2 = 9999

 heartbeat_hostname0 = 'server1'
 heartbeat_port0 = 9694
 heartbeat_device0 = ''

 heartbeat_hostname1 = 'server2'
 heartbeat_port1 = 9694
 heartbeat_device1 = ''

 heartbeat_hostname2 = 'server3'
 heartbeat_port2 = 9694
 heartbeat_device2 = ''
==============================

You can specify multiple configurations in "heartbeat_hostname" and "heartbeat_device" by separating
them using semicolon (;).

And user needs to specify local pgpool node id in a pgpool_node_id file on each pgpool node.
pgpool_node_id file should be created in the direcroty of pgpool.conf.

In addition, this commit increases "WD_MESSAGE_DATA_VERSION_MINOR" to "2".
48 files changed:
doc.ja/src/sgml/example-watchdog.sgml
doc.ja/src/sgml/watchdog.sgml
doc/src/sgml/example-watchdog.sgml
doc/src/sgml/watchdog.sgml
src/config/pool_config.c
src/config/pool_config_variables.c
src/include/pool.h
src/include/pool_config.h
src/include/watchdog/watchdog.h
src/sample/pgpool.conf.sample-logical
src/sample/pgpool.conf.sample-raw
src/sample/pgpool.conf.sample-replication
src/sample/pgpool.conf.sample-slony
src/sample/pgpool.conf.sample-snapshot
src/sample/pgpool.conf.sample-stream
src/test/regression/tests/004.watchdog/master.conf
src/test/regression/tests/004.watchdog/standby.conf
src/test/regression/tests/004.watchdog/test.sh
src/test/regression/tests/011.watchdog_quorum_failover/master.conf
src/test/regression/tests/011.watchdog_quorum_failover/standby.conf
src/test/regression/tests/011.watchdog_quorum_failover/standby2.conf
src/test/regression/tests/011.watchdog_quorum_failover/test.sh
src/test/regression/tests/012.watchdog_failover_when_quorum_exists/master.conf
src/test/regression/tests/012.watchdog_failover_when_quorum_exists/standby.conf
src/test/regression/tests/012.watchdog_failover_when_quorum_exists/standby2.conf
src/test/regression/tests/012.watchdog_failover_when_quorum_exists/test.sh
src/test/regression/tests/013.watchdog_failover_require_consensus/master.conf
src/test/regression/tests/013.watchdog_failover_require_consensus/standby.conf
src/test/regression/tests/013.watchdog_failover_require_consensus/standby2.conf
src/test/regression/tests/013.watchdog_failover_require_consensus/test.sh
src/test/regression/tests/014.watchdog_test_quorum_bypass/master.conf
src/test/regression/tests/014.watchdog_test_quorum_bypass/test.sh
src/test/regression/tests/015.watchdog_master_and_backend_fail/master.conf
src/test/regression/tests/015.watchdog_master_and_backend_fail/standby.conf
src/test/regression/tests/015.watchdog_master_and_backend_fail/standby2.conf
src/test/regression/tests/015.watchdog_master_and_backend_fail/test.sh
src/test/watchdog_setup
src/tools/pgmd5/Makefile.am
src/tools/pgmd5/Makefile.in
src/tools/watchdog/Makefile.am
src/tools/watchdog/Makefile.in
src/tools/watchdog/wd_cli.c
src/utils/pool_process_reporting.c
src/watchdog/watchdog.c
src/watchdog/wd_heartbeat.c
src/watchdog/wd_ipc_conn.c
src/watchdog/wd_json_data.c
src/watchdog/wd_lifecheck.c