Ctdb can also be configured to ignore checking for knfsd and if it is alive.
In that situation, no attempt will be made to restart nfs, and sicne nfs is not running, lockd can not be restarted either.
To workaround this, everytime we try to restart the lockmanager, also try to restart nfsd
(ctdb_check_rpc "lockd" 100021 1)
[ $? = "0" ] || {
echo "Trying to restart lock manager service"
(ctdb_check_rpc "lockd" 100021 1)
[ $? = "0" ] || {
echo "Trying to restart lock manager service"
startstop_nfslock restart
exit 1
}
startstop_nfslock restart
exit 1
}