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

7763 Commits

Author SHA1 Message Date
Martin Schwenke
f63f9053ef ctdb-config: Add a default script.options file
Include it in the RPM.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
a8ccf41b87 ctdb-docs: Document script.options
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
ac1c12b5a2 ctdb-scripts: Use load_script_options() in miscellaneous scripts
Some of these just aim to load the generic script.options file while
others target more specific files.

For NFS configuration, always use 60.nfs.options - even for 06.nfs.
This could be carefully documented but will change a lot before
release so there is no need.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
02444e5f47 ctdb-scripts: Allow load_script_options() to specify an event script
This allows other scripts to use the given options for a particular
event script.  One interesting example is that the ctdb_natgw tool
should look for configuration in events.d/11.natgw.options.

In the future this will be something like
events/failover/11.natgw.options, so require the component to be
specified even though it isn't yet used.

Test support is also updated.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
00f35b7b0d ctdb-scripts: Add global script.options configuration file
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
31f26e9700 ctdb-tests: Separate support script for 06.nfs
Including 60.nfs was too simple a hack, since we will want to do some
magic to use the configuration from 60.nfs for 06.nfs.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
130f37c23f ctdb-scripts: Don't check for CTDB_PARTIALLY_ONLINE_INTERFACES clash
Just document that NAT gateway and LVS are not compatible with this
option.  Update the documentation to make it clear that this is a
10.interface option.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
574af23e9d ctdb-scripts: Don't load CTDB configuration in onnode
onnode does not use any configuration options.

Drop sourcing of functions file since the only function used was
loadconfig().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
5d7d53b25a ctdb-scripts: Don't load CTDB configuration in statd-callout
The only configuration options used by statd-callout are NFS_HOSTNAME,
which comes from the NFS system configuration file, and
CTDB_NFS_CALLOUT, which is exported by the 60.nfs event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
36e7043fb1 ctdb-tests: Continue running if a testcase is not executable
At the moment the whole test run aborts without printing a summary of
results but inexplicably succeeds.  Instead, generate a clear failure
for a non-executable testcase.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Mathieu Parent
66a9b53457 Fix spelling s/succesfully/successfully/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:27 +02:00
Mathieu Parent
8f7749cda7 Fix spelling s/retun/return/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:27 +02:00
Mathieu Parent
8ed2873400 Fix spelling s/propogate/propagate/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:27 +02:00
Mathieu Parent
4e4764240b Fix spelling s/Everytime/Every time/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:26 +02:00
Mathieu Parent
fe53f0b3d6 Fix spelling s/allows to/allows one to/
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-05-12 02:09:25 +02:00
Martin Schwenke
c6c67d9ed2 ctdb-scripts: Remove function rewrite_ctdb_options()
This is no longer necessary after the removal of support for
CTDB_DBDIR=tmpfs.

File-local variable ctdb_rundir is no longer used, so drop it.

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): Tue May  1 16:20:37 CEST 2018 on sn-devel-144
2018-05-01 16:20:37 +02:00
Martin Schwenke
043f3f266a ctdb-scripts: Drop support for CTDB_DBDIR=tmpfs
CTDB has no business mounting filesystems.  Instead, documentation
for the new configuration system will include a recommendation that a
tmpfs be mounted on the volatile database directory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:21 +02:00
Martin Schwenke
eb7ec16a96 ctdb-daemon: Change default volatile database directory
Volatile databases now have their own subdirectory.  This makes things
easier if we later recommend mounting a tmpfs on the volatile database
directory, rather than supporting the current CTDB_DBDIR=tmpfs magic.

No need to create database directories for local daemon tests.  ctdbd
will do that.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:21 +02:00
Martin Schwenke
8ea7fa57f4 ctdb-tests: CTDB_DBDIR_PERSISTENT should not depend on CTDB_DBDIR
Add new variable CTDB_DBDIR_BASE, just for event script unit tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
051203e1f8 ctdb-scripts: Fix location of persistent databases
If CTDB_DBDIR_PERSISTENT is not set then set the default relative to
CTDB_VARDIR.  The persistent database directory is not (necessarily)
relative to the volatile one.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
eba893f06c ctdb-tests: Fix location of persistent databases
Always use CTDB_DBDIR_PERSISTENT, which is setup by the test
infrastructure.  The persistent database directory is
not (necessarily) relative to the volatile one.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
3459a152f7 ctdb-scripts: Drop UDP/file logging warning from ctdbd_wrapper
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:20 +02:00
Martin Schwenke
9a5ba6b9c9 ctdb-daemon: Log the logging location when not logging via syslog()
A variant of this is currently done by the wrapper but will be removed
from there because the wrapper will no longer see the CTDB_LOGGING
option.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
8821857cdf ctdb-scripts: Drop warning when there is no recovery lock
After configuration changes ctdbd_wrapper will no longer see the
CTDB_RECOVERY_LOCK option.  The daemon already logs a warning if the
recovery lock is not set, so simply drop this extra warning.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
79c49f60a9 ctdb-daemon: Reorder main() to improve the structure
Move code into clearly defined sections.  Add a fail label for fatal
errors to ensure memory is freed.  Modernise debug messages.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
9623c920ab ctdb-daemon: Consolidate basic CTDB context initialisation
None of this initialisation needs configuration options, so centralise
it with the context initialisation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
1b57487675 ctdb-daemon: Drop duplicate initialisation of request ID context
This doesn't require configuration options so keep the instance in
ctdb_init().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
4eea531416 ctdb-daemon: Move ctdb_init() to the only place it is used
This used to be used by client code but not anymore, so move it to
where it is used.  Drop the comment because it is wrong.  Modernise
logging.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
f4fe768ca3 ctdb-docs: Move remaining test options to README
Test options do not belong in the user documentation.  Move them to
the README file in the tests/ subdirectory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:19 +02:00
Martin Schwenke
8a835ae175 ctdb-daemon: Drop ctdbd --torture and --valgrinding options
These haven't been used by anyone in a long time.  --valgrinding is
less use with CTDB_VALGRINDING now gone.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
32430f8415 ctdb-scripts: Drop CTDB_VALGRIND testing option
This is too inflexible for general use.  There is no use finding a new
home for this in the new configuration scheme.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
8c43ce7494 ctdb-daemon: Drop ctdbd --sloppy-start and --nopublicipcheck options
CTDB_LOCAL_DAEMON_MODE=yes is used instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
5081cec49e ctdb-tests: Make local daemon tests depend on CTDB_TEST_MODE
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
3c7b766e5a ctdb-daemon: Add testing environment variable CTDB_TEST_MODE
This is a generic indicator that tests are being run.

For local daemons, this will replace --sloppy-start and
--nopublicipcheck - it also does --nosetsched, which isn't being
removed at this point.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
0349d65854 ctdb-daemon: Drop ctdbd --notification-script command-line option
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
e5af067866 ctdb-scripts: Drop CTDB_NOTIFY_SCRIPT configuration option
Notification scripts are installed into $CTDB_BASE/notify.d/ and are
always run by notify.sh.  Leave notify.sh where it is for now but no
longer consider it a configuration file.  This is an interim measure
and will be changed again soon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
7e9dd3fd3c ctdb-tests: Ensure notify.sh is available to local daemons
Changes to notification configuration are coming, so ensure notify.sh
is always "installed" for local daemons.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
ed80fc1344 ctdb-daemon: Provide a default location for the notification script
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
518be6d5a2 ctdb-daemon: Use a local variable instead of repeating getenv()
Makes the error handling easier and the code more compact.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
7052f87903 ctdb-daemon: Drop unused function ctdb_set_notification_script()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
17ad7d9114 ctdb-daemon: Set ctdb->notification_script directly
This doesn't need a wrapper function.  It gets in the way if building
a value involves allocating memory (e.g. talloc_asprintf()) and then
ctdb_set_notification_script() duplicates that memory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
f5ee088420 ctdb-docs: Move some configuration options out of the debug section
These aren't test options so improve their visibility.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
cdd51df35f ctdb-docs: Move some ctdbd options out of the debug section
ctdbd -i might be useful with systemd or similar, so should be
documented.

--nosetsched and --script-log-level options are valid user-level
options.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Amitay Isaacs
b3dc0dca47 ctdb-build: Rename ctdb-client2 subsystem to ctdb-client
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Amitay Isaacs
e70fe41949 ctdb-daemon: Move ctdb_client.c to server/ subdir
It is used only by the code in the server directory.  It's mainly used
in recovery daemon and vacuuming child process.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Amitay Isaacs
45202d86c5 ctdb-build: Drop unnessary dependency on ctdb-client
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Amitay Isaacs
01c8dc7e15 ctdb-client: Remove ununsed functions from old client code
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13411

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-01 13:31:17 +02:00
Martin Schwenke
a23d805475 ctdb-tests: Fix a typo
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): Mon Apr 30 14:26:43 CEST 2018 on sn-devel-144
2018-04-30 14:26:43 +02:00
Martin Schwenke
693ca7b99e ctdb-tests: Simplify a test
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-04-30 11:41:22 +02:00
Martin Schwenke
110e72ccd8 ctdb-scripts: Drop CTDB_RC_LOCAL testing hook
This is not used.

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 Apr 27 09:37:49 CEST 2018 on sn-devel-144
2018-04-27 09:37:48 +02:00