integ/base/cluster-resource-agents/centos/patches/Re-enable-background-execution-of-arp-commands.patch
Al Bailey 2d7009011b Enable background of arp calls in OCF ip scripts
Arp calls were waiting to timeout which caused the action to take 6 seconds
By backgrounding the arp calls it takes 0.2 seconds
This speeds up the critical path for SM and makes swact faster

Change-Id: Ie0e2b7cff35852bf5867e5394e6f0f29cef5d274
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 15:31:54 -04:00

37 lines
1.3 KiB
Diff

From 9cdb2de3b5f1d08d74a762cfda2ade16692ef9db Mon Sep 17 00:00:00 2001
From: Al Bailey <Al.Bailey@windriver.com>
Date: Mon, 28 May 2018 14:09:47 -0500
Subject: [PATCH] WRS. Re-enable background execution of arp commands.
Typical ARP commands are taking 6 seconds due to no responses back after 7 attempts.
This change allows that delay to be backgrounded
---
heartbeat/IPaddr2 | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
index 59620d2..86009b9 100755
--- a/heartbeat/IPaddr2
+++ b/heartbeat/IPaddr2
@@ -719,12 +719,13 @@ run_send_arp() {
if [ $ARP_COUNT -ne 0 ] ; then
ARGS="-i $OCF_RESKEY_arp_interval -c $ARP_COUNT -p $SENDARPPIDFILE -I $NIC -m $MY_MAC $OCF_RESKEY_ip"
ocf_log $LOGLEVEL "$SENDARP $ARGS"
- output=$($SENDARP $ARGS 2>&1)
+ if ocf_is_true $OCF_RESKEY_arp_bg; then
+ ($SENDARP $ARGS || ocf_log err "Could not send gratuitous arps")& >&2
+ else
+ $SENDARP $ARGS || ocf_log err "Could not send gratuitous arps"
+ fi
rc=$?
if [ $rc -ne $OCF_SUCCESS ]; then
- if ! ocf_is_true $OCF_RESKEY_arp_bg; then
- ocf_log err "send_arp output: $output"
- fi
ocf_exit_reason "Could not send gratuitous arps"
exit $OCF_ERR_GENERIC
fi
--
1.8.3.1