Ver código fonte

Merge trunk revision 2667:
r2667 | chrissie | 2010-02-26 08:30:38 -0700 (Fri, 26 Feb 2010) | 5 lines

Reduce the number of times the quorum message is displayed.

Patch from David Teigland



git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2711 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 16 anos atrás
pai
commit
34df6ae7de
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      exec/vsf_quorum.c

+ 3 - 2
exec/vsf_quorum.c

@@ -135,11 +135,12 @@ static void quorum_api_set_quorum(const unsigned int *view_list,
 				  size_t view_list_entries,
 				  size_t view_list_entries,
 				  int quorum, struct memb_ring_id *ring_id)
 				  int quorum, struct memb_ring_id *ring_id)
 {
 {
+	int old_quorum = primary_designated;
 	primary_designated = quorum;
 	primary_designated = quorum;
 
 
-	if (primary_designated) {
+	if (primary_designated && !old_quorum) {
 		log_printf (LOGSYS_LEVEL_NOTICE, "This node is within the primary component and will provide service.\n");
 		log_printf (LOGSYS_LEVEL_NOTICE, "This node is within the primary component and will provide service.\n");
-	} else {
+	} else if (!primary_designated && old_quorum) {
 		log_printf (LOGSYS_LEVEL_NOTICE, "This node is within the non-primary component and will NOT provide any services.\n");
 		log_printf (LOGSYS_LEVEL_NOTICE, "This node is within the non-primary component and will NOT provide any services.\n");
 	}
 	}