Remove OCF script code to monitor I/F status

Remove OCF script code to monitor I/F status and fail the service
when the I/F is down.
On the other change, the monitor work is done by SM, to perform
swact based on healthy state of both controllers.

Depends: Ifa7453136f34768b99e2bcd741d1065e69ef452e

Story: 2003577
Task: 24900

Change-Id: Ie3da54940054ef5c1880dae718272be1663026d8
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2018-09-04 13:44:27 -04:00
parent 2a17622218
commit a98bf512c4
3 changed files with 94 additions and 0 deletions

View File

@ -11,3 +11,4 @@ spec-add-ipaddr2-ignore-lo-state.patch
Modify-error-code-of-bz1454699-fix-to-prevent-inactive-controller-reboot-loop.patch
Disable-creation-of-the-debug-package.patch
metapatch-for-arp_bg.patch
ipaddr2-avoid-failing-svc-if-down-meta.patch

View File

@ -0,0 +1,32 @@
From a8fc00f7d84327284643f70638da2201327bdd10 Mon Sep 17 00:00:00 2001
From: Bin Qian <bin.qian@windriver.com>
Date: Wed, 29 Aug 2018 11:22:32 -0400
Subject: [PATCH 1/1] ipaddr2 avoid failing when svc i/f down
---
SPECS/resource-agents.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index aa06c49..0eca09f 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -257,6 +257,7 @@ Patch1118: ipaddr2_if_down.patch
Patch1119: ipaddr2_ignore_lo_if_state.patch
Patch1120: Modify-error-code-of-bz1454699-fix-to-prevent-inactive-controller-reboot-loop.patch
Patch1121: Re-enable-background-execution-of-arp-commands.patch
+Patch1122: ipaddr2-avoid-failing-svc-if-down.patch
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -568,6 +569,7 @@ exit 1
%patch1119 -p1
%patch1120 -p1
%patch1121 -p1
+%patch1122 -p1
%build
if [ ! -f configure ]; then
--
1.8.3.1

View File

@ -0,0 +1,61 @@
From c3448b1536d50291dc5ca49dce5957c39403cc82 Mon Sep 17 00:00:00 2001
From: Bin Qian <bin.qian@windriver.com>
Date: Wed, 29 Aug 2018 11:00:22 -0400
Subject: [PATCH 1/1] avoid failing service when I/F is down
---
heartbeat/IPaddr2 | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
index 86009b9..2da5c5e 100755
--- a/heartbeat/IPaddr2
+++ b/heartbeat/IPaddr2
@@ -885,12 +885,8 @@ ip_start() {
then
exit $OCF_SUCCESS
else
- if [ "$OCF_RESKEY_dc" = "yes" ]; then
- ocf_log info "NIC $NIC is DOWN..."
- exit $OCF_SUCCESS
- else
- exit $OCF_ERR_GENERIC
- fi
+ ocf_log info "NIC $NIC is DOWN..."
+ exit $OCF_SUCCESS
fi
fi
@@ -954,12 +950,8 @@ ip_start() {
then
exit $OCF_SUCCESS
else
- if [ "$OCF_RESKEY_dc" = "yes" ]; then
- ocf_log info "NIC $NIC is DOWN"
- exit $OCF_SUCCESS
- else
- exit $OCF_ERR_GENERIC
- fi
+ ocf_log info "NIC $NIC is DOWN"
+ exit $OCF_SUCCESS
fi
}
@@ -1040,12 +1032,8 @@ ip_monitor() {
then
return $OCF_SUCCESS
else
- if [ "$OCF_RESKEY_dc" = "yes" ]; then
- ocf_log info "NIC $NIC is DOWN"
- return $OCF_SUCCESS
- else
- return $OCF_NOT_RUNNING
- fi
+ ocf_log info "NIC $NIC is DOWN"
+ return $OCF_SUCCESS
fi
;;
partial|no|partial2)
--
1.8.3.1