Hide Forgot
+++ This bug was initially created as a clone of Bug #592624 +++ Description of problem: The monitoring of the nfsexports to nfsclinents goes in to an endless loop. See attached syslog. When using inheritance in the cluster.conf it looks like /usr/share/cluster/nfsclient.sh can't monitor the export properly. Problem #1: /var/lib/nfs/etab doesn't have a slash '/' at the end of the export path. Yet $OCF_RESKEY_path contains the end slash '/'. When checking if the export is present in: cat $tmpfn | tr -d "\n" | sed -e 's/([^)]*)/\n/g' | grep -q \ "^${OCF_RESKEY_path}[\t ]*.*${OCF_RESKEY_target_tmp}" rv=$? It doesn't match you try to match: /nfsexport/lv_app bamse.niceriver.net with ^/nfsexport/lv_app/[\t ]*.*bamse.niceriver.net No so the monitor is exiting with 1 and the whole thing error out. Problem #2: Ip doesn't work in the target well you try to make it work here. declare OCF_RESKEY_target_tmp=$(clufindhostname -i "$OCF_RESKEY_target") but the fact is that the /var/lib/nfs/etab actually contain the IP address so then it's a no go again due to a miss match.. Anyways here is a version that will work :).. for both IP and hostnames as well as with or without ending '/' -- yes could be more brain behind the regexp but I just made it simple.. declare OCF_RESKEY_target_tmp=$(clufindhostname -i "$OCF_RESKEY_target") if [ $? -ne 0 ]; then [ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn ocf_log err "nfsclient:$OCF_RESKEY_name is missing!" exit 1 fi cat $tmpfn | tr -d "\n" | sed -e 's/([^)]*)/\n/g' | grep -q \ "^${OCF_RESKEY_path}[\t ]*.*${OCF_RESKEY_target_tmp}" rv=$? if [ $rv -eq 0 ]; then [ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn exit 0 fi cat $tmpfn | tr -d "\n" | sed -e 's/([^)]*)/\n/g' | grep -q \ "^${OCF_RESKEY_path}[\t ]*.*${OCF_RESKEY_target}" rv=$? if [ $rv -eq 0 ]; then [ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn exit 0 fi OCF_RESKEY_path_tmp=$(echo $OCF_RESKEY_path | sed -e 's@/$@@') cat $tmpfn | tr -d "\n" | sed -e 's/([^)]*)/\n/g' | grep -q \ "^${OCF_RESKEY_path_tmp}[\t ]*.*${OCF_RESKEY_target_tmp}" rv=$? if [ $rv -eq 0 ]; then [ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn exit 0 fi cat $tmpfn | tr -d "\n" | sed -e 's/([^)]*)/\n/g' | grep -q \ "^${OCF_RESKEY_path_tmp}[\t ]*.*${OCF_RESKEY_target}" rv=$? [ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn if [ $rv -eq 0 ]; then exit 0 fi ocf_log err "nfsclient:$OCF_RESKEY_name is missing! at end" exit 1 ;; --- Additional comment from lhh on 2011-03-28 16:44:48 EDT --- Created attachment 488253 [details] Fixes problem #1. --- Additional comment from lhh on 2011-03-28 16:45:58 EDT --- Problem #2 is fixed by the fix for bug 592613
Missing unit test results from devel.
Created attachment 510473 [details] Test
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2011-1580.html