X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-support%2Fcluster-resource-agents%2Fresource-agents%2Fstx%2Fipaddr2_check_if_state.patch;fp=meta-starlingx%2Fmeta-stx-cloud%2Frecipes-support%2Fcluster-resource-agents%2Fresource-agents%2Fstx%2Fipaddr2_check_if_state.patch;h=098896b523a8c6d9ef09926abe7c878275f433f1;hb=e0634c6eaf2fe2641a0fb90e84a5defb880b1335;hp=0000000000000000000000000000000000000000;hpb=210d0f78485e760dffcdd3f630f59cec797f3f11;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/cluster-resource-agents/resource-agents/stx/ipaddr2_check_if_state.patch b/meta-starlingx/meta-stx-cloud/recipes-support/cluster-resource-agents/resource-agents/stx/ipaddr2_check_if_state.patch new file mode 100644 index 0000000..098896b --- /dev/null +++ b/meta-starlingx/meta-stx-cloud/recipes-support/cluster-resource-agents/resource-agents/stx/ipaddr2_check_if_state.patch @@ -0,0 +1,58 @@ +From fb5a76d9050c60b601a5dbbad65ed3dbff041af1 Mon Sep 17 00:00:00 2001 +From: Scott Little +Date: Mon, 2 Oct 2017 15:12:36 -0400 +Subject: [PATCH 03/13] WRS: Patch1107: ipaddr2_check_if_state.patch + +--- + heartbeat/IPaddr2 | 21 ++++++++++++++++++--- + 1 file changed, 18 insertions(+), 3 deletions(-) + +diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2 +index aef6dc7..67a7ca3 100755 +--- a/heartbeat/IPaddr2 ++++ b/heartbeat/IPaddr2 +@@ -964,7 +964,12 @@ ip_start() { + local ip_status=`ip_served` + + if [ "$ip_status" = "ok" ]; then +- exit $OCF_SUCCESS ++ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] ++ then ++ exit $OCF_SUCCESS ++ else ++ exit $OCF_ERR_GENERIC ++ fi + fi + + if [ -n "$IP_CIP" ] && ([ $ip_status = "no" ] || [ $ip_status = "partial2" ]); then +@@ -1023,7 +1028,12 @@ ip_start() { + fi + ;; + esac +- exit $OCF_SUCCESS ++ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] ++ then ++ exit $OCF_SUCCESS ++ else ++ exit $OCF_ERR_GENERIC ++ fi + } + + ip_stop() { +@@ -1099,7 +1109,12 @@ ip_monitor() { + case $ip_status in + ok) + run_arp_sender refresh +- return $OCF_SUCCESS ++ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] ++ then ++ return $OCF_SUCCESS ++ else ++ return $OCF_NOT_RUNNING ++ fi + ;; + partial|no|partial2) + exit $OCF_NOT_RUNNING +-- +1.9.1 +