소스 검색

Merge trunk revision 2510:
r2510 | chrissie | 2009-10-06 05:57:35 -0700 (Tue, 06 Oct 2009) | 13 lines

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/branches/flatiron@2525 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 16 년 전
부모
커밋
4e12c88a0f
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 0
      exec/service.c
  2. 5 1
      services/votequorum.c

+ 4 - 0
exec/service.c

@@ -82,6 +82,10 @@ static struct default_service default_services[] = {
 	{
 		.name			 = "corosync_pload",
 		.ver			 = 0,
+	},
+	{
+		.name			 = "corosync_quorum",
+		.ver			 = 0,
 	}
 };
 

+ 5 - 1
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();
 }