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

111363 Commits

Author SHA1 Message Date
Martin Schwenke
4e0cf2fa76 ctdb-tests: Delete unused fake /etc/sysconfig/ctdb file
The only remaining item is a setting of CTDB_DEBUGLEVEL, which is not
required.

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 Mar 28 07:27:58 CEST 2018 on sn-devel-144
2018-03-28 07:27:58 +02:00
Martin Schwenke
02fc52d69b ctdb-scripts: Tunables are now loaded from ctdb.tunables
Using CTDB_SET_TunableVariables in the main configuration file is no
longer supported.

The only subtlety is an unexpected order change in one of the unit
test results.  This is because the old implementation implicitly
sorted the tunable variables via the set command.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:21 +02:00
Martin Schwenke
1db96ce26e ctdb-tests: Rename setup_config() to setup_tunable_config()
Drop the "CTDB_SET_" prefix from variable names and add it back for
now.  When there is a better way of setting tunables then this
function will support that.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:21 +02:00
Martin Schwenke
66cfddc61c ctdb-tests: Script options into per-script file
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:21 +02:00
Martin Schwenke
65ce5e2129 ctdb-scripts: Use load_script_options in event scripts
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:21 +02:00
Martin Schwenke
a2f8730c75 ctdb-scripts: Add new function load_script_options()
For now this loads the global CTDB configuration too.  This will
change in the future after things are properly modularised.

This also anticipates a future change where event scripts end with a
".script" suffix.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:21 +02:00
Martin Schwenke
e0c2b3a1e1 ctdb-tests: Use setup_script_options() in 91.lvs tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:21 +02:00
Martin Schwenke
a48bd34246 ctdb-tests: Use setup_script_options() in 60.nfs (and 06.nfs) tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
96ed6c34ba ctdb-tests: Use setup_script_options() in 50.samba tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
ecda38c894 ctdb-tests: Use setup_script_options() in 49.winbind tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
3944fc4ae3 ctdb-tests: Use setup_script_options() in 41.httpd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
17b8f12d1c ctdb-tests: Use setup_script_options() in 40.vsftpd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
051458feb0 ctdb-tests: Use setup_script_options() in 31.clamd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
a16eb657d1 ctdb-tests: Use setup_script_options() in 20.multipathd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
ef98333d6a ctdb-tests: Use setup_script_options() in 13.per_ip_routing tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
6b88a8188b ctdb-tests: Use setup_script_options() in 11.natgw tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
87cd76e0c6 ctdb-tests: Use setup_script_options() in 10.interface tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
45de2b1d9b ctdb-tests: Use setup_script_options() in 05.system tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
3712640d47 ctdb-tests: New function setup_script_options()
Currently exports the variable assignment on each line.  Later this
can be changed to handle actual per-script configuration.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
b499775527 ctdb-scripts: Split CTDB configuration loading
loadconfig() currently tries to load the CTDB configuration and also
any system configuration relevant to the current (event) script.

Instead add a new function load_system_config() to load the
distribution-specific system configuration for a component.  Call this
directly in the rare scripts that need the system configuration.

Also call load_system_config when loading the CTDB configuration to
pull in anything from the CTDB system configuration.  This is partly
for backward compatibility but also to get options that can be used
anywhere.

loadconfig() no longer takes an argument.  It simply loads the CTDB
configuration.

Drop support for falling back to /etc/ctdb/sysconfig/ctdb (or
similar).  Surely there's nobody who uses that!

Also, drop the indirection where loadconfig() calls _loadconfig().
This was used years ago as a test hook and is no longer required.

Inexplicably, this change introduces a new shellcheck test failure, so
silence this.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
8b18221529 ctdb-docs: Promote CTDB_INIT_STYLE to global options section
Clarify that the global options should be set in the system
configuration file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:20 +02:00
Martin Schwenke
1c9b6c3992 ctdb-scripts: Clean up function detect_init_style()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
6c5f7c0003 ctdb-tests: Remove unused functions and stubs
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
58db0dbeda ctdb-tests: statd-callout script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
8ee51d2f2d ctdb-tests: 91.lvs event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
042a5101fc ctdb-tests: 60.nfs (and 06.nfs) event script setup modularisation
Includes gratuitous changes to get lines below 80 columns.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
ab5bc195c4 ctdb-tests: 50.samba event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
34eba35c61 ctdb-tests: 49.winbind event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
29eb410f26 ctdb-tests: 41.httpd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
99c3fd3460 ctdb-tests: 40.vsftpd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
3172dc7244 ctdb-tests: 31.clamd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
0bc1b4b27e ctdb-tests: 20.multipathd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
0ca1cfcf61 ctdb-tests: 13.per_ip_routing event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
a63c456080 ctdb-tests: 11.natgw event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
8c81fb9d9a ctdb-tests: 10.interface event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:19 +02:00
Martin Schwenke
d8232476ed ctdb-tests: 05.system event script setup modularisation
Do initial test setup using setup() function.  Rename usage setting
functions to make them more obvious.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
7cddc88d03 ctdb-tests: 01.reclock event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
db5c604152 ctdb-tests: 00.ctdb testing setup modularisation
Switch to generic setup() function and set variables there.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
5815c32d01 ctdb-tests: Define generic setup() function
Create default setup() function that aborts.  This function will be
redefined by each support script and used to do the setup.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
9038759259 ctdb-tests: statd-callout.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
44b29982f4 ctdb-tests: 60.nfs.sh simple 80 column fixups and reordering
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
b526968bcf ctdb-tests: 20.multipathd.sh 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
4430e22d0c ctdb-tests: 11.natgw.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
bfd2d70fc4 ctdb-tests: 10.interface.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
b6cde6ff9f ctdb-tests: 05.system.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
0f78e0b4c4 ctdb-tests: Create statd-callout.sh
Contains testing support used only by tests for statd-callout script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
0f080cebef ctdb-tests: Create 91.lvs.sh
Contains testing support used only by tests for 91.lvs event scripts.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
7d91de549b ctdb-tests: Create 60.nfs.sh and 06.nfs.sh
Contains testing support used only by tests for 60.nfs and 06.nfs
event scripts.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
32d8483b07 ctdb-tests: Create 50.samba.sh
Contains testing support used only by tests for 50.samba event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
a51e4ea042 ctdb-tests: Create 49.winbind.sh
Contains testing support used only by tests for 49.winbind event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00