summaryrefslogtreecommitdiff
path: root/ctdb/failover
AgeCommit message (Collapse)AuthorFilesLines
2026-02-18ctdb-failover: Add sm-notify to statd_calloutPeter Schwenke1-1/+20
sm-notify is required when an NFS client reboots. rpc-statd on the client will send an sm-notify to rpc-statd on the NFS sever. Add a test case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15938 Signed-off-by: Peter Schwenke <pschwenke@ddn.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Wed Feb 18 12:29:16 UTC 2026 on atb-devel-224
2024-12-13ctdb-scripts: Support CTDB_STATD_CALLOUT_SHARED_STORAGE=noneMartin Schwenke1-1/+17
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-12-13ctdb-scripts: Support storing statd-callout state in cluster filesystemMartin Schwenke1-1/+58
CTDB_STATD_CALLOUT_SHARED_STORAGE is a new configuration variable indicating where statd-callout should store its NFS client locking data. See the update to ctdb-script.options(5) for details. This adds back functionality that was removed in commit 12cc82623150ca4a83482f1b7165401cbdecd3de. The commit message doesn't say why this was changed but it was most likely due to a cluster filesystem hanging at inopportune times. Hence, this is re-added as a non-default option. There are 2 justifications for re-adding it: * The existing method (persistent_db) relies on dequeuing data during the monitor event, which loses any queued data on node crash. * NFS-Ganesha writes NFSv4 client locking data to a cluster filesystem, by default. Something similar might as well exist for NFSv3. Note that this could create the files for sm-notify in add-client. However, this would require an alternate implementation of send_notifies() (or a change to the implementation for persistent_db too). It seems better to leave add-client lightweight and do the work in notify, since add-client is a more frequent operation. Unconditionally create the state directory on startup. This is currently implicitly created for persistent_db when the queue directory is created. However, it isn't created anywhere else for shared_dir, so do it in a common place. In test mode, the shared storage location has a prefix added so files are created within the test environment. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-11-11ctdb: Include replace.h for PATH_MAXSamuel Thibault1-0/+2
Fixes build on GNU/Hurd. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Nov 11 10:28:24 UTC 2024 on atb-devel-224
2024-08-29ctdb-failover: Add ctdb_smnotify_helperMartin Schwenke1-0/+81
statd callout will shortly be updated to use NFS utils' sm-notify. This tiny helper will be used to create on-disk state files used by sm-notify. These state files contain endian-specific fields, so better to write a simple C implementation than to do crazy things in a shell script (or call out to Python). Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-07-02ctdb-failover: omit "restrict" optimization keywordBjörn Baumbach1-2/+2
Fails with some compilers with error: expected ';', ',' or ')' before 'lineptr' Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue Jul 2 23:52:37 UTC 2024 on atb-devel-224
2024-06-28ctdb-conf: Move all conf files to new conf/ subdirectoryMartin Schwenke2-84/+0
Leave common/conf.[ch] where they are to make this commit comprehensible. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-06-25ctdb-failover: Split statd_callout add-client/del-clientMartin Schwenke1-0/+327
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
2018-08-24ctdb-failover: Add failover configuration optionsMartin Schwenke2-0/+84
Only a "disabled" option for now. Not documented because it isn't used yet. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>