From d33201312325056d38cafe57f5387887497c2771 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 24 Jun 2015 22:28:33 +1000 Subject: [PATCH] ctdb-scripts: Remove functions startstop_nfs() and startstop_nfslock() Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/config/functions | 121 ------------------------------- ctdb/tests/eventscripts/scripts/local.sh | 1 - 2 files changed, 122 deletions(-) diff --git a/ctdb/config/functions b/ctdb/config/functions index 1b79585daa6..5079fdf4d79 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -704,76 +704,6 @@ startstop_ganesha() esac } -######################################################## -# start/stop the nfs service on different platforms -######################################################## -startstop_nfs() { - PLATFORM="unknown" - [ -x $CTDB_ETCDIR/init.d/nfsserver ] && { - PLATFORM="sles" - } - [ -x $CTDB_ETCDIR/init.d/nfslock -o \ - -r /usr/lib/systemd/system/nfs-lock.service ] && { - PLATFORM="rhel" - } - - case $PLATFORM in - sles) - case $1 in - start) - service nfsserver start - ;; - stop) - service nfsserver stop > /dev/null 2>&1 - ;; - restart) - set_proc "fs/nfsd/threads" 0 - service nfsserver stop > /dev/null 2>&1 - pkill -9 nfsd - nfs_dump_some_threads - service nfsserver start - ;; - restart-stop) - set_proc "fs/nfsd/threads" 0 - service nfsserver stop > /dev/null 2>&1 - pkill -9 nfsd - ;; - esac - ;; - rhel) - case $1 in - start) - service nfslock start - service nfs start - ;; - stop) - service nfs stop - service nfslock stop - ;; - restart) - set_proc "fs/nfsd/threads" 0 - service nfs stop > /dev/null 2>&1 - service nfslock stop > /dev/null 2>&1 - pkill -9 nfsd - nfs_dump_some_threads - service nfslock start - service nfs start - ;; - restart-stop) - set_proc "fs/nfsd/threads" 0 - service nfs stop > /dev/null 2>&1 - service nfslock stop > /dev/null 2>&1 - pkill -9 nfsd - ;; - esac - ;; - *) - echo "Unknown platform. NFS is not supported with ctdb" - exit 1 - ;; - esac -} - # Dump up to the configured number of nfsd thread backtraces. nfs_dump_some_threads () { @@ -786,57 +716,6 @@ nfs_dump_some_threads () } ######################################################## -# start/stop the nfs lockmanager service on different platforms -######################################################## -startstop_nfslock() { - PLATFORM="unknown" - [ -x $CTDB_ETCDIR/init.d/nfsserver ] && { - PLATFORM="sles" - } - [ -x $CTDB_ETCDIR/init.d/nfslock -o \ - -r /usr/lib/systemd/system/nfs-lock.service ] && { - PLATFORM="rhel" - } - - case $PLATFORM in - sles) - # for sles there is no service for lockmanager - # so we instead just shutdown/restart nfs - case $1 in - start) - service nfsserver start - ;; - stop) - service nfsserver stop > /dev/null 2>&1 - ;; - restart) - service nfsserver stop > /dev/null 2>&1 - service nfsserver start - ;; - esac - ;; - rhel) - case $1 in - start) - service nfslock start - ;; - stop) - service nfslock stop > /dev/null 2>&1 - ;; - restart) - service nfslock stop > /dev/null 2>&1 - service nfslock start - ;; - esac - ;; - *) - echo "Unknown platform. NFS locking is not supported with ctdb" - exit 1 - ;; - esac -} - -######################################################## add_ip_to_iface () { diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh index 6ba96fbf7d9..6bcf08278ae 100644 --- a/ctdb/tests/eventscripts/scripts/local.sh +++ b/ctdb/tests/eventscripts/scripts/local.sh @@ -814,7 +814,6 @@ setup_nfs () eventscript_call ctdb_service_unmanaged service "nfs" force-stopped service "nfslock" force-stopped - eventscript_call startstop_nfs stop export CTDB_MANAGED_SERVICES="foo bar" unset CTDB_MANAGES_NFS -- 2.11.4.GIT