Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-support / cluster-resource-agents / resource-agents / stx / ipaddr2_if_down.patch
1 From 573f0835621c5e64c6270260f607624aea29d21a Mon Sep 17 00:00:00 2001
2 From: Bin Qian <bin.qian@windriver.com>
3 Date: Sat, 21 Jan 2017 02:36:39 -0500
4 Subject: [PATCH 1/1] ipaddr2_if_down
5
6 ---
7  heartbeat/IPaddr2 | 21 ++++++++++++++++++---
8  1 file changed, 18 insertions(+), 3 deletions(-)
9
10 diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
11 index 67a7ca3..2cd822d 100755
12 --- a/heartbeat/IPaddr2
13 +++ b/heartbeat/IPaddr2
14 @@ -968,7 +968,12 @@ ip_start() {
15                 then
16                         exit $OCF_SUCCESS
17                 else
18 -                       exit $OCF_ERR_GENERIC
19 +                       if [ "$OCF_RESKEY_dc" = "yes" ]; then
20 +                               ocf_log info "NIC $NIC is DOWN..."
21 +                               exit $OCF_SUCCESS
22 +                       else
23 +                               exit $OCF_ERR_GENERIC
24 +                       fi
25                 fi
26         fi
27         
28 @@ -1032,7 +1037,12 @@ ip_start() {
29         then
30                 exit $OCF_SUCCESS
31         else
32 -               exit $OCF_ERR_GENERIC
33 +               if [ "$OCF_RESKEY_dc" = "yes" ]; then
34 +                       ocf_log info "NIC $NIC is DOWN"
35 +                       exit $OCF_SUCCESS
36 +               else
37 +                       exit $OCF_ERR_GENERIC
38 +               fi
39         fi
40  }
41  
42 @@ -1113,7 +1123,12 @@ ip_monitor() {
43                 then
44                         return $OCF_SUCCESS
45                 else
46 -                       return $OCF_NOT_RUNNING
47 +                       if [ "$OCF_RESKEY_dc" = "yes" ]; then
48 +                               ocf_log info "NIC $NIC is DOWN"
49 +                               return $OCF_SUCCESS
50 +                       else
51 +                               return $OCF_NOT_RUNNING
52 +                       fi
53                 fi
54                 ;;
55         partial|no|partial2)
56 -- 
57 1.9.1
58