diff options
| author | Dmitry Mescheryakov <dmescheryakov@mirantis.com> | 2016-08-22 14:19:21 +0300 |
|---|---|---|
| committer | Dmitry Mescheryakov <dmescheryakov@mirantis.com> | 2016-08-22 14:27:22 +0300 |
| commit | 5a6f61c423b19b33e36f0be0f995a1636b310873 (patch) | |
| tree | a2918eaaa40d892fa2dc7e8ba20feb6550a5096d /include | |
| parent | d4020f5f50f118f870ead1d1180f79e75032f6f7 (diff) | |
| download | rabbitmq-server-git-5a6f61c423b19b33e36f0be0f995a1636b310873.tar.gz | |
[OCF HA] Rank master score based on start time
Right now we assign 1000 to the oldest nodes and 1 to others. That
creates a problem when Master restarts and no node is promoted until
that node starts back. In that case the returned node will have score
of 1, like all other slaves and Pacemaker will select to promote it
again. The node is clean empty and afterwards other slaves join to
it, wiping their data as well. As a result, we loose all the messages.
The new algorithm actually ranks nodes, not just selects the oldest
one. It also maintains the invariant that if node A started later
than node B, then node A score must be smaller than that of
node B. As a result, freshly started node has no chance of being
selected in preference to older node. If several nodes start
simultaneously, among them an older node might temporarily receive
lower score than a younger one, but that is neglectable.
Also remove any action on demote or demote notification - all of
these duplicate actions done in stop or stop notification. With these
removed, changing master on a running cluster does not affect RabbitMQ
cluster in any way - we just declare another node master and that is
it. It is important for the current change because master score might
change after initial cluster start up causing master migration from
one node to another.
This fix is a prerequsite for fix to Fuel bugs
https://bugs.launchpad.net/fuel/+bug/1559136
https://bugs.launchpad.net/mos/+bug/1561894
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
