[Cluster-devel] cluster/rgmanager ChangeLog src/daemons/restree.c
lhh at sourceware.org
lhh at sourceware.org
Mon Jun 18 20:51:44 UTC 2007
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 at 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 at 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;
}
More information about the Cluster-devel
mailing list