cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/rgmanager/src/resources clusterfs.sh f ...
@ 2007-05-21 15:58 lhh
  0 siblings, 0 replies; 4+ messages in thread
From: lhh @ 2007-05-21 15:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-05-21 15:58:06

Modified files:
	rgmanager/src/resources: clusterfs.sh fs.sh netfs.sh 

Log message:
	Fix typos in resource script logging

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&r1=1.22&r2=1.23
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/netfs.sh.diff?cvsroot=cluster&r1=1.8&r2=1.9

--- cluster/rgmanager/src/resources/clusterfs.sh	2007/04/19 19:54:35	1.18
+++ cluster/rgmanager/src/resources/clusterfs.sh	2007/05/21 15:58:04	1.19
@@ -771,7 +771,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac
--- cluster/rgmanager/src/resources/fs.sh	2007/04/19 17:53:05	1.22
+++ cluster/rgmanager/src/resources/fs.sh	2007/05/21 15:58:04	1.23
@@ -1103,7 +1103,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac
--- cluster/rgmanager/src/resources/netfs.sh	2007/04/05 15:08:20	1.8
+++ cluster/rgmanager/src/resources/netfs.sh	2007/05/21 15:58:04	1.9
@@ -472,7 +472,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopNFSFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Cluster-devel] cluster/rgmanager/src/resources clusterfs.sh f ...
@ 2007-05-21 15:57 lhh
  0 siblings, 0 replies; 4+ messages in thread
From: lhh @ 2007-05-21 15:57 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-05-21 15:57:29

Modified files:
	rgmanager/src/resources: clusterfs.sh fs.sh netfs.sh 

Log message:
	Fix typos in resource script logging

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.15.2.1&r2=1.15.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.17.2.3&r2=1.17.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/netfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7&r2=1.7.2.1

--- cluster/rgmanager/src/resources/clusterfs.sh	2007/04/19 19:53:41	1.15.2.1
+++ cluster/rgmanager/src/resources/clusterfs.sh	2007/05/21 15:57:29	1.15.2.2
@@ -768,7 +768,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac
--- cluster/rgmanager/src/resources/fs.sh	2007/02/15 22:49:19	1.17.2.3
+++ cluster/rgmanager/src/resources/fs.sh	2007/05/21 15:57:29	1.17.2.4
@@ -1103,7 +1103,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac
--- cluster/rgmanager/src/resources/netfs.sh	2006/09/14 13:54:43	1.7
+++ cluster/rgmanager/src/resources/netfs.sh	2007/05/21 15:57:29	1.7.2.1
@@ -472,7 +472,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopNFSFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Cluster-devel] cluster/rgmanager/src/resources clusterfs.sh f ...
@ 2007-05-21 15:56 lhh
  0 siblings, 0 replies; 4+ messages in thread
From: lhh @ 2007-05-21 15:56 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2007-05-21 15:56:48

Modified files:
	rgmanager/src/resources: clusterfs.sh fs.sh netfs.sh 

Log message:
	Fix #240527

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.12&r2=1.1.2.13
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.22&r2=1.4.2.23
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/netfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.3&r2=1.1.2.4

--- cluster/rgmanager/src/resources/clusterfs.sh	2006/11/27 22:12:27	1.1.2.12
+++ cluster/rgmanager/src/resources/clusterfs.sh	2007/05/21 15:56:47	1.1.2.13
@@ -768,7 +768,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac
--- cluster/rgmanager/src/resources/fs.sh	2007/05/03 15:02:47	1.4.2.22
+++ cluster/rgmanager/src/resources/fs.sh	2007/05/21 15:56:47	1.4.2.23
@@ -1103,7 +1103,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac
--- cluster/rgmanager/src/resources/netfs.sh	2005/10/17 20:25:06	1.1.2.3
+++ cluster/rgmanager/src/resources/netfs.sh	2007/05/21 15:56:47	1.1.2.4
@@ -472,7 +472,7 @@
 	  	;;
 	*)	 		# invalid format
 			ocf_log err \
-"startFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
+"stopNFSFilesystem: Invalid mount point format (must begin with a '/'): \'$mp\'"
 	    	return $FAIL
 	    	;;
 	esac



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Cluster-devel] cluster/rgmanager/src/resources clusterfs.sh f ...
@ 2006-10-20 20:34 lhh
  0 siblings, 0 replies; 4+ messages in thread
From: lhh @ 2006-10-20 20:34 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2006-10-20 20:34:26

Modified files:
	rgmanager/src/resources: clusterfs.sh fs.sh nfsclient.sh 
	                         script.sh 

Log message:
	Fix 202637 - error reporting missing from some agents

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.10&r2=1.1.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.16&r2=1.4.2.17
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/nfsclient.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.9&r2=1.3.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/script.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.4&r2=1.3.2.5

--- cluster/rgmanager/src/resources/clusterfs.sh	2006/10/05 21:57:17	1.1.2.10
+++ cluster/rgmanager/src/resources/clusterfs.sh	2006/10/20 20:34:25	1.1.2.11
@@ -890,12 +890,16 @@
 	;;
 status|monitor)
   	isMounted ${OCF_RESKEY_device} ${OCF_RESKEY_mountpoint}
- 	[ $? -ne $YES ] && exit $OCF_ERR_GENERIC
+ 	if [ $? -ne $YES ]; then
+		ocf_log err "fs:${OCF_RESKEY_name}: ${OCF_RESKEY_device} is not mounted on ${OCF_RESKEY_mountpoint}"
+		exit $OCF_ERR_GENERIC
+	fi
 
  	isAlive ${OCF_RESKEY_mountpoint}
- 	[ $? -ne $YES ] && exit $OCF_ERR_GENERIC
- 	
-	exit 0
+ 	[ $? -eq $YES ] && exit 0
+
+	ocf_log err "fs:${OCF_RESKEY_name}: Mount point is not accessible!"
+	exit $OCF_ERR_GENERIC
 	;;
 restart)
 	stopFilesystem
--- cluster/rgmanager/src/resources/fs.sh	2006/10/05 21:57:17	1.4.2.16
+++ cluster/rgmanager/src/resources/fs.sh	2006/10/20 20:34:25	1.4.2.17
@@ -243,7 +243,7 @@
 {
 	if [ -z "$OCF_RESKEY_mountpoint" ]; then
 		ocf_log err "No mount point specified."
-		return 1
+		return $OCF_ERR_ARGS
 	fi
 
 	if ! [ -e "$OCF_RESKEY_mountpoint" ]; then
@@ -514,7 +514,7 @@
 	dev=$(real_device $1)
 	if [ -z "$dev" ]; then
 		ocf_log err \
-			"isMounted: Could not match $1 with a real device"
+			"fs (isMounted): Could not match $1 with a real device"
 		return $FAIL
 	fi
 	mp=$2
@@ -553,14 +553,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 "fs (isAlive): $mount_point is not a directory"
 		return $FAIL
 	fi
 	
@@ -707,6 +707,7 @@
 	return $ret
 }
 
+
 activeMonitor() {
 	declare monpath=$OCF_RESKEY_mountpoint/.clumanager
 	declare p
@@ -733,7 +734,7 @@
 	case $1 in
 	start)
 		ocf_log info "Starting active monitoring of $OCF_RESKEY_mountpoint"
-		mkdir -p $(dirname $monpath) || return 1
+		mkdir -p $(dirname $monpath) || return $OCF_ERR_GENERIC
 		devmon $args -p $monpath/devmon.data -P $monpath/devmon.pid
 		;;
 	stop)
@@ -794,7 +795,7 @@
 
 	if [ -z "`which quotaon`" ]; then
 		ocf_log err "quotaon not found in $PATH"
-		return 1
+		return $OCF_ERR_GENERIC
 	fi
 
 	for mopt in `echo $opts | sed -e s/,/\ /g`; do
@@ -1215,29 +1216,35 @@
 	;;
 status|monitor)
   	isMounted ${OCF_RESKEY_device} ${OCF_RESKEY_mountpoint}
- 	[ $? -ne $YES ] && exit $OCF_ERR_GENERIC
+ 	if [ $? -ne $YES ]; then
+		ocf_log err "fs:${OCF_RESKEY_name}: ${OCF_RESKEY_device} is not mounted on ${OCF_RESKEY_mountpoint}"
+		exit $OCF_ERR_GENERIC
+	fi
 
 	if [ "$OCF_RESKEY_active_monitor" = "yes" ] ||
 	   [ "$OCF_RESKEY_active_monitor" = "1" ]; then
 
-		activeMonitor status || exit $OCF_ERR_GENERIC
-		exit 0
+	   	activeMonitor status
+		[ $? -eq 0 ] && exit 0
+		ocf_log err "fs:${OCF_RESKEY_name}: Active Monitoring reported a failure"
+		exit $OCF_ERR_GENERIC
 	fi
  	
  	isAlive ${OCF_RESKEY_mountpoint}
- 	[ $? -ne $YES ] && exit $OCF_ERR_GENERIC
- 	
-	exit 0
+ 	[ $? -eq $YES ] && exit 0
+
+	ocf_log err "fs:${OCF_RESKEY_name}: Mount point is not accessible!"
+	exit $OCF_ERR_GENERIC
 	;;
 restart)
 	stopFilesystem
 	if [ $? -ne 0 ]; then
-		exit 1
+		exit $OCF_ERR_GENERIC
 	fi
 
 	startFilesystem
 	if [ $? -ne 0 ]; then
-		exit 1
+		exit $OCF_ERR_GENERIC
 	fi
 
 	exit 0
--- cluster/rgmanager/src/resources/nfsclient.sh	2006/08/02 17:23:27	1.3.2.9
+++ cluster/rgmanager/src/resources/nfsclient.sh	2006/10/20 20:34:25	1.3.2.10
@@ -340,7 +340,11 @@
 		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}" 
+
 	rv=$? 
+	if [ $rv -ne 0 ]; then
+		ocf_log err "nfsclient:$OCF_RESKEY_name is missing!"
+	fi
 	;;
 
 recover)
--- cluster/rgmanager/src/resources/script.sh	2005/11/21 21:48:03	1.3.2.4
+++ cluster/rgmanager/src/resources/script.sh	2006/10/20 20:34:25	1.3.2.5
@@ -110,4 +110,10 @@
 
 # Don't need to catch return codes; this one will work.
 ocf_log info "Executing ${OCF_RESKEY_file} $1"
-exec /bin/sh ${OCF_RESKEY_file} $1
+${OCF_RESKEY_file} $1
+
+declare -i rv=$?
+if [ $rv -ne 0 ]; then
+	ocf_log err "script:$OCF_RESKEY_name: $1 of $OCF_RESKEY_file failed (returned $rv)"
+	return $OCF_ERR_GENERIC
+fi



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-21 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 15:58 [Cluster-devel] cluster/rgmanager/src/resources clusterfs.sh f lhh
  -- strict thread matches above, loose matches on Subject: below --
2007-05-21 15:57 lhh
2007-05-21 15:56 lhh
2006-10-20 20:34 lhh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).