3604df
From 6dbf0813e2ec1407b41dbcee33d329c7fa90e4f4 Mon Sep 17 00:00:00 2001
3604df
From: Jiffin Tony Thottan <jthottan@redhat.com>
3604df
Date: Wed, 22 Feb 2017 18:30:53 +0530
3604df
Subject: [PATCH 298/300] ganesha/scripts : restart pcs cluster during add node
3604df
3604df
In RHEL 6 due to this change https://review.gluster.org/#/c/16122/
3604df
restart of HA cluster become requirement after adding a node to
3604df
cluster
3604df
After add node "pcs cluster node add <hostname>" following message is
3604df
coming up :
3604df
Warning: Using udpu transport on a RHEL 6 cluster, cluster restart is required to apply node addition
3604df
3604df
Thanks Manisha for founding issue and suggesting the fix.
3604df
3604df
This is backport of the below upstream patch -
3604df
        https://review.gluster.org/16721
3604df
3604df
>Change-Id: I9e55d4ba04ed2555d27f26f71b95b8bd6a67f94c
3604df
>BUG: 1425919
3604df
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
3604df
>Reviewed-on: https://review.gluster.org/16721
3604df
>Smoke: Gluster Build System <jenkins@build.gluster.org>
3604df
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
3604df
>Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
3604df
>Reviewed-by: soumya k <skoduri@redhat.com>
3604df
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
3604df
>Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
3604df
3604df
Change-Id: Iaa843c106d139d70a4c5c6e8263e2676d7b99371
3604df
BUG: 1425748
3604df
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3604df
Reviewed-on: https://code.engineering.redhat.com/gerrit/98581
3604df
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
3604df
---
3604df
 extras/ganesha/scripts/ganesha-ha.sh | 20 ++++++++++++++------
3604df
 1 file changed, 14 insertions(+), 6 deletions(-)
3604df
3604df
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
3604df
index 0c3528b..c807610 100644
3604df
--- a/extras/ganesha/scripts/ganesha-ha.sh
3604df
+++ b/extras/ganesha/scripts/ganesha-ha.sh
3604df
@@ -671,12 +671,6 @@ addnode_create_resources()
3604df
     local add_vip=${1}; shift
3604df
     local cibfile=$(mktemp -u)
3604df
 
3604df
-    # start HA on the new node
3604df
-    pcs cluster start ${add_node}
3604df
-    if [ $? -ne 0 ]; then
3604df
-       logger "warning: pcs cluster start ${add_node} failed"
3604df
-    fi
3604df
-
3604df
     pcs cluster cib ${cibfile}
3604df
     if [ $? -ne 0 ]; then
3604df
         logger "warning: pcs cluster cib ${cibfile} failed"
3604df
@@ -696,6 +690,7 @@ addnode_create_resources()
3604df
         logger "warning: pcs cluster cib-push ${cibfile} failed"
3604df
     fi
3604df
     rm -f ${cibfile}
3604df
+
3604df
 }
3604df
 
3604df
 
3604df
@@ -1077,6 +1072,19 @@ main()
3604df
             logger "warning: pcs cluster node add ${node} failed"
3604df
         fi
3604df
 
3604df
+        sleep 2
3604df
+        # restart of HA cluster required on RHEL 6 because of BZ1404410
3604df
+        pcs cluster stop --all
3604df
+        if [ $? -ne 0 ]; then
3604df
+            logger "warning: pcs cluster stopping cluster failed"
3604df
+        fi
3604df
+
3604df
+        sleep 2
3604df
+        pcs cluster start --all
3604df
+        if [ $? -ne 0 ]; then
3604df
+            logger "warning: pcs cluster starting cluster failed"
3604df
+        fi
3604df
+
3604df
         addnode_create_resources ${node} ${vip}
3604df
         # Subsequent add-node recreates resources for all the nodes
3604df
         # that already exist in the cluster. The nodes are picked up
3604df
-- 
3604df
2.9.3
3604df