Solves situation when in 2 node cluster tie-breaker node dies. Because
code contains two bugs, other node got NACK instead of ACK.
- Algo timer is not stack, so calling abort and schedule in timer
callback without setting reschedule is noop.
- It's needed to check not only what current node thinks about
membership, but also what other nodes thinks. If views diverge -> wait.
Thanks Christine Caulfield <ccaulfie@redhat.com> for fixing the English
in the comments somewhat.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
TAILQ_* doesn't have a safe iterator for use when freeing entries, so the
only safe way of doing it (without assuming implementation) is to
restart the iterator after freeing the structure.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
- Add support for cmap node list configuration change
- Add client side algorithms
- Check if currently received ring id in membership message
equals to last sent ring id
- Send config node list only if config node list really changes and not
after every reload
- Add tlv_ring_id_eq (replacing qnetd_algo_rings_eq) so it's usable in
client
- Move debug logs from algo-test into qnetd-log-debug.c and call them in
proper places (= logs are now algorithm independent)
- Fix memory leak in msg
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Move several commonly used routines into their own
qnetd-algo-utils.[ch] files and change over to using
the ring_id held in the client structure rather than
managint it ourself.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>