public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - cman: use correct nodeid
@ 2009-05-06 12:09 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-05-06 12:09 UTC (permalink / raw)
To: cluster-cvs-relay
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-06 12:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-06 12:09 cluster: STABLE3 - cman: use correct nodeid 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).