Blob Blame History Raw
From 29365c5ab3681fd954423ef8f081bd7b11934621 Mon Sep 17 00:00:00 2001
From: Soumya Koduri <skoduri@redhat.com>
Date: Tue, 20 Dec 2016 18:22:02 +0530
Subject: [PATCH 254/257] common-ha: Correct the VIP assigned to the new node
 added

There is a regression introduced with patch#16115. An incorrect
VIP gets assigned to the new node being added to the cluster.
This patch fixes the same.

This is backport of below upstream patches
        http://review.gluster.org/#/c/16213 (mainline)
        http://review.gluster.org/#/c/16269/ (release-3.9)

>Change-Id: I468c7d16bf7e4efa04692db83b1c5ee58fbb7d5f
BUG: 1406401
Signed-off-by: Soumya Koduri <skoduri@redhat.com>

Change-Id: Ie751e9832468056f60c93002949488eda274ad30
Reviewed-on: https://code.engineering.redhat.com/gerrit/93569
Tested-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-by: Jiffin Thottan <jthottan@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 extras/ganesha/scripts/ganesha-ha.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index 2a653c9..0388316 100644
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -619,16 +619,16 @@ addnode_recreate_resources()
     recreate_resources ${cibfile} ${HA_SERVERS}
 
     pcs -f ${cibfile} resource create ${add_node}-nfs_block ocf:heartbeat:portblock \
-    protocol=tcp portno=2049 action=block ip=${ipaddr} --group ${add_node}-group
+    protocol=tcp portno=2049 action=block ip=${add_vip} --group ${add_node}-group
     if [ $? -ne 0 ]; then
         logger "warning pcs resource create ${add_node}-nfs_block failed"
     fi
     pcs -f ${cibfile} resource create ${add_node}-cluster_ip-1 ocf:heartbeat:IPaddr \
-    ip=${ipaddr} cidr_netmask=32 op monitor interval=15s --group ${add_node}-group \
+    ip=${add_vip} cidr_netmask=32 op monitor interval=15s --group ${add_node}-group \
     --after ${add_node}-nfs_block
     if [ $? -ne 0 ]; then
         logger "warning pcs resource create ${add_node}-cluster_ip-1 ocf:heartbeat:IPaddr \
-	ip=${ipaddr} cidr_netmask=32 op monitor interval=15s failed"
+	ip=${add_vip} cidr_netmask=32 op monitor interval=15s failed"
     fi
 
     pcs -f ${cibfile} constraint order nfs-grace-clone then ${add_node}-cluster_ip-1
@@ -636,7 +636,7 @@ addnode_recreate_resources()
         logger "warning: pcs constraint order nfs-grace-clone then ${add_node}-cluster_ip-1 failed"
     fi
     pcs -f ${cibfile} resource create ${add_node}-nfs_unblock ocf:heartbeat:portblock \
-    protocol=tcp portno=2049 action=unblock ip=${ipaddr} reset_local_on_unblock_stop=true \
+    protocol=tcp portno=2049 action=unblock ip=${add_vip} reset_local_on_unblock_stop=true \
     tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group ${add_node}-group --after \
     ${add_node}-cluster_ip-1 op stop timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} op start \
     timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} op monitor interval=10s \
-- 
2.9.3