Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: a7cca219bb0d1c8551e3a90094c78c0fdec51fbd
Parent: b7f44c3e9ff9102f5035f772f99ba8fe73e9452f
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Tue Mar 9 13:01:41 2010 +0000
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Tue Mar 9 13:01:41 2010 +0000
cman: Make consensus 2* token value
bz#567539
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
cman/daemon/ais.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/cman/daemon/ais.c b/cman/daemon/ais.c
index 9a874a8..787f0bd 100644
--- a/cman/daemon/ais.c
+++ b/cman/daemon/ais.c
@@ -520,11 +520,16 @@ static int comms_init_ais(struct objdb_iface_ver0 *objdb)
global_objdb->object_key_create(object_handle, "join",
strlen("join"),
"60", strlen("60")+1);
}
+ /* consensus should be 2*token, see bz#544482*/
if (objdb_get_string(objdb, object_handle, "consensus", &value)) {
- global_objdb->object_key_create(object_handle, "consensus",
strlen("consensus"),
- "4800", strlen("4800")+1);
- }
+ unsigned int token=0;
+ char calc_consensus[32];
+ objdb_get_int(objdb, object_handle, "token", &token);
+ sprintf(calc_consensus, "%d", token*2);
+ objdb->object_key_create(object_handle, "consensus",
strlen("consensus"),
+ calc_consensus, strlen(calc_consensus)+1);
+ }
/* Set RRP mode appropriately */
if (num_interfaces > 1) {