|
|
5fdbe4 |
From 47dd1d16f08de06d512f9e04c3966c35f0ac4d3f Mon Sep 17 00:00:00 2001
|
|
|
5fdbe4 |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
5fdbe4 |
Date: Wed, 27 May 2020 13:05:57 +0200
|
|
|
5fdbe4 |
Subject: [PATCH] nfsserver: fix NFSv4-only support
|
|
|
5fdbe4 |
|
|
|
5fdbe4 |
When disabling NFSv2 and NFSv3 mountd doesnt register with rpcbind, but
|
|
|
5fdbe4 |
it's still running. This patch checks that mountd is running instead of
|
|
|
5fdbe4 |
basing its status on it being registered w/rpcbind.
|
|
|
5fdbe4 |
---
|
|
|
5fdbe4 |
heartbeat/nfsserver | 6 +++---
|
|
|
5fdbe4 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
5fdbe4 |
|
|
|
5fdbe4 |
diff --git a/heartbeat/nfsserver b/heartbeat/nfsserver
|
|
|
5fdbe4 |
index acef0147a..9e6e1fcb1 100755
|
|
|
5fdbe4 |
--- a/heartbeat/nfsserver
|
|
|
5fdbe4 |
+++ b/heartbeat/nfsserver
|
|
|
5fdbe4 |
@@ -316,7 +316,7 @@ nfsserver_systemd_monitor()
|
|
|
5fdbe4 |
fi
|
|
|
5fdbe4 |
|
|
|
5fdbe4 |
ocf_log debug "Status: nfs-mountd"
|
|
|
5fdbe4 |
- rpcinfo -t localhost 100005 > /dev/null 2>&1
|
|
|
5fdbe4 |
+ ps axww | grep -q "[r]pc.mountd"
|
|
|
5fdbe4 |
rc=$?
|
|
|
5fdbe4 |
if [ "$rc" -ne "0" ]; then
|
|
|
5fdbe4 |
ocf_exit_reason "nfs-mountd is not running"
|
|
|
5fdbe4 |
@@ -683,7 +683,7 @@ nfsserver_start ()
|
|
|
5fdbe4 |
local i=1
|
|
|
5fdbe4 |
while : ; do
|
|
|
5fdbe4 |
ocf_log info "Start: nfs-mountd i: $i"
|
|
|
5fdbe4 |
- rpcinfo -t localhost 100005 > /dev/null 2>&1
|
|
|
5fdbe4 |
+ ps axww | grep -q "[r]pc.mountd"
|
|
|
5fdbe4 |
rc=$?
|
|
|
5fdbe4 |
if [ "$rc" -eq "0" ]; then
|
|
|
5fdbe4 |
break;
|
|
|
5fdbe4 |
@@ -800,7 +800,7 @@ nfsserver_stop ()
|
|
|
5fdbe4 |
|
|
|
5fdbe4 |
nfs_exec stop nfs-mountd > /dev/null 2>&1
|
|
|
5fdbe4 |
ocf_log info "Stop: nfs-mountd"
|
|
|
5fdbe4 |
- rpcinfo -t localhost 100005 > /dev/null 2>&1
|
|
|
5fdbe4 |
+ ps axww | grep -q "[r]pc.mountd"
|
|
|
5fdbe4 |
rc=$?
|
|
|
5fdbe4 |
if [ "$rc" -eq "0" ]; then
|
|
|
5fdbe4 |
ocf_exit_reason "Failed to stop nfs-mountd"
|