diff options
author | Martin Schwenke <martin@meltin.net> | 2021-07-08 17:28:20 +1000 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2021-09-13 11:47:10 +0000 |
commit | 84a285851d7fea7843667e67ef317995e6c54bc5 (patch) | |
tree | 393e8ec0ed7ef13970bc851a87e4cabe60afba80 /ctdb/protocol | |
parent | c01d48d7a542bfb0b319fb18d0eea51b232ea62a (diff) | |
download | samba-84a285851d7fea7843667e67ef317995e6c54bc5.tar.gz |
ctdb-protocol: Add new controls to disable and enable nodes
These are CTDB_CONTROL_DISABLE_NODE and CTDB_CONTROL_ENABLE_NODE.
For consistency these match CTDB_CONTROL_STOP_NODE and
CTDB_CONTROL_CONTINUE_NODE. It would be possible to add a single
control but it would need to take data.
The aim is to finally fix races in flag handling. Previous fixes have
improved the situation but they have only narrowed the race window.
The problem is that the recovery daemon on the master node pushes
flags to nodes the same way that disable and enable are implemented.
So the following sequence is still racy:
1. Node A is disabled
2. Recovery master pulls flags from all nodes including A
3. Node A is enabled
4. Recovery master notices A is disabled and pushes a flag update to
all nodes including node A
5. Node A is erroneously marked disabled
Node A can not tell if the MODIFY_FLAGS control is from a "ctdb
disable" command or a flag update from the recovery master.
The solution is to use a different mechanism for disable/enable and
for a node to ignore MODIFY_FLAGS controls for their own flags.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 49dc5d8cd2d3767044ac69cbd25c8210d11cadf7)
Diffstat (limited to 'ctdb/protocol')
-rw-r--r-- | ctdb/protocol/protocol.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h index e4b76c6b986..9fd7f1cdecb 100644 --- a/ctdb/protocol/protocol.h +++ b/ctdb/protocol/protocol.h @@ -376,6 +376,8 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0, CTDB_CONTROL_VACUUM_FETCH = 154, CTDB_CONTROL_DB_VACUUM = 155, CTDB_CONTROL_ECHO_DATA = 156, + CTDB_CONTROL_DISABLE_NODE = 157, + CTDB_CONTROL_ENABLE_NODE = 158, }; #define MAX_COUNT_BUCKETS 16 |