From 6ae434eeb3bfe421f34e624182d46ee11f57c736 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Wed, 8 Apr 2015 08:03:58 -0400 Subject: ganesha-ha: more robust pid file handling fix bug with reading pid file to determine if ganesha.nfsd is running Change-Id: I4050a119e2be93578045a221b67f616e152546d9 BUG: 1188184 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: http://review.gluster.org/10163 Tested-by: Gluster Build System Reviewed-by: Niels de Vos --- extras/ganesha/ocf/ganesha_mon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'extras/ganesha/ocf/ganesha_mon') diff --git a/extras/ganesha/ocf/ganesha_mon b/extras/ganesha/ocf/ganesha_mon index c03d7ee5ec9..6ba7178235b 100644 --- a/extras/ganesha/ocf/ganesha_mon +++ b/extras/ganesha/ocf/ganesha_mon @@ -96,8 +96,9 @@ ganesha_mon_monitor() { local short_host=$(hostname -s) - if [ -d /proc/$(cat /var/run/ganesha.nfsd.pid) ]; then - # logger "ganesha_mon_monitor(), attrd_updater -n ganesha-active -v 1" + if [ -e /var/run/ganesha.nfsd.pid -a \ + -d /proc/$(cat /var/run/ganesha.nfsd.pid) ]; then + # logger "note: ganesha_mon_monitor() pcs resource delete ${short_host}-dead_ip-1" pcs resource delete ${short_host}-dead_ip-1 # if [ $? -ne 0 ]; then # logger "warning: pcs resource delete ${short_host}-dead_ip-1" @@ -111,8 +112,7 @@ ganesha_mon_monitor() fi else - # logger "ganesha_mon_monitor(), attrd_updater --D -n ganesha-active" - + # logger "note: ganesha_mon_montor(), pcs resource create ${short_host}-dead_ip-1 ocf:heartbeat:Dummy" pcs resource create ${short_host}-dead_ip-1 ocf:heartbeat:Dummy if [ $? -ne 0 ]; then logger "warning: pcs resource create ${short_host}-dead_ip-1 ocf:heartbeat:Dummy failed" -- cgit