public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: master - cman: Set disallowed & two_node if needed Date: Fri, 09 Jan 2009 10:47:00 -0000 [thread overview] Message-ID: <20090109104628.DCF951204EA@lists.fedorahosted.org> (raw) 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 */
reply other threads:[~2009-01-09 10:47 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090109104628.DCF951204EA@lists.fedorahosted.org \ --to=chrissie@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).