ctdb-eventscripts: Make 11.natgw stateful
commit38279d7ec1d877e5c3752fce5c0f74e19f148674
authorMartin Schwenke <martin@meltin.net>
Wed, 26 Mar 2014 05:50:59 +0000 (26 16:50 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 16 Mar 2015 05:41:06 +0000 (16 06:41 +0100)
tree23fcbc8cff00a973f4bca8b6872ef41108be1cb7
parent57a80ebee36aceee307318638c49826df2ca54f4
ctdb-eventscripts: Make 11.natgw stateful

IP addresses and routes are only changed if either the NAT gateway
configuration or the NAT gateway master node has changed.  If running
"ip monitor" this will minimise the amount of noise seen.  It should
also be more lightweight at the expense of managing a couple of state
files.

Add a test to check that configuration changes behave correctly.
Tweak the static route result generation code so that the required
output is sorted.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/11.natgw
ctdb/tests/eventscripts/11.natgw.015.sh
ctdb/tests/eventscripts/11.natgw.025.sh
ctdb/tests/eventscripts/11.natgw.031.sh [copied from ctdb/tests/eventscripts/11.natgw.025.sh with 54% similarity]
ctdb/tests/eventscripts/scripts/local.sh
ctdb/tests/eventscripts/stubs/ip