Commit Graph

7 Commits

Author SHA1 Message Date
Bin Liu
28f40c7fe0 Qnetd lms: Use UTILS_PRI_RING_ID printf format str
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
2017-04-20 08:53:41 +02:00
Jan Friesse
b0c850f308 Qnetd LMS: Fix two partition use case
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>
2016-08-30 16:58:51 +02:00
Jan Friesse
4231ad97a3 qnetd: Replace err by qnetd_log on some places
err should be used only before qnetd log is fully initialized.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:40 +02:00
Jan Friesse
36373c4a61 qnetd-algo-utils: Remove goto
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
2016-06-28 13:58:40 +02:00
Christine Caulfield
09b904e7ae qnetd-algo: Fix list traversal corruption when freeing partitions.
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>
2016-06-28 13:58:39 +02:00
Jan Friesse
6c1add2925 Improve qdevice
- 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>
2016-06-28 13:58:39 +02:00
Christine Caulfield
2f5ff28c4d qnetd-algo: Refactor common routines
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>
2016-06-28 13:58:39 +02:00