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: STABLE3 - cman: use correct nodeid Date: Wed, 06 May 2009 12:09:00 -0000 [thread overview] Message-ID: <20090506120824.DEDBE1201E8@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=af7041beaf3ce220fc65e293c4821a4ed8258cc1 Commit: af7041beaf3ce220fc65e293c4821a4ed8258cc1 Parent: 536d9f56e43cfe7cd07aae3c63be1660ec61727b Author: Christine Caulfield <ccaulfie@redhat.com> AuthorDate: Wed May 6 13:05:05 2009 +0100 Committer: Christine Caulfield <ccaulfie@redhat.com> CommitterDate: Wed May 6 13:05:05 2009 +0100 cman: use correct nodeid The previous cleanups removed a local variable and caused all nodes to take on the nodeid of the last node in cluster.conf This reinstates the local variable, suitably renamed to avoid warnings. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> --- cman/daemon/cmanconfig.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cman/daemon/cmanconfig.c b/cman/daemon/cmanconfig.c index e9519a3..8c3f864 100644 --- a/cman/daemon/cmanconfig.c +++ b/cman/daemon/cmanconfig.c @@ -50,6 +50,7 @@ int read_cman_nodes(struct corosync_api_v1 *corosync, unsigned int *config_versi hdb_handle_t nodes_handle; hdb_handle_t find_handle; char *nodename; + int this_nodeid; hdb_handle_t cluster_parent_handle; corosync->object_find_create(OBJECT_PARENT_HANDLE, @@ -86,8 +87,8 @@ int read_cman_nodes(struct corosync_api_v1 *corosync, unsigned int *config_versi } objdb_get_int(corosync, nodes_handle, "votes", (unsigned int *)&votes, 1); - objdb_get_int(corosync, nodes_handle, "nodeid", (unsigned int *)&nodeid, 0); - if (check_nodeids && nodeid == 0) { + objdb_get_int(corosync, nodes_handle, "nodeid", (unsigned int *)&this_nodeid, 0); + if (check_nodeids && this_nodeid == 0) { char message[132]; snprintf(message, sizeof(message), @@ -99,8 +100,8 @@ int read_cman_nodes(struct corosync_api_v1 *corosync, unsigned int *config_versi goto out_err; } - P_MEMB("Got node %s from ccs (id=%d, votes=%d)\n", nodename, nodeid, votes); - add_ccs_node(nodename, nodeid, votes, expected); + P_MEMB("Got node %s from ccs (id=%d, votes=%d)\n", nodename, this_nodeid, votes); + add_ccs_node(nodename, this_nodeid, votes, expected); nodes_handle = nodeslist_next(corosync, find_handle); } while (nodes_handle); corosync->object_find_destroy(find_handle);
reply other threads:[~2009-05-06 12:09 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=20090506120824.DEDBE1201E8@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).