]> git.proxmox.com Git - mirror_corosync.git/commitdiff
votequorum: Don't send multiple callbacks when nodes join
authorChristine Caulfield <ccaulfie@redhat.com>
Thu, 22 Oct 2015 10:45:26 +0000 (11:45 +0100)
committerChristine Caulfield <ccaulfie@redhat.com>
Thu, 22 Oct 2015 10:45:26 +0000 (11:45 +0100)
This patch aligns the votequorum callbacks so that they are
the same as the quorum ones. Previously it was quite common
for votequorum to send one callback for every node in the cluster
when a single new node joined (because it sent one for every
nodeinfo message it received).

This new system makes much more sense in itself and being
consistent with the internal quorum is also an advantage!

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
exec/votequorum.c

index 62c8cf372cdfb0c83fa1002f5ef974922f16d7ec..e7d1320f4e3f72e81305bcdb5dbd54df286add57 100644 (file)
@@ -1054,6 +1054,7 @@ static void are_we_quorate(unsigned int total_votes)
            (sync_in_progress == 0)) {
                quorum_callback(quorum_members, quorum_members_entries,
                                cluster_is_quorate, &quorum_ringid);
+               votequorum_exec_send_quorum_notification(NULL, 0L);
        }
 
        LEAVE();
@@ -1120,8 +1121,6 @@ static void recalculate_quorum(int allow_decrease, int by_current_nodes)
        quorum = calculate_quorum(allow_decrease, cluster_members, &total_votes);
        are_we_quorate(total_votes);
 
-       votequorum_exec_send_quorum_notification(NULL, 0L);
-
        LEAVE();
 }
 
@@ -2352,6 +2351,8 @@ static void votequorum_sync_activate (void)
        recalculate_quorum(0, 0);
        quorum_callback(quorum_members, quorum_members_entries,
                        cluster_is_quorate, &quorum_ringid);
+       votequorum_exec_send_quorum_notification(NULL, 0L);
+
        sync_in_progress = 0;
 }