3604df
From e777c70b061c182460285948cb198b41a4102318 Mon Sep 17 00:00:00 2001
3604df
From: Soumya Koduri <skoduri@redhat.com>
3604df
Date: Mon, 28 Nov 2016 17:56:35 +0530
3604df
Subject: [PATCH 210/227] common-HA: Increase timeout for portblock RA of
3604df
 action=unblock
3604df
3604df
Portblock RA of action type unblock stores the information about
3604df
the client/server IPs connection in tickle_dir folder created in
3604df
the shared storage. In case of node shutdown/reboot there could be
3604df
cases wherein shared_storage may become unavailable for sometime.
3604df
Hence increase the timeout to avoid that resource agent going into
3604df
FAILED state.
3604df
3604df
This is backport of below upstream mainline patch -
3604df
 http://review.gluster.org/15947
3604df
3604df
release-3.9:
3604df
 http://review.gluster.org/#/c/15994/
3604df
3604df
>Change-Id: I4f98f819895cb164c3a82ba8084c7c11610f35ff
3604df
>BUG: 1399154
3604df
>Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3604df
>Reviewed-on: http://review.gluster.org/15947
3604df
>Smoke: Gluster Build System <jenkins@build.gluster.org>
3604df
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
3604df
>Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
3604df
>Reviewed-by: Niels de Vos <ndevos@redhat.com>
3604df
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
3604df
>Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
3604df
3604df
BUG: 1398261
3604df
Change-Id: I4f863972bc5dd02e13c66966bae484628dce955a
3604df
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3604df
Reviewed-on: https://code.engineering.redhat.com/gerrit/91871
3604df
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
3604df
---
3604df
 extras/ganesha/scripts/ganesha-ha.sh | 8 +++++++-
3604df
 1 file changed, 7 insertions(+), 1 deletion(-)
3604df
3604df
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
3604df
index 5bdc893..7d024da 100644
3604df
--- a/extras/ganesha/scripts/ganesha-ha.sh
3604df
+++ b/extras/ganesha/scripts/ganesha-ha.sh
3604df
@@ -30,6 +30,10 @@ SERVICE_MAN="DISTRO_NOT_FOUND"
3604df
 RHEL6_PCS_CNAME_OPTION="--name"
3604df
 SECRET_PEM="/var/lib/glusterd/nfs/secret.pem"
3604df
 
3604df
+# UNBLOCK RA uses shared_storage which may become unavailable
3604df
+# during any of the nodes reboot. Hence increase timeout value.
3604df
+PORTBLOCK_UNBLOCK_TIMEOUT="60s"
3604df
+
3604df
 # Try loading the config from any of the distro
3604df
 # specific configuration locations
3604df
 if [ -f /etc/sysconfig/ganesha ]
3604df
@@ -501,7 +505,9 @@ setup_create_resources()
3604df
 
3604df
         pcs -f ${cibfile} resource create ${1}-nfs_unblock ocf:heartbeat:portblock protocol=tcp \
3604df
         portno=2049 action=unblock ip=${ipaddr} reset_local_on_unblock_stop=true \
3604df
-        tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group ${1}-group --after ${1}-cluster_ip-1
3604df
+        tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group ${1}-group --after ${1}-cluster_ip-1 \
3604df
+        op stop timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} op start timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} \
3604df
+        op monitor interval=10s timeout=${PORTBLOCK_UNBLOCK_TIMEOUT}
3604df
         if [ $? -ne 0 ]; then
3604df
             logger "warning pcs resource create ${1}-nfs_unblock failed"
3604df
         fi
3604df
-- 
3604df
2.9.3
3604df