diff options
author | Martin Schwenke <martin@meltin.net> | 2012-07-30 11:50:53 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2012-07-30 15:57:56 +1000 |
commit | ff0830037ef7af07dfd4388b03df60b1166d42cf (patch) | |
tree | ebb31fc1a6fe6c575c83ac2cb176f64248b23b48 | |
parent | e7c8e0d32d4b35ac25143c45e5ff60ca92070c3e (diff) | |
download | samba-ff0830037ef7af07dfd4388b03df60b1166d42cf.tar.gz samba-ff0830037ef7af07dfd4388b03df60b1166d42cf.tar.xz samba-ff0830037ef7af07dfd4388b03df60b1166d42cf.zip |
Revert "Eventscripts - make 13.per_ip_routing fail gracefully if config is missing"
When the configuration file is missing this causes the node to
flip-flop betwen unhealthy (when takeip fails) and healthy (no monitor
event here).
Will reimplement this properly.
This reverts commit 351ca413eec460330571ca8b01ad269728fe15df.
(This used to be ctdb commit 5277d749c9111716fd723647d5421907476422bf)
-rwxr-xr-x | ctdb/config/events.d/13.per_ip_routing | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ctdb/config/events.d/13.per_ip_routing b/ctdb/config/events.d/13.per_ip_routing index 07687c0f5f..2b18265e33 100755 --- a/ctdb/config/events.d/13.per_ip_routing +++ b/ctdb/config/events.d/13.per_ip_routing @@ -166,7 +166,6 @@ clean_up_table_ids () # This prints the config for an IP, which is either relevant entries # from the config file or, if set to the magic link local value, some # link local routing config for the IP. -# NOTE: non-zero return indicates missing configuration file get_config_for_ip () { _ip="$1" @@ -180,8 +179,6 @@ get_config_for_ip () fi done <"${CTDB_PUBLIC_ADDRESSES:-${CTDB_BASE:-/dev/null}${CTDB_BASE:+/public_addresses}}" else - [ -f "$CTDB_PER_IP_ROUTING_CONF" ] || return 1 - while read _i _rest ; do if [ "$_ip" = "$_i" ] ; then printf "%s\t%s\n" "$_ip" "$_rest" @@ -194,9 +191,7 @@ ip_has_configuration () { _ip="$1" - _config="$(get_config_for_ip $_ip)" || \ - die "error: CTDB_PER_IP_ROUTING_CONF=$CTDB_PER_IP_ROUTING_CONF file not found" - [ -n "$_config" ] + [ -n "$(get_config_for_ip $_ip)" ] } add_routing_for_ip () @@ -278,7 +273,7 @@ add_missing_routes () add_routing_for_ip "$_iface" "$_ip" fi done - } || exit $? + } } ###################################################################### |