File 0002-nfsserver-Use-rpc-statd.service-for-NFS-locking-in-E.patch of Package resource-agents.2497
From 6b6c491ade52e28e09e3b2c79777a6208ff43a77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Tue, 24 Nov 2015 23:20:41 +0100
Subject: [PATCH] nfsserver: Use rpc-statd.service for NFS locking in
EXEC_MODE=3 (bsc#955114)
---
heartbeat/nfsserver | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/heartbeat/nfsserver b/heartbeat/nfsserver
index 6cdde46..02e5dc3 100755
--- a/heartbeat/nfsserver
+++ b/heartbeat/nfsserver
@@ -273,7 +273,7 @@ fi
# EXEC_MODE values
# 1 user init script or default init script
# 2 systemd (with nfs-lock.service)
-# 3 systemd (without nfs-lock.service)
+# 3 systemd (with rpc-statd.service)
#
# On error, this function will terminate the process
# with error code $OCF_ERR_INSTALLED
@@ -319,10 +319,10 @@ set_exec_mode()
fi
##
- # Attempt systemd (without nfs-lock.service).
+ # Attempt systemd (with rpc-statd.service).
##
if which systemctl > /dev/null 2>&1; then
- if systemctl list-unit-files | grep nfs-server > /dev/null; then
+ if systemctl list-unit-files | grep nfs-server > /dev/null && systemctl list-unit-files | grep rpc-statd > /dev/null; then
EXEC_MODE=3
return 0
fi
@@ -354,6 +354,8 @@ v3locking_exec()
if [ $EXEC_MODE -eq 2 ]; then
systemctl $cmd nfs-lock.service
+ elif [ $EXEC_MODE -eq 3 ]; then
+ systemctl $cmd rpc-statd.service
else
case $cmd in
start) locking_start;;
--
2.6.3