From 2433ee3b2c5ddff7d1990900fc665365d79a1d1d Mon Sep 17 00:00:00 2001 From: Christine Caulfield Date: Tue, 6 Oct 2009 12:57:35 +0000 Subject: [PATCH] This patche fixes a couple of small problems with votequorum: - if a single node is booted with votequorum loaded then corosync-quorumtool shows zero nodes and no votes. - votequorum doesn't always tell the main quorum module when a new node has joined the cluster (principally itself. this bug is actually tied into the above) I've also added quorum to the default list of services. As quorum has been decoupled from sync it will not interfere with normal operations as it used to do and it makes more sense to have it there than not. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2510 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/service.c | 4 ++++ services/votequorum.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/exec/service.c b/exec/service.c index ea58efb2..5cd60c35 100644 --- a/exec/service.c +++ b/exec/service.c @@ -82,6 +82,10 @@ static struct default_service default_services[] = { { .name = "corosync_pload", .ver = 0, + }, + { + .name = "corosync_quorum", + .ver = 0, } }; diff --git a/services/votequorum.c b/services/votequorum.c index 97e4f2de..5b893595 100644 --- a/services/votequorum.c +++ b/services/votequorum.c @@ -535,6 +535,9 @@ static int votequorum_exec_init_fn (struct corosync_api_v1 *api) add_votequorum_config_notification(object_handle); corosync_api->object_find_destroy(find_handle); + /* Start us off with one node */ + quorum_exec_send_nodeinfo(); + LEAVE(); return (0); } @@ -1046,7 +1049,8 @@ static void message_handler_req_exec_votequorum_nodeinfo ( } node->flags &= ~NODE_FLAGS_BEENDOWN; - if (new_node || old_votes != node->votes || old_expected != node->expected_votes || old_state != node->state) + if (new_node || req_exec_quorum_nodeinfo->first_trans || + old_votes != node->votes || old_expected != node->expected_votes || old_state != node->state) recalculate_quorum(0, 0); LEAVE(); }