public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - cman: Set disallowed & two_node if needed
@ 2009-01-09 10:47 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-01-09 10:47 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0b3fd077414b0e61d2c2b12c3d2f1b496755cff6
Commit: 0b3fd077414b0e61d2c2b12c3d2f1b496755cff6
Parent: cfe170aac9abd399f73f17eea1536cd03bdae834
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Fri Jan 9 10:46:10 2009 +0000
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Fri Jan 9 10:46:10 2009 +0000
cman: Set disallowed & two_node if needed
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
cman/config/cman-preconfig.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/cman/config/cman-preconfig.c b/cman/config/cman-preconfig.c
index f9aaefd..26ead90 100644
--- a/cman/config/cman-preconfig.c
+++ b/cman/config/cman-preconfig.c
@@ -651,6 +651,7 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb)
char *logfacility;
unsigned int object_handle;
unsigned int find_handle;
+ unsigned int tmpint;
char tmp[256];
/* "totem" key already exists, because we have added the interfaces by now */
@@ -805,11 +806,6 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb)
objdb->object_key_create(object_handle, "cluster_id", strlen("cluster_id"),
str, strlen(str) + 1);
- if (two_node) {
- sprintf(str, "%d", 1);
- objdb->object_key_create(object_handle, "two_node", strlen("two_node"),
- str, strlen(str) + 1);
- }
if (debug_mask) {
sprintf(str, "%d", debug_mask);
objdb->object_key_create(object_handle, "debug_mask", strlen("debug_mask"),
@@ -846,8 +842,20 @@ static void add_cman_overrides(struct objdb_iface_ver0 *objdb)
sprintf(tmp, "%d", node_votes);
objdb->object_key_create(object_handle, "votes", strlen("votes"),
- tmp, strlen(tmp)+1);
+ tmp, strlen(tmp)+1);
+
+ /* Disallowed can be disabled in cluster.conf by setting it to zero */
+ objdb_get_int(objdb, object_handle, "disallowed", &tmpint, 999);
+ if (tmpint == 999) { /* Value was not set by the user ... */
+ objdb->object_key_create(object_handle, "disallowed", strlen("disallowed"),
+ "1", strlen("1") + 1);
+ }
+
+ if (two_node) {
+ objdb->object_key_create(object_handle, "two_node", strlen("two_node"),
+ "1", strlen("1") + 1);
+ }
}
/* If ccs is not available then use some defaults */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-09 10:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-09 10:47 cluster: master - cman: Set disallowed & two_node if needed Christine Caulfield
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).