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-avoid-failing-svc-if-down.patch
1 From c3448b1536d50291dc5ca49dce5957c39403cc82 Mon Sep 17 00:00:00 2001
2 From: Bin Qian <bin.qian@windriver.com>
3 Date: Wed, 29 Aug 2018 11:00:22 -0400
4 Subject: [PATCH 1/1] avoid failing service when I/F is down
5
6 ---
7  heartbeat/IPaddr2 | 24 ++++++------------------
8  1 file changed, 6 insertions(+), 18 deletions(-)
9
10 diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
11 index 86009b9..2da5c5e 100755
12 --- a/heartbeat/IPaddr2
13 +++ b/heartbeat/IPaddr2
14 @@ -968,12 +968,8 @@ ip_start() {
15                 then
16                         exit $OCF_SUCCESS
17                 else
18 -                       if [ "$OCF_RESKEY_dc" = "yes" ]; then
19 -                               ocf_log info "NIC $NIC is DOWN..."
20 -                               exit $OCF_SUCCESS
21 -                       else
22 -                               exit $OCF_ERR_GENERIC
23 -                       fi
24 +                       ocf_log info "NIC $NIC is DOWN..."
25 +                       exit $OCF_SUCCESS
26                 fi
27         fi
28         
29 @@ -1037,12 +1033,8 @@ ip_start() {
30         then
31                 exit $OCF_SUCCESS
32         else
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 +               ocf_log info "NIC $NIC is DOWN"
40 +               exit $OCF_SUCCESS
41         fi
42  }
43  
44 @@ -1123,12 +1115,8 @@ ip_monitor() {
45                 then
46                         return $OCF_SUCCESS
47                 else
48 -                       if [ "$OCF_RESKEY_dc" = "yes" ]; then
49 -                               ocf_log info "NIC $NIC is DOWN"
50 -                               return $OCF_SUCCESS
51 -                       else
52 -                               return $OCF_NOT_RUNNING
53 -                       fi
54 +                       ocf_log info "NIC $NIC is DOWN"
55 +                       exit $OCF_SUCCESS
56                 fi
57                 ;;
58         partial|no|partial2)
59 -- 
60 1.8.3.1
61