summaryrefslogtreecommitdiff
path: root/ctdb/doc
AgeCommit message (Collapse)AuthorFilesLines
2026-02-20ctdb-doc: add section to manpage for -j/--json optionJohn Mulligan1-0/+17
Signed-off-by: John Mulligan <jmulligan@redhat.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): Fri Feb 20 01:50:20 UTC 2026 on atb-devel-224
2026-02-09ctdb-doc: Improve private and public network documentationMartin Schwenke1-1/+18
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-07-23ctdb-server: Load optional tunables.d/ directoryMartin Schwenke1-3/+12
Change the variable name to "path" so it makes sense to reuse it for the directory. 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): Wed Jul 23 00:02:47 UTC 2025 on atb-devel-224
2025-05-29ctdb-daemon: Add configuration option shutdown extra timeoutMartin Schwenke1-1/+33
See documentation change for details. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15858 Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2025-05-29ctdb-daemon: Add configuration option shutdown failover timeoutMartin Schwenke1-0/+18
Allows the timeout for failover during shutdown to be modified. Defaults to 10s. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15858 Signed-off-by: Martin Schwenke <mschwenke@ddn.com> SQ Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2025-03-14ctdb/doc: document the newly added option to not register the helperJohn Mulligan1-1/+2
Add the newly established -R (no-register) option to allow skipping the registration of the helper as a ceph service. Signed-off-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Fri Mar 14 09:42:02 UTC 2025 on atb-devel-224
2024-12-13ctdb-scripts: Change default persistent DB for statd_callout_helperMartin Schwenke1-1/+1
This database isn't use throughout CTDB, so name the it more specifically. Note that this might cause locks to be lost during upgrade to the first version containing this change. For testing, a different name is chosen to exercise related functionality. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Dec 13 15:01:10 UTC 2024 on atb-devel-224
2024-12-13ctdb-scripts: Support CTDB_STATD_CALLOUT_SHARED_STORAGE=noneMartin Schwenke1-0/+21
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-0/+59
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-12-13ctdb-scripts: Use CTDB_NFS_SHARED_STATE_DIR in nfs-ganesha-calloutMartin Schwenke3-50/+53
Rename CTDB_NFS_STATE_MNT to CTDB_NFS_SHARED_STATE_DIR. It doesn't have to be a mount but can be any directory in a cluster filesystem. CTDB_NFS_SHARED_STATE_DIR will soon be used in statd_callout_helper, so the variable name might as well be better. With this change, it will still only be used by nfs-ganesha-callout, which isn't yet supported (i.e. it still lives in doc/examples). The rest of the comments below refer to behaviour changes in that script. CTDB_NFS_SHARED_STATE_DIR is now mandatory when GPFS is used. This is much saner that choosing the first GPFS filesystem - if the state directory changes then connection metadata can be lost. Drop CTDB_NFS_STATE_FS_TYPE. The filesystem type is now determined from CTDB_NFS_SHARED_STATE_DIR and it is now checked against supported filesystems. This will catch the case when the filesystem for the specified directory has not been mounted and the filesystem for the mountpoint (e.g. ext4) is not a supported filesystem for shared state. A side-effect is that the filesystem containing CTDB_NFS_SHARED_STATE_DIR must be mounted when nfs-ganesha-callout is first run. While touching this file, my shfmt pre-commit hook wants to insert a trailing ;; into a case statement. Let's sneak that in here too. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-11-07ctdb-scripts: Add configuration variable CTDB_KILLTCP_USE_SS_KILLMartin Schwenke1-0/+89
This allows CTDB to be configured to use "ss -K" to reset TCP connections on "releaseip". This is only supported when the kernel is configured with CONFIG_INET_DIAG_DESTROY enabled. From the documentation: ss -K has been supported in ss since iproute 4.5 in March 2016 and in the Linux kernel since 4.4 in December 2015. However, the required kernel configuration item CONFIG_INET_DIAG_DESTROY is disabled by default. Although enabled in Debian kernels since ~2017 and in Ubuntu since at least 18.04,, this has only recently been enabled in distributions such as RHEL. There seems to be no way, including running ss -K, to determine if this is supported, so use of this feature needs to be configurable. When available, it should be the fastest, most reliable way of killing connections. For RHEL and derivatives, this was enabled as follows: * RHEL 8 via https://bugzilla.redhat.com/show_bug.cgi?id=2230213, arriving in version kernel-4.18.0-513.5.1.el8_9 * RHEL 9 via https://issues.redhat.com/browse/RHEL-212, arriving in kernel-5.14.0-360.el9 Enabling this option results in a small behaviour change because ss -K always does a 2-way kill (i.e. it also sends a RST to the client). Only a 1-way kill is done for SMB connections when ctdb_killtcp is used - the reasons for this are shrouded in history and the 2-way kill seems to work fine. For the summary that is logged, when CTDB_KILLTCP_USE_SS_KILL is "yes" or "try", always log the method used, even the fallback to ctdb_killtcp. However, when set to "no", maintain the existing output. The decision to use -K rather than --kill is because short options are trivial to implement in test stubs. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jerry Heyman <jheyman@ddn.com> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Nov 7 00:12:34 UTC 2024 on atb-devel-224
2024-11-06ctdb-doc: Improve 10.interface documentation and commentsMartin Schwenke1-2/+3
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jerry Heyman <jheyman@ddn.com>
2024-10-07ctdb-tcp: Only attempt to automatically bind to local IPsMartin Schwenke1-3/+5
Automatic node address selection in the TCP transport does not work if net.ipv4.ip_nonlocal_bind=1 because all nodes will be able to bind() to the first address in the nodes list. Before getting to the bind() step, add a check to see if an address is local (i.e. on an interface). If not, it is not considered. This is defensively coded so that this step is skipped if local addresses can not be retrieved. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-08-29ctdb-scripts: Add support for backing up persistent TDBsMartin Schwenke2-1/+53
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-08-29ctdb-scripts: Move database handling to its own event scriptMartin Schwenke3-31/+34
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-08-06ctdb-doc: document nodes list configuration parameterJohn Mulligan2-2/+42
Add the initial documentation of the node list configuration parameter. Signed-off-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Tue Aug 6 01:50:12 UTC 2024 on atb-devel-224
2024-06-25ctdb-doc: Drop unnecessary, broken attempt at rpc.statd stack traceMartin Schwenke1-2/+0
There is a typo here, since there will be no process called "status". Instead of fixing it, drop this because rpc.statd isn't the focus of this monitoring check and when systemd is init rpc.statd isn't restarted with nfs-ganesha. It stays running, so a confusing stack trace for rpc.statd is always logged. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-06-25ctdb-scripts: Fail monitoring after 1 x NFS-Ganesha not runningMartin Schwenke1-1/+1
If ganesha.nfsd is gone then a node can't provide an NFS service, so should be marked unhealthy. A later restart may bring it back to health. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-06-25ctdb-doc: Add example for NFS-Ganesha RPC checkingMartin Schwenke3-4/+12
This one does an rpcinfo check, along with statistics mitigation. It can be used in combination with the existing 20.nfs_ganesha.check. The equivalent kernel NFS file only restarts every 10 failures. This one can be a little more proactive given that false positives are less likely with the statistics mitigation. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-06-25ctdb-scripts: Implement NFS statistics retrieval for NFS-GaneshaMartin Schwenke1-1/+19
Simplicity is preferred here over absolute correctness. If the ganesha_stats command exits with an error or times out then no output is produced so, implicitly, the statistics do not change. Also, the statistics always change at startup. However, it is likely that the statistics change when NFS makes progress and do not change when NFS does not make progress. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2024-06-14ctdb/docs: Include ceph rados namespace support in man pageGünther Deschner1-1/+3
Document the new optional argument to specify the namespace to be associated with RADOS objects in a pool. Pair-Programmed-With: Anoop C S <anoopcs@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Fri Jun 14 07:42:25 UTC 2024 on atb-devel-224
2024-05-30ctdb-scripts: Protect against races when starting grace periodMartin Schwenke1-4/+35
While the PID check is worth it in relevant cases, NFS-Ganesha still might go away after the check. Unfortunately, neither grace command fails an indicative exit code, so invent one by checking error messages. This can then be converted to success by the caller. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu May 30 12:50:01 UTC 2024 on atb-devel-224
2024-05-30ctdb-scripts: Check NFS-Ganesha is running before attempting graceMartin Schwenke1-2/+14
If monitoring has failed because it isn't running, then don't fail "startipreallocate" or "relaseip" by trying to go into grace. Don't check this for "takeip". In that case NFS-Ganesha had better be running. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: Improve service PID checkMartin Schwenke1-8/+17
No need to grovel around in /proc. ps will happily tell us the command. Factor out the actual check into a separate function that can be used elsewhere. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: Improve NFS-Ganesha export path extractionMartin Schwenke1-3/+23
Path values do not need to have quotes. The current code fails if there aren't any. Instead, implement a 2 stage parser using 2 sed commands. See comments in the code for details. Regexps are POSIX basic regular expressions, apart from \<WORD\> (used to ensure WORD is on word boundaries, and the 'i' flag for case insensitivity. The latter is supported in FreeBSD sed. This code successfully parses Path values out of the following monstrosity: path = "/foo/bar1;a"; Path = /foo/bar2; Something = false; Pseudo = "/foo/bar3x" ; Path = "/foo/bar3; y" ; Access_type = RO; Pseudo = "/foo/bar4x" ; path=/foo/bar4; Access_type = RO; Pseudo = "/foo/barNONONO" ; not_Path=/foo/barNONONO; Access_type = RO; Path = /foo/bar5 Pseudo = "/foo/bar6x Path=foo" ; Path=/foo/bar6; Access_type = RO This is probably the best that can be done within a shell script. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: Add script option CTDB_NFS_EXPORTS_FILEMartin Schwenke2-1/+26
Exports may be contained in an include file rather than the top-level ganesha.conf. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: Fix usage messageMartin Schwenke1-1/+1
An IP address is passed to these actions. Reported-by: Arnab Tah <atah@ddn.com> Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: Change NFS-Ganesha PID file locationMartin Schwenke1-1/+1
This is the current default. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: Quote variable expansionsMartin Schwenke1-3/+3
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: Reformat with "shfmt -w -p -i 0 -fn"Martin Schwenke1-48/+52
Best reviewed with "git show -w". Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-05-30ctdb-scripts: No longer run statd-callout under sudoMartin Schwenke1-5/+1
This simplifies and removes a bad hack. Also, in my test environment, it also drops the average time take to run an add-client/del-client pair from ~0.055s to ~0.030s. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-04-16ctdb-scripts: Add options to generate smb.conf interfaces include fileVinit Agnihotri1-0/+45
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Reviewed-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-03-06ctdb-scripts: Remove usage of releaseip-pre, takeip-pre pseudo-eventsVinit Agnihotri1-1/+1
These were generated by 06.nfs.script. Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Mar 6 07:09:06 UTC 2024 on atb-devel-224
2024-03-06ctdb-scripts: Remove unnecessary 06.nfs.scriptVinit Agnihotri2-5/+1
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-03-06ctdb-doc: Put NFS in grace on startipreallocateVinit Agnihotri1-1/+8
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Reviewed-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-03-06ctdb-doc: Factor out grace period functionVinit Agnihotri1-12/+19
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Reviewed-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-03-06ctdb-scripts: Add handling for startipreallocateVinit Agnihotri1-1/+1
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Reviewed-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2023-10-25docs-xml: Fix documentationJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-10ctdb: Add "home_nodes" file to deterministic IP allocationVolker Lendecke1-0/+11
With a file "home_nodes" next to "public_addresses" you can assign public IPs to specific nodes when using the deterministic allocation algorithm. Whenever the "home node" is up, the IP address will be assigned to that node, independent of any other deterministic calculation. The line 192.168.21.254 2 in the file "home_nodes" assigns the IP address to node 2. Only when node 2 is not able to host IP addresses, 192.168.21.254 undergoes the normal deterministic IP allocation algorithm. Signed-off-by: Volker Lendecke <vl@samba.org> add home_nodes Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Oct 10 14:17:19 UTC 2023 on atb-devel-224
2023-10-03ctdb-scripts: Convert 40.vsftpd to use threshold-based fail countingMartin Schwenke1-0/+31
This effectively provides simple testing for the threshold-based approach. Add new script option CTDB_VSFTPD_MONITOR_THRESHOLDS. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Oct 3 04:53:38 UTC 2023 on atb-devel-224
2023-10-03ctdb-scripts: Implement failcount handling with thresholdsMartin Schwenke1-0/+23
This can be used for simple failure counting, without restarts, as used in the 40.vsftpd event script. That case will subsequently be converted and this functionality can also be used elsewhere. Add documentation to ctdb-script.options(5) to allow parameters that use this to be more easily described. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2023-10-03ctdb-doc: Add some subsection names in descriptionMartin Schwenke1-39/+46
A subsequent commit will add a new section, which looks out of place without these new sections. Best reviewed with "git show -w". Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2023-10-03ctdb-doc: Update CTDB manual pages to UTF-8Martin Schwenke14-14/+14
This will allow Unicode characters to be used, resulting in more readable source files. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2023-08-07ctdb-doc: Fix documentation for ctdb event statusMartin Schwenke1-29/+29
Behaviour was changed, documentation wasn't. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15438 Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Mon Aug 7 09:43:33 UTC 2023 on atb-devel-224
2023-04-04ctdb:doc: Fix code spellingAndreas Schneider3-11/+11
Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-05-31ctdb-doc: Fix typos in the policy routing documentationMartin Schwenke1-2/+2
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-04-06ctdb-scripts: Drop unused ctdbd_wrapperMartin Schwenke4-107/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-04-06ctdb-config: Drop CTDB_STARTUP_TIMEOUTMartin Schwenke1-18/+0
This was added to be able to notice startup failures when unknown tunables were present in the configuration. Tunables are now set by the daemon, so this is no longer necessary. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-04-06ctdb-doc: Update documentation for tunables configurationMartin Schwenke1-0/+5
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-04-06ctdb-packaging: Move RPM spec file to examples directoryMartin Schwenke1-0/+293
We used to use this for building test packages for standalone CTDB. However, our testing has now changed to use binary tarballs. We believe we were the only users of this spec file and expect CTDB to only be installed as part of a top-level Samba build, especially in RPM form. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>