1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

46 Commits

Author SHA1 Message Date
Vinit Agnihotri
e3294e5526 ctdb-doc: Put NFS in grace on startipreallocate
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2024-03-06 06:05:38 +00:00
Vinit Agnihotri
34c76ffec5 ctdb-doc: Factor out grace period function
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2024-03-06 06:05:38 +00:00
Vinit Agnihotri
a4e492f728 ctdb-scripts: Add handling for startipreallocate
Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2024-03-06 06:05:38 +00:00
Martin Schwenke
8deec3bc67 ctdb-scripts: Drop unused ctdbd_wrapper
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-04-06 06:34:37 +00:00
Martin Schwenke
2f6b31788b ctdb-packaging: Move RPM spec file to examples directory
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>
2022-04-06 06:34:37 +00:00
Martin Schwenke
a940ad9370 ctdb-doc: Update example configuration migration script
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-01-17 10:21:33 +00:00
Martin Schwenke
f5a39058f0 ctdb-config: [cluster] recovery lock -> [cluster] cluster lock
Retain "recovery lock" and mark as deprecated for backward
compatibility.

Some documentation is still inconsistent.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-01-17 10:21:33 +00:00
Renaud Fortier
fdfc480a56 ctdb-scripts: Update nfs-ganesha-callout
On debian buster, this variable doesn't exist anymore. Look at this PR
as a reference:

  https://github.com/gluster/storhaug/pull/30

Signed-off-by: Renaud Fortier <renaud.fortier@fsaa.ulaval.ca>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Apr 23 08:07:51 UTC 2020 on sn-devel-184
2020-04-23 08:07:51 +00:00
Günther Deschner
26e1556819 ctdb-scripts: add new 48.netbios script for starting nmbd
This change basically moves out nmbd references from 50.samba script to
a new 48.netbios script. Accordingly ctdb test scripts are tweaked to
cope with newly added script.

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2020-02-27 06:07:41 +00:00
Martin Schwenke
2c54f6df71 ctdb-common: Mark VacuumLimit tunable as obsolete
Use of this tunable was dropped over 5 years ago in commit
16837bc309.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Oct  4 07:07:21 UTC 2019 on sn-devel-184
2019-10-04 07:07:21 +00:00
Martin Schwenke
b80967f5dc ctdb-scripts: Drop script configuration variable CTDB_MONITOR_SWAP_USAGE
CTDB's system memory monitoring in 05.system.script monitors both main
memory and swap.  The swap monitoring was originally based on
the (possibly incorrect, see below) idea that swap space stacks on top
of main memory, so that when a system starts filling swap space then
this is supposed to be a good sign that the system is running out of
memory.  Additionally, performance on a Linux system tends to be
destroyed by the I/O associated with a lot of swapping to spinning
disks.

However, some platforms default to creating only 4GB of swap space
even when there is 128GB of main memory.  With such a small swap to
main memory ratio, memory pressure can force swap to be nearly full
even when a significant amount of main memory is still available and
the system is performing well.  This suggests that checking swap
utilisation might be less than useful in many circumstances.

So, remove the separate swap space checking and change the memory
check to cover the total of main memory and swap space.

Test function set_mem_usage() still takes an argument for each of main
memory and swap space utilisation.  For simplicity, the same number is
now passed twice to make the intended results comprehensible.  This
could be changed later.

A couple of tests are cleaned up to no longer use hard-coded
/proc/meminfo and ps output.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-05-07 05:45:34 +00:00
Martin Schwenke
78aad7623e ctdb-doc: Switch tunable DisableIPFailover to a config option
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>
2018-08-24 10:59:21 +02:00
Martin Schwenke
a9758f413d ctdb-doc: Switch tunable TDBMutexEnabled to a config option
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>
2018-08-24 10:59:21 +02:00
Martin Schwenke
8ddfc26d79 ctdb-doc: Add support for migrating tunables to ctdb.conf options
This will become common, so will be useful to have support for.

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>
2018-08-24 10:59:20 +02:00
Martin Schwenke
43adcd717c ctdb-doc: Change option "no realtime" option to "realtime scheduling"
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>
2018-08-24 10:59:20 +02:00
Martin Schwenke
64d4a7ae5a ctdb-doc: Handle boolean options in config migration more carefully
Values for ctdb.conf options are now returned by
get_ctdb_conf_option().  The main goal is to allow old boolean options
to be replaced by new logically negated options.

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>
2018-08-24 10:59:20 +02:00
Martin Schwenke
d4afb60a24 ctdb-doc: Make config migration script notice removed CTDB_BASE option
This should never have been a user-level option, but some people used
it.

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>
2018-08-24 10:59:20 +02:00
Martin Schwenke
4fcbaae57b ctdb-doc: Provide an example script for migrating old configuration
Include an example ctdbd.conf-style file for testing.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13550

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Jul 30 14:30:06 CEST 2018 on sn-devel-144
2018-07-30 14:30:06 +02:00
Martin Schwenke
87284da7a2 ctdb: Drop configuration file ctdbd.conf
Drop function loadconfig(), replacing uses with "load_system_config
ctdb".  Drop translation of old-style configuration to new
configuration file.  Drop export of debugging variables.  Drop
documentation and configuration examples.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu May 17 07:03:04 CEST 2018 on sn-devel-144
2018-05-17 07:03:04 +02:00
Martin Schwenke
bd58f7af40 ctdb-docs: Add example configuration files
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
6cf861a544 ctdb-scripts: Drop CTDB_NODES configuration option
Tests now deviate from the compile-time default by setting CTDB_BASE.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-19 02:23:20 +01:00
Martin Schwenke
6ecddd4f72 ctdb-scripts: Drop CTDB_PUBLIC_ADDRESSES configuration option
This option adds a lot of unnecessary complexity to scripts.
Configuration should go in $CTDB_BASE, either directly or via a
symlink, so simplify by using the default location.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-19 02:23:19 +01:00
Martin Schwenke
a757182134 ctdb-scripts: Drop 10.external event script
This was added for a vendor who decided not to use it.  It is almost
certainly unused by anyone.  If anyone really needs it then it is in
the git history.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-19 02:23:19 +01:00
Martin Schwenke
bd66445edd Revert "ctdb-doc: Fix monitoring bug in example NFS Ganesha call-out"
The check action should be there.  It is used by 20.nfs_ganesha.check.

This reverts commit 4fa9026bbd.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-09 07:08:26 +01:00
Martin Schwenke
2d22454f17 ctdb-doc: Update instructions in example NFS Ganesha call-out
In particular, make them reflect the recent advice in ctdbd.conf(5)
about setting CTDB_NFS_CHECKS_DIR.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-02-24 07:47:11 +01:00
Martin Schwenke
4fa9026bbd ctdb-doc: Fix monitoring bug in example NFS Ganesha call-out
There is no "check" method.  This was an error in the original
example.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-02-24 07:47:11 +01:00
Martin Schwenke
1c8a3988ee ctdb-doc: Fix shellcheck warning in example NFS ganesha call-out
In ctdb/doc/examples/nfs-ganesha-callout line 216:
for node in `ls ${GANSTATEDIR}`; do
            ^-- SC2045: Iterating over ls output is fragile. Use globs.
            ^-- SC2006: Use $(..) instead of legacy `..`.
                ^-- SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-02-24 07:47:11 +01:00
Martin Schwenke
8c21aac77f ctdb-doc: Make example NFS Ganesha call-out almost pass shellcheck
This call-out is referred to in the wiki as an example, so make it as
clean as possible.

All the changes here are trivial.  There is still one failure, which
is slightly non-trivial, so it can be fixed in a separate commit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-02-24 07:47:09 +01:00
Martin Schwenke
3f9f31bf25 ctdb-doc: Whitespace fixes in example NFS ganesha callout
Fix some whitespace errors, reindent the whole script and wrap lines
where needed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-02-24 07:47:09 +01:00
Martin Schwenke
48d1fd8299 ctdb-scripts: Add eventscript 06.nfs
This generates takeip-pre and releaseip-pre call-out events.

One use is to put NFS into grace before an IP is assigned to an
interface.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-06-08 10:33:19 +02:00
Jose A. Rivera
ecbe6c669f ctdb-scripts: Add GlusterFS support to nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat May 14 03:06:05 CEST 2016 on sn-devel-144
2016-05-14 03:06:03 +02:00
Jose A. Rivera
83226d98e5 ctdb-scripts: Section off GPFS-specific functionality in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
8b59705252 ctdb-scripts: Add config options for use by clustered NFS
Add CTDB_NFS_STATE_FS_TYPE and CTDB_NFS_STATE_MNT config options, show use in
nfs-ganesha-callout. Since the callout script is only an example, we
officially don't have default values for these.

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
c7dbf720d8 ctdb-scripts: Parametize symlink checking in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
a540a0d213 ctdb-scripts: Cleanup service_check() in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
e9b507c11c ctdb-scripts: Use D-Bus messages to trigger grace in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
d375fd80f0 ctdb-scripts: Add register action to nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
755f060d52 ctdb-scripts: Organize global variables in nfs_ganesha_callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:24 +02:00
Jose A. Rivera
a857e33deb ctdb-scripts: Various small fixes to example nfs-ganesha-callout
Comment typos and clarifications, erroneous variable names, corrected
pathnames, reorganizing variables, and squashing a few non-fatal
scripting errors.

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:24 +02:00
Martin Schwenke
ddfbd74607 ctdb-doc: Fix example NFS Ganesha recovery directory maintenance logic
This currently fails exactly when it is needed: when there is a
dangling link pointing into an unmounted filesystem.  This happens
because [ -e <dangling-link> ] returns false.  The solution is simply
to remove that check.

Now the first condition in the "if" statement catches the backward
compatibility case where $GANRECDIR used to be a directory.  It will
also catch other problems, such as if a file has been created in this
location.  If nothing exists then it will silently succeed (due to
-f).

The second case catches a symlink pointing to the wrong place (e.g. in
an unmounted filesystem).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-05-03 04:43:19 +02:00
Amitay Isaacs
798b131400 ctdb-doc: Add sample LVS configuration
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-04-15 05:57:17 +02:00
Martin Schwenke
b0bc4d2cab ctdb-scripts: Move 60.nfs Ganesha callout to doc/examples/
We don't expect to maintain an up-to-date copy.  NFS Ganesha team
might provide patches.

Also move the Ganesha .check file

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-21 07:54:09 +02:00
Martin Schwenke
1e4016036c ctdb-scripts: Remove configuration variable CTDB_MONITOR_NFS_THREAD_COUNT
This is now always enabled.  If nfsd thread monitoring is not required
then make CTDB_NFS_CALLOUT point to a wrapper around
nfs-linux-kernel-callout that does not implement "monitor-post".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-14 09:57:18 +02:00
Martin Schwenke
4779832309 ctdb-doc: Document externally managed public IP addresses
For use with DisableIPFailover=1.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed May 13 09:27:36 CEST 2015 on sn-devel-104
2015-05-13 09:27:36 +02:00
Martin Schwenke
1d1cd04cb9 ctdb-logging: New option CTDB_LOGGING, remove CTDB_LOGFILE, CTDB_SYSLOG
Remove --logfile and --syslog daemon options and replace with
--logging.

Modularise and clean up logging initialisation code.  The
initialisation API includes an app_name argument that is currently
unused - this will be used in extensions to the syslog backend.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-10-28 05:42:04 +01:00
Amitay Isaacs
c330df8552 doc/examples: Add CTDB configuration examples
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 6a5469a63547029f4fc704a4d4075543e06c36d1)
2013-10-24 16:57:16 +11:00