From 17bd414951e7ad5a6e1de9c17b6f18b2658ea351 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 13 Nov 2018 13:25:08 -0800 Subject: raft: Fix notifications when a server leaves the cluster. When server A sends the leader a request to remove server B from the cluster, where A != B, the leader sends both A and B a notification when the removal is complete. Until now, however, the notification (which is a raft_remove_server_reply message) did not say which server had been removed, and the receiver did not check. Instead, the receiver assumed that it had been removed. The result was that B was removed and A stopped serving out the database even though it was still part of the cluster, This commit fixes the problem. Reported-by: ramteja tadishetti Acked-by: Mark Michelson Signed-off-by: Ben Pfaff --- ovsdb/raft-rpc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ovsdb/raft-rpc.h') diff --git a/ovsdb/raft-rpc.h b/ovsdb/raft-rpc.h index 15ddf0128..bdc3429cc 100644 --- a/ovsdb/raft-rpc.h +++ b/ovsdb/raft-rpc.h @@ -205,6 +205,13 @@ struct raft_add_server_reply { struct raft_remove_server_reply { struct raft_rpc_common common; bool success; + + /* SID of the removed server, but all-zeros if it is the same as the + * destination of the RPC. (Older ovsdb-server did not have 'target_sid' + * and assumed that the destination was always the target, so by omitting + * 'target_sid' when this is the case we can preserve a small amount of + * inter-version compatibility.) */ + struct uuid target_sid; }; struct raft_install_snapshot_request { -- cgit v1.2.1