public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* STABLE2 - rgmanager: make status poll interval configurable
@ 2008-09-22 15:48 Lon Hohberger
0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2008-09-22 15:48 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=360f2d3cceb34bf510459b971ec3fbbaa1f3755e
Commit: 360f2d3cceb34bf510459b971ec3fbbaa1f3755e
Parent: 4c79aea06bb46acbd2914bbb47d02a88aaced19e
Author: Lon Hohberger <lhh@redhat.com>
AuthorDate: Mon Sep 8 11:16:25 2008 -0400
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Mon Sep 22 11:18:43 2008 -0400
rgmanager: make status poll interval configurable
This allows administrators to define an alternate poll
interval; the default is 10 seconds. This has no functional
change unless an administrator sets:
<rm ... status_poll_interval="X"/>
---
rgmanager/src/daemons/main.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c
index 0c168f5..bb69e07 100644
--- a/rgmanager/src/daemons/main.c
+++ b/rgmanager/src/daemons/main.c
@@ -50,6 +50,7 @@ char debug = 0; /* XXX* */
static int signalled = 0;
static uint8_t ALIGNED port = RG_PORT;
static char *rgmanager_lsname = "rgmanager"; /* XXX default */
+static int status_poll_interval = DEFAULT_CHECK_INTERVAL;
int next_node_id(cluster_member_list_t *membership, int me);
void malloc_dump_table(FILE *, size_t, size_t);
@@ -701,7 +702,7 @@ event_loop(msgctx_t *localctx, msgctx_t *clusterctx)
struct timeval tv;
int nodeid;
- tv.tv_sec = 10;
+ tv.tv_sec = status_poll_interval;
tv.tv_usec = 0;
if (signalled) {
@@ -861,6 +862,21 @@ configure_rgmanager(int ccsfd, int dbg)
free(v);
}
+ if (ccs_get(ccsfd, "/cluster/rm/@status_poll_interval", &v) == 0) {
+ status_poll_interval = atoi(v);
+ if (status_poll_interval >= 1) {
+ clulog(LOG_NOTICE,
+ "Status Polling Interval set to %d\n", v);
+ } else {
+ clulog(LOG_WARNING, "Ignoring illegal "
+ "status_poll_interval of %s\n", v);
+ status_poll_interval = 10;
+ }
+
+ free(v);
+ }
+
+
if (internal)
ccs_disconnect(ccsfd);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-22 15:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-22 15:48 STABLE2 - rgmanager: make status poll interval configurable Lon Hohberger
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 read-only IMAP folder(s) and NNTP newsgroup(s).