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/restree.c
Date: 18 Jun 2007 20:51:44 -0000	[thread overview]
Message-ID: <20070618205144.2887.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-06-18 20:51:44

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/daemons: restree.c 

Log message:
	Ancillary fix for #235178

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.31.2.13&r2=1.31.2.14
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.23.2.6&r2=1.23.2.7

--- cluster/rgmanager/ChangeLog	2007/06/14 14:53:42	1.31.2.13
+++ cluster/rgmanager/ChangeLog	2007/06/18 20:51:44	1.31.2.14
@@ -1,3 +1,8 @@
+2007-06-18 Lon Hohberger <lhh@redhat.com>
+	* src/daemons/restree.c: Wait for status check time intervals to 
+	elapse for the first status check in rgmanager, but not in rg_test.
+	(part of 235178)
+
 2007-06-14 Lon Hohberger <lhh@redhat.com>
 	* src/daemons/rg_state.c: Ancillary patch to (a) make clusvcadm get
 	the new owner of the service and (b) ensure allowed_nodes is freed
--- cluster/rgmanager/src/daemons/restree.c	2007/06/13 20:32:02	1.23.2.6
+++ cluster/rgmanager/src/daemons/restree.c	2007/06/18 20:51:44	1.23.2.7
@@ -1001,25 +1001,42 @@
 
 	now = time(NULL);
 
-       for (; node->rn_actions[x].ra_name; x++) {
+	for (; node->rn_actions[x].ra_name; x++) {
 		if (!has_recover &&
-                   !strcmp(node->rn_actions[x].ra_name, "recover")) {
+		    !strcmp(node->rn_actions[x].ra_name, "recover")) {
 			has_recover = 1;
 			continue;
 		}
 
-               if (strcmp(node->rn_actions[x].ra_name, "status"))
+		if (strcmp(node->rn_actions[x].ra_name, "status"))
+			continue;
+
+#ifndef NO_CCS
+		/* If a status check has never been done, reset its status. */
+		/* Don't do this from rg_test (ifndef NO_CCS) */
+		if (!node->rn_actions[x].ra_last) {
+			node->rn_actions[x].ra_last = now;
 			continue;
+		}
+#endif
+
+		delta = now - node->rn_actions[x].ra_last;
 
-               delta = now - node->rn_actions[x].ra_last;
+		/*
+		printf("%s:%s %s level %d interval = %d  elapsed = %d\n",
+			node->rn_resource->r_rule->rr_type,
+			node->rn_resource->r_attrs->ra_value,
+			node->rn_actions[x].ra_name, node->rn_actions[x].ra_depth,
+			(int)node->rn_actions[x].ra_interval, (int)delta);
+		 */
 
-		/* Ok, it's a 'monitor' action. See if enough time has
-		   elapsed for a given type of monitoring action */
-               if (delta < node->rn_actions[x].ra_interval)
+		/* Ok, it's a 'status' action. See if enough time has
+		   elapsed for a given type of status action */
+		if (delta < node->rn_actions[x].ra_interval)
 			continue;
 
 		if (idx == -1 ||
-                   node->rn_actions[x].ra_depth > node->rn_actions[idx].ra_depth)
+		    node->rn_actions[x].ra_depth > node->rn_actions[idx].ra_depth)
 			idx = x;
 	}
 



             reply	other threads:[~2007-06-18 20:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-18 20:51 lhh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-25 21:09 [Cluster-devel] cluster/rgmanager ChangeLog src/daemons/restree.c lhh
2007-09-25 21:06 lhh
2007-06-13 20:13 lhh
2007-06-13 20:12 lhh
2006-06-16 20:11 lhh
2006-06-16 20:11 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=20070618205144.2887.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.