1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

5 Commits

Author SHA1 Message Date
Martin Schwenke
415f9f0745 ctdb-failover: Split statd_callout add-client/del-client
rpc.statd is single-threaded and runs its HA callout synchronously. If
it is too slow then latency accumulates and rpc.statd's backlog grows.

Running a pair of add-client/del-client events with the current code
averages ~0.030s in my test environment.  This mean that 1000 clients
reclaiming locks after failover can easily cause 10s of latency.  This
could cause rpc.statd to become unresponsive, resulting in a time out
for an rpcinfo-based health check of the status service.

Split the add-client/del-client events out to a standalone
statd_callout executable, written in C, to be used as the HA callout
for rpc.statd.  All other functions move to statd_callout_helper.
Now, running a pair of add-client/del-client events in my test
environment averages only ~0.002s.  This seems less likely to cause
latency problems.

The standalone statd_callout executable needs to read a configuration
file, which is generated by statd_callout_helper from the "startup"
event.  It also needs access to a list of currently assigned public
IPs.

For backward compatibility, during installation a symlink is created
from $CTDB_BASE/statd-callout to the new statd_callout, which is
installed in the helper directory.

Testing this as part of the eventscript unit tests starts to become
even more of a hack than it used to be.  However, the dependency on
stubs and the corresponding setup of fake state makes it hard to move
this elsewhere.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Jun 25 04:24:57 UTC 2024 on atb-devel-224
2024-06-25 04:24:57 +00:00
Martin Schwenke
12fd8d7a5c ctdb-scripts: Move event scripts to events/legacy/ directory
This is the initial location that will be used by the new
multi-component aware event daemon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-06-05 17:47:26 +02:00
Martin Schwenke
56d90e930d Eventscript support - Remove unused interface_modify.sh
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 994492f79275fe84155d842f6bc288c1858217dd)
2012-03-22 15:30:27 +11:00
Martin Schwenke
71e9016ec2 Scripts: add note about not using absolute command paths to README.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 87e6a4a23a6ae6c276e9628ce513663f47b4ee77)
2011-08-09 16:36:37 +10:00
Martin Schwenke
d81c1319e9 Add a README to the config/ subdirectory.
This includes a comment about using POSIX Bourne shell, including a
suggestion not to use "local" variables.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5ae002c7513b1b2aa5136437a1a19f8cd179b869)
2011-08-09 16:36:37 +10:00