summaryrefslogtreecommitdiffstats
path: root/extras/ganesha/ocf/ganesha_grace
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-06-16 09:33:48 -0400
committerNiels de Vos <ndevos@redhat.com>2015-06-19 01:25:46 -0700
commit46bf15e897ee9711835af211c19351a9920d490b (patch)
tree6abf2a4abe8a78d459d5359ade492b6c44cce135 /extras/ganesha/ocf/ganesha_grace
parent4442449f1436e47c84c55c3f0d8f1a8b248db4b6 (diff)
common-ha: cluster setup issues on RHEL7
* use --name on RHEL7 (later versions of pcs drop --name) we guessed wrong and did not get the version that dropped use of --name option * more robust config file param parsing for n/v with ""s in the value after not sourcing the config file * pid file fix. RHEL6 init.d adds -p /var/run/ganesha.nfsd.pid to cmdline options. RHEL7 systemd does not, so defaults to /var/run/ganesha.pid. Change-Id: I575aa13c98f05523cca10c55f2c387200bad3f93 BUG: 1229948 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11257 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Meghana M <mmadhusu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'extras/ganesha/ocf/ganesha_grace')
-rw-r--r--extras/ganesha/ocf/ganesha_grace12
1 files changed, 10 insertions, 2 deletions
diff --git a/extras/ganesha/ocf/ganesha_grace b/extras/ganesha/ocf/ganesha_grace
index dceaccf5e77..75ec16c0fd1 100644
--- a/extras/ganesha/ocf/ganesha_grace
+++ b/extras/ganesha/ocf/ganesha_grace
@@ -88,14 +88,22 @@ ganesha_grace_start()
local resourcename=""
local deadserver=""
local tmpIFS=${IFS}
+ local pid_file="/var/run/ganesha.nfsd.pid"
+
+ # RHEL6 /etc/init.d/nfs-ganesha adds "-p /var/run/ganesha.nfsd.pid"
+ # RHEL7 systemd does not. Would be nicer if all distros used the
+ # same pid file.
+ if [ -e /usr/lib/systemd/system/nfs-ganesha.service ]; then
+ pid_file="/var/run/ganesha.pid"
+ fi
# logger "ganesha_grace_start()"
# we're here because somewhere in the cluster one or more
# of the ganesha.nfsds have died, triggering a floating IP
# address to move. Resource constraint location rules ensure
# that this is invoked before the floating IP is moved.
- if [ -e /var/run/ganesha.nfsd.pid -a \
- -d /proc/$(cat /var/run/ganesha.nfsd.pid) ]; then
+ if [ -e ${pid_file} -a \
+ -d /proc/$(cat ${pid_file} ) ]; then
# my ganesha.nfsd is still running
# find out which one died?