There are somwe spell errors in qdevice-net-algo-test.c,
qnetd-algo-2nodelms.c, qnetd-algo-test.c qnetd-algo-ffsplit.c
Signed-off-by: Bin Liu <bliu@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
On 50:50 split, ffsplit algorithm now prefers partition with
higher number of active clients. Tie-breaker is used only if both
partitions have same number of active clients.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
50:50 split algorithm now works in following way:
- On client configuration change, membership change or disconnect wait
till membership is stable (= all client configuration node list are
equal, and all partitions has equal information).
- Choose best partition >= 50%
- If no such partition exists, send NACK to all clients
- Send NACK to all clients who should receive NACK
- After all clients who should receive NACK confirm vote reception, send
ACK to all clients who should get ACK
This ensures that there are never two partitions with ACK and it has
much better behavior than previous version, because if tie-breaker
partition is not connected, other partition gets ACK.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
To prevent receiving vote from old membership ring id is sent to server
during init and replied back to client in every node list,
ask for vote reply and vote info messages.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Algo timer is simplified timer designed for qnetd algorithm. Instead of
full timer only one can exists per client. Workflow is:
- In one of algorithm callbacks qnetd_client_algo_timer_schedule is
called
- On timeout .timer_callback is called (for example
qnetd_algo_test_timer_callback). It's possible to set send_vote and
result_vote to send vote info to client
- It's possible to discard timer by calling
qnetd_client_algo_timer_abort
Timer is automatically deleted on client disconnect.
To make all this possible, qnetd main loop now has support for
timer-list (main_timer_list). To be able to handle error and disconnect
client from timer callback, client has schedule_disconnect. If this is
set to 1, client is disconnected on current call of poll loop.
Signed-off-by: Jan Friesse <jfriesse@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>
State used for informative only callbacks (quorum node list) and
possibly informative only callbacks (configuration node list). Client
doesn't change cast vote timer state.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Put the algorithms into an array of structure pointers
(a bit like corosync services) so we can easily add more
without having huge switch statements.
I haven't added any code to the client end that parses the
name into the enum. Yet.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
- Move adding client to cluster to init phase instead of preinit
- Implement missing ask for vote and vote info messages
- Fix cluster name memory leak
- Refactor unexpected message handler to one generic function
- Move qnetd_client_send_err to new file
- Add qnetd_client_send_vote_info
Signed-off-by: Jan Friesse <jfriesse@redhat.com>