|
|
937446 |
diff -uNr a/heartbeat/nfsserver b/heartbeat/nfsserver
|
|
|
937446 |
--- a/heartbeat/nfsserver 2016-07-21 12:38:01.298076314 +0200
|
|
|
937446 |
+++ b/heartbeat/nfsserver 2016-07-21 12:39:05.345432538 +0200
|
|
|
937446 |
@@ -245,14 +245,8 @@
|
|
|
937446 |
fp="$OCF_RESKEY_nfs_shared_infodir"
|
|
|
937446 |
: ${OCF_RESKEY_nfs_notify_cmd="$DEFAULT_NOTIFY_CMD"}
|
|
|
937446 |
: ${OCF_RESKEY_nfs_notify_foreground="$DEFAULT_NOTIFY_FOREGROUND"}
|
|
|
937446 |
-
|
|
|
937446 |
-if [ -z ${OCF_RESKEY_rpcpipefs_dir} ]; then
|
|
|
937446 |
- rpcpipefs_make_dir=$fp/rpc_pipefs
|
|
|
937446 |
- rpcpipefs_umount_dir=${DEFAULT_RPCPIPEFS_DIR}
|
|
|
937446 |
-else
|
|
|
937446 |
- rpcpipefs_make_dir=${OCF_RESKEY_rpcpipefs_dir}
|
|
|
937446 |
- rpcpipefs_umount_dir=${OCF_RESKEY_rpcpipefs_dir}
|
|
|
937446 |
-fi
|
|
|
937446 |
+: ${OCF_RESKEY_rpcpipefs_dir="$DEFAULT_RPCPIPEFS_DIR"}
|
|
|
937446 |
+OCF_RESKEY_rpcpipefs_dir=${OCF_RESKEY_rpcpipefs_dir%/}
|
|
|
937446 |
|
|
|
937446 |
# Use statd folder if it exists
|
|
|
937446 |
if [ -d "/var/lib/nfs/statd" ]; then
|
|
|
937446 |
@@ -554,7 +548,7 @@
|
|
|
937446 |
fi
|
|
|
937446 |
|
|
|
937446 |
[ -d "$fp" ] || mkdir -p $fp
|
|
|
937446 |
- [ -d "$rpcpipefs_make_dir" ] || mkdir -p $rpcpipefs_make_dir
|
|
|
937446 |
+ [ -d "$OCF_RESKEY_rpcpipefs_dir" ] || mkdir -p $OCF_RESKEY_rpcpipefs_dir
|
|
|
937446 |
[ -d "$fp/v4recovery" ] || mkdir -p $fp/v4recovery
|
|
|
937446 |
|
|
|
937446 |
[ -d "$fp/$STATD_DIR" ] || mkdir -p "$fp/$STATD_DIR"
|
|
|
937446 |
@@ -603,9 +597,18 @@
|
|
|
937446 |
|
|
|
937446 |
unbind_tree ()
|
|
|
937446 |
{
|
|
|
937446 |
- if `mount | grep -q " on $rpcpipefs_umount_dir"`; then
|
|
|
937446 |
- umount -t rpc_pipefs $rpcpipefs_umount_dir
|
|
|
937446 |
- fi
|
|
|
937446 |
+ local i=1
|
|
|
937446 |
+ while `mount | grep -q " on $OCF_RESKEY_rpcpipefs_dir"` && [ "$i" -le 10 ]; do
|
|
|
937446 |
+ ocf_log info "Stop: umount ($i/10 attempts)"
|
|
|
937446 |
+ umount -t rpc_pipefs $OCF_RESKEY_rpcpipefs_dir
|
|
|
937446 |
+ sleep 1
|
|
|
937446 |
+ i=$((i + 1))
|
|
|
937446 |
+ done
|
|
|
937446 |
+
|
|
|
937446 |
+ case $EXEC_MODE in
|
|
|
937446 |
+ [23]) nfs_exec stop var-lib-nfs-rpc_pipefs.mount;;
|
|
|
937446 |
+ esac
|
|
|
937446 |
+
|
|
|
937446 |
if is_bound /var/lib/nfs; then
|
|
|
937446 |
umount /var/lib/nfs
|
|
|
937446 |
fi
|
|
|
937446 |
@@ -771,6 +774,8 @@
|
|
|
937446 |
prepare_directory
|
|
|
937446 |
bind_tree
|
|
|
937446 |
|
|
|
937446 |
+ mount -t rpc_pipefs sunrpc $OCF_RESKEY_rpcpipefs_dir
|
|
|
937446 |
+
|
|
|
937446 |
# remove the sm-notify pid so sm-notify will be allowed to run again without requiring a reboot.
|
|
|
937446 |
rm -f /var/run/sm-notify.pid
|
|
|
937446 |
#
|