Skip to content

Commit caf917a

Browse files
committed
ipfailover - user check script overrides default
When the user supplies a check script, that check script replaces the default check script. bug bz1410721 https://bugzilla.redhat.com/show_bug.cgi?id=1410721 Signed-off-by: Phil Cameron <[email protected]>
1 parent 8394f91 commit caf917a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

images/ipfailover/keepalived/lib/config-generators.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ function generate_global_config() {
4444

4545
#
4646
# Generate VRRP checker script configuration section.
47+
# When port is 0 always pass
48+
# When check script is provided use it instead of default test
4749
#
4850
# Example:
4951
# generate_script_config
@@ -61,8 +63,9 @@ function generate_script_config() {
6163
else
6264
if [[ -n "${HA_CHECK_SCRIPT}" ]]; then
6365
echo " script \"${HA_CHECK_SCRIPT}\""
66+
else
67+
echo " script \"</dev/tcp/${serviceip}/${port}\""
6468
fi
65-
echo " script \"</dev/tcp/${serviceip}/${port}\""
6669
fi
6770

6871
echo " interval ${CHECK_INTERVAL_SECS}"
@@ -165,8 +168,6 @@ function generate_vip_section() {
165168

166169
#
167170
# Generate vrrpd instance configuration section.
168-
# This generates the vrrp_sync_group and vrrp_instance
169-
# There is one VIP per vrrp_sync_group
170171
#
171172
# Examples:
172173
# generate_vrrpd_instance_config arp 1 "10.1.2.3" enp0s8 "252" "master"

0 commit comments

Comments
 (0)