On Wed, Jul 11, 2007 at 10:28:52AM +0400, Pavel D. Kuzin wrote: > node2:/usr/share/cluster# clusvcadm -d hosting > Member node2 disabling hosting...success > node2:/usr/share/cluster# rg_test test /etc/cluster/cluster.conf start > service hosting > Running in test mode. > Starting hosting... > /usr/share/cluster/clusterfs.sh: line 729: logAndPrint: command not found > /usr/share/cluster/clusterfs.sh: line 729: logAndPrint: command not found bug, pretty minor, but not a problem. Patch attached; or replacement clusterfs.sh here: http://people.redhat.com/lhh/clusterfs.sh (copy over old one; if you need to "back up" the old one, move it *out* of /usr/share/cluster) > <info> Executing /etc/init.d/httpd start > <info> Executing /etc/init.d/proftpd start > Starting ftp server: proftpd. > Start of hosting complete > node2:/usr/share/cluster# rg_test test /etc/cluster/cluster.conf stop > service hosting > Running in test mode. > Stopping hosting... > <info> Executing /etc/init.d/httpd stop > <info> Executing /etc/init.d/proftpd stop > Stopping ftp server: proftpd. > <info> unmounting /dev/mapper/Hosting-Hosting_data (/usr/hosting) > <info> unmounting /dev/mapper/Hosting-TMP_Data (/tmp) > Stop of hosting complete > node2:/usr/share/cluster# clusvcadm -e hosting > Member node2 trying to enable hosting...failed So on node2, it works from within rg_test but not from clusvcadm. -- Lon Hohberger - Software Engineer - Red Hat, Inc.
? .nfsclient.sh.swp Index: clusterfs.sh =================================================================== RCS file: /cvs/cluster/cluster/rgmanager/src/resources/clusterfs.sh,v retrieving revision 1.1.2.13 diff -u -r1.1.2.13 clusterfs.sh --- clusterfs.sh 21 May 2007 15:56:47 -0000 1.1.2.13 +++ clusterfs.sh 11 Jul 2007 14:12:22 -0000 @@ -354,7 +354,7 @@ typeset junk if [ $# -ne 2 ]; then - logAndPrint $LOG_ERR "Usage: mountInUse device mount_point". + ocf_log err "Usage: mountInUse device mount_point". return $FAIL fi @@ -432,14 +432,14 @@ declare rw if [ $# -ne 1 ]; then - logAndPrint $LOG_ERR "Usage: isAlive mount_point" + ocf_log err "Usage: isAlive mount_point" return $FAIL fi mount_point=$1 test -d $mount_point if [ $? -ne 0 ]; then - logAndPrint $LOG_ERR "$mount_point is not a directory" + ocf_log err "$mount_point is not a directory" return $FAIL fi @@ -726,7 +726,7 @@ # # Mount the device # - logAndPrint $LOG_DEBUG "mount $fstype_option $mount_options $dev $mp" + ocf_log debug "mount $fstype_option $mount_options $dev $mp" mount $fstype_option $mount_options $dev $mp ret_val=$? if [ $ret_val -ne 0 ]; then Index: nfsclient.sh =================================================================== RCS file: /cvs/cluster/cluster/rgmanager/src/resources/nfsclient.sh,v retrieving revision 1.3.2.12 diff -u -r1.3.2.12 nfsclient.sh --- nfsclient.sh 3 May 2007 15:02:47 -0000 1.3.2.12 +++ nfsclient.sh 11 Jul 2007 14:12:22 -0000 @@ -338,13 +338,36 @@ # export OCF_RESKEY_target_regexp=$(echo $OCF_RESKEY_target | \ sed -e 's/*/[*]/g' -e 's/?/[?]/g' -e 's/\./\\./g') - exportfs -v | tr -d "\n" | sed -e 's/([^)]*)/\n/g' | grep -q \ - "^${OCF_RESKEY_path}[\t ]*.*${OCF_RESKEY_target_regexp}" + declare tmpfn=/tmp/nfsclient-$OCF_RESKEY_name.status.$$ + exportfs -v > $tmpfn + cat $tmpfn | tr -d "\n" | sed -e 's/([^)]*)/\n/g' | grep -iq \ + "^${OCF_RESKEY_path}[\t ]*.*${OCF_RESKEY_target_regexp}" rv=$? - if [ $rv -ne 0 ]; then + + if [ $rv -eq 0 ]; then + exit 0 + fi + + declare OCF_RESKEY_target_tmp=$(clufindhostname -i "$OCF_RESKEY_target") + if [ $? -ne 0 ]; then + 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=$? + + rm -f $tmpfn + + if [ $rv -eq 0 ]; then + exit 0 + fi + + ocf_log err "nfsclient:$OCF_RESKEY_name is missing!" + exit 1 ;; recover)
-- Linux-cluster mailing list Linux-cluster@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cluster