35 lines
994 B
Diff
35 lines
994 B
Diff
From 290741f43ff414630f558ee3432e830e39d1599d Mon Sep 17 00:00:00 2001
|
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
Date: Wed, 22 Jul 2020 11:56:32 +0200
|
|
Subject: [PATCH] nfsserver: stop nfsdcld if present during stop-action
|
|
|
|
---
|
|
heartbeat/nfsserver | 14 ++++++++++++++
|
|
1 file changed, 14 insertions(+)
|
|
|
|
diff --git a/heartbeat/nfsserver b/heartbeat/nfsserver
|
|
index 9e6e1fcb1..0dbc173f3 100755
|
|
--- a/heartbeat/nfsserver
|
|
+++ b/heartbeat/nfsserver
|
|
@@ -806,6 +806,20 @@ nfsserver_stop ()
|
|
ocf_exit_reason "Failed to stop nfs-mountd"
|
|
return $OCF_ERR_GENERIC
|
|
fi
|
|
+
|
|
+ if systemctl --no-legend list-unit-files "nfsdcld*" | grep -q nfsdcld; then
|
|
+ nfs_exec stop nfsdcld > /dev/null 2>&1
|
|
+ ocf_log info "Stop: nfsdcld"
|
|
+ fn=`mktemp`
|
|
+ nfs_exec status nfsdcld > $fn 2>&1
|
|
+ rc=$?
|
|
+ ocf_log debug "$(cat $fn)"
|
|
+ rm -f $fn
|
|
+ if [ "$rc" -eq "0" ]; then
|
|
+ ocf_exit_reason "Failed to stop nfsdcld"
|
|
+ return $OCF_ERR_GENERIC
|
|
+ fi
|
|
+ fi
|
|
esac
|
|
|
|
|