All of lore.kernel.org
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager ChangeLog src/daemons/restre ...
Date: 3 Nov 2006 16:26:21 -0000	[thread overview]
Message-ID: <20061103162621.13777.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2006-11-03 16:26:19

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/daemons: restree.c rg_thread.c 
	rgmanager/src/resources: fs.sh 

Log message:
	Fix #213246 (Patch by Jeff Layton), #213312

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.23&r2=1.5.2.24
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.12&r2=1.10.2.13
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_thread.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.7.2.6&r2=1.7.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.17&r2=1.4.2.18

--- cluster/rgmanager/ChangeLog	2006/10/05 17:52:27	1.5.2.23
+++ cluster/rgmanager/ChangeLog	2006/11/03 16:26:18	1.5.2.24
@@ -1,3 +1,9 @@
+2006-11-03 Lon Hohberger <lhh@redhat.com>
+	* src/daemons/restree.c: Merge patch from Jeff Layton to instrument
+	res_exec more closely. (#213246)
+	* src/daemons/rg_thread.c: Fix segfault caused by improper loop 
+	semantics (#213312)
+
 2006-10-05 Lon Hohberger <lhh@redhat.com>
 	* src/clulib/clulog.c: Change stdout/stderr to nonblocking (#207144
 	part 1)
--- cluster/rgmanager/src/daemons/restree.c	2006/09/21 18:03:30	1.10.2.12
+++ cluster/rgmanager/src/daemons/restree.c	2006/11/03 16:26:18	1.10.2.13
@@ -340,18 +340,30 @@
 	resource_t *res = node->rn_resource;
 	char fullpath[2048];
 
-	if (!res->r_rule->rr_agent)
+	if (!res->r_rule->rr_agent) {
+		clulog(LOG_DEBUG,
+		       "%s on %s \"%s\" no rr_agent\n",
+		       res_ops[op], res->r_rule->rr_type,
+		       res->r_attrs->ra_value);
 		return 0;
+	}
 
 #ifdef DEBUG
 	env = build_env(node, op);
-	if (!env)
+	if (!env) {
+		clulog(LOG_DEBUG,
+		       "%s on %s \"%s\" build_env failed %d\n",
+		       res_ops[op], res->r_rule->rr_type,
+		       res->r_attrs->ra_value, errno);
 		return -errno;
+	}
 #endif
 
 	childpid = fork();
-	if (childpid < 0)
+	if (childpid < 0) {
+		clulog(LOG_ERR, "%s: fork failed (%d)!\n", __func__, errno);
 		return -errno;
+	}
 
 	if (!childpid) {
 		/* Child */ 
@@ -368,8 +380,13 @@
 		env = build_env(node, op, depth);
 #endif
 
-		if (!env)
+		if (!env) {
+			clulog(LOG_DEBUG,
+		       		"%s on %s \"%s\" build_env failed (ENOMEM)\n",
+		       		res_ops[op], res->r_rule->rr_type,
+		       		res->r_attrs->ra_value);
 			exit(-ENOMEM);
+		}
 
 		if (res->r_rule->rr_agent[0] != '/')
 			snprintf(fullpath, sizeof(fullpath), "%s/%s",
@@ -399,7 +416,13 @@
 
 		if (ret) {
 			clulog(LOG_NOTICE,
-			       "%s on %s \"%s\" returned %d (%s)\n",
+			       "%s on %s:%s returned %d (%s)\n",
+			       res_ops[op], res->r_rule->rr_type,
+			       res->r_attrs->ra_value, ret,
+			       ocf_strerror(ret));
+		} else {
+			clulog(LOG_DEBUG,
+			       "%s on %s:%s returned %d (%s)\n",
 			       res_ops[op], res->r_rule->rr_type,
 			       res->r_attrs->ra_value, ret,
 			       ocf_strerror(ret));
@@ -411,6 +434,11 @@
 	if (!WIFSIGNALED(ret))
 		assert(0);
 
+	clulog(LOG_ERR,
+	       "%s on %s:%s caught signal %d\n",
+	       res_ops[op], res->r_rule->rr_type,
+	       res->r_attrs->ra_value, WTERMSIG(ret));
+
 	return -EFAULT;
 }
 
--- cluster/rgmanager/src/daemons/rg_thread.c	2006/05/12 21:28:31	1.7.2.6
+++ cluster/rgmanager/src/daemons/rg_thread.c	2006/11/03 16:26:18	1.7.2.7
@@ -110,18 +110,22 @@
 purge_status_checks(request_t **list)
 {
 	request_t *curr;
+	int found;
 	
 	if (!list)
 		return;
 
-	list_do(list, curr) {
-		if (curr->rr_request != RG_STATUS)
-			continue;
-
-		list_remove(list, curr);
-		rq_free(curr);
-		curr = *list;
-	} while (!list_done(list, curr));
+	do {
+		found = 0;
+		list_do(list, curr) {
+			if (curr->rr_request == RG_STATUS) {
+				list_remove(list, curr);
+				rq_free(curr);
+				found = 1;
+				break;
+			}
+		} while (!list_done(list, curr));
+	} while (found);
 }
 
 
--- cluster/rgmanager/src/resources/fs.sh	2006/10/20 20:34:25	1.4.2.17
+++ cluster/rgmanager/src/resources/fs.sh	2006/11/03 16:26:19	1.4.2.18
@@ -530,8 +530,8 @@
 			# place
 			#
 			if [ -n "$tmp_mp"  -a "$tmp_mp"  != "$mp" ]; then
-				ocf_log warn "\
-Device $dev is mounted on $tmp_mp instead of $mp"
+				ocf_log warn \
+"Device $dev is mounted on $tmp_mp instead of $mp"
 			fi
 			return $YES
 		fi
@@ -788,6 +788,7 @@
 enable_fs_quotas()
 {
 	declare -i need_check=0
+	declare -i rv
 	declare quotaopts=""
 	declare mopt
 	declare opts=$1
@@ -835,8 +836,13 @@
 	ocf_log info "Enabling Quotas on $mp"
 	ocf_log debug "quotaon -$quotaopts $mp"
 	quotaon -$quotaopts $mp
+	rv=$?
+	if [ $rv -ne 0 ]; then
+		# Just a warning
+		ocf_log warn "Unable to turn on quotas for $mp; return = $rv"
+	fi
 
-	return $?
+	return $rv
 }
 
 



             reply	other threads:[~2006-11-03 16:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03 16:26 lhh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-30 16:03 [Cluster-devel] cluster/rgmanager ChangeLog src/daemons/restre lhh
2007-08-30 16:05 lhh
2007-08-30 16:09 lhh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061103162621.13777.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.