On Thu, Jun 14, 2012 at 11:19 PM, Jan Friesse <jfriesse@xxxxxxxxxx> wrote: > Let's say we have 2 nodes: > - node 2 is paused > - node 1 create membership (one node) > - node 2 is unpaused > > Result is that node 1 downlist is selected, so it means that > from node 2 point of view, node 1 was never down. This behaviour makes sense to me. Although ideally node2 wouldn't get a membership event until everyone agreed whether it was a member or not*. Is that feasible? * That or clients might need to be made more tolerant of being kicked out of the membership list. > > Patch solves situation by adding additional check for largest > previous membership. > > So current tests are: > 1) largest (previous #nodes - #nodes know to have left) > 2) (then) largest previous membership > 3) (and last as a tie-breaker) node with smallest nodeid > > Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx> > --- > services/cpg.c | 17 +++++++++-------- > 1 files changed, 9 insertions(+), 8 deletions(-) > > diff --git a/services/cpg.c b/services/cpg.c > index 7e62260..533f0c9 100644 > --- a/services/cpg.c > +++ b/services/cpg.c > @@ -816,16 +816,17 @@ static struct downlist_msg* downlist_master_choose (void) > best_members = best->old_members - best->left_nodes; > cmp_members = cmp->old_members - cmp->left_nodes; > > - if (cmp_members < best_members) { > - continue; > - } > - else if (cmp_members > best_members) { > - best = cmp; > - } > - else if (cmp->sender_nodeid < best->sender_nodeid) { > + if (cmp_members > best_members) { > best = cmp; > + } else if (cmp_members == best_members) { > + if (cmp->old_members > best->old_members) { > + best = cmp; > + } else if (cmp->old_members == best->old_members) { > + if (cmp->sender_nodeid < best->sender_nodeid) { > + best = cmp; > + } > + } > } > - > } > > assert (best != NULL); > -- > 1.7.1 > > _______________________________________________ > discuss mailing list > discuss@xxxxxxxxxxxx > http://lists.corosync.org/mailman/listinfo/discuss _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss