1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
samba-mirror/ctdb
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
..
client ctdb-client: Remove unused function 2024-03-06 06:05:38 +00:00
cluster ctdb-config: Add configuration option [cluster] leader timeout 2022-01-17 10:21:33 +00:00
common ctdb: Remove common/line.[ch] 2024-04-16 23:51:45 +00:00
config ctdb-failover: Split statd_callout add-client/del-client 2024-06-25 04:24:57 +00:00
database ctdb-database: Fix signed/unsigned comparison by casting 2019-07-05 05:03:24 +00:00
doc ctdb-doc: Drop unnecessary, broken attempt at rpc.statd stack trace 2024-06-25 03:16:37 +00:00
event ctdb-tools: Fix CID 1539212 - signed/unsigned issue 2023-08-07 08:43:39 +00:00
failover ctdb-failover: Split statd_callout add-client/del-client 2024-06-25 04:24:57 +00:00
ib ctdb-daemon: Rename ctdb_context private_data to transport_data 2019-11-14 02:20:46 +00:00
include ctdb-server: Implement CTDB_CONTROL_START_IPREALLOCATE 2024-03-06 06:05:38 +00:00
protocol ctdb: Report errors from getline() 2024-04-24 05:16:29 +00:00
server ctdb: Modernize a few DEBUGs 2024-04-17 00:54:55 +00:00
tcp ctdb:tcp: Fix code spelling 2023-03-24 07:01:31 +00:00
tests ctdb-failover: Split statd_callout add-client/del-client 2024-06-25 04:24:57 +00:00
tools ctdb-failover: Split statd_callout add-client/del-client 2024-06-25 04:24:57 +00:00
utils ctdb/ceph: Add optional namespace support for mutex helper 2024-06-14 06:40:37 +00:00
.bzrignore
.gitignore ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRING 2019-03-15 05:17:14 +00:00
configure configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scripts 2022-03-29 22:32:32 +00:00
configure.rpm ctdb-packaging: Update library versions to upstream versions 2018-12-18 07:12:09 +01:00
COPYING
Makefile Python: remove pydoctor 2023-02-02 21:15:54 +00:00
README
wscript ctdb-failover: Split statd_callout add-client/del-client 2024-06-25 04:24:57 +00:00

This is the release version of CTDB, a clustered implementation of TDB
database used by Samba and other projects to store temporary data.

This software is freely distributable under the GNU public license,
a copy of which you should have received with this software (in a file
called COPYING).

For documentation on CTDB, please visit CTDB website http://ctdb.samba.org.