diff options
author | Ben Pfaff <blp@ovn.org> | 2018-11-13 13:25:08 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-11-19 08:47:49 -0800 |
commit | 17bd414951e7ad5a6e1de9c17b6f18b2658ea351 (patch) | |
tree | cdbc364347439fc929ab1f9363b678509779dd15 /ovsdb/raft-rpc.h | |
parent | e8208c6617d314546eff366a6e8d6b5ff42c1f47 (diff) | |
download | openvswitch-17bd414951e7ad5a6e1de9c17b6f18b2658ea351.tar.gz |
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 <ramtejatadishetti@gmail.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb/raft-rpc.h')
-rw-r--r-- | ovsdb/raft-rpc.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 { |