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

4351 Commits

Author SHA1 Message Date
Amitay Isaacs
7631830152 server: Replace BOOL datatype with bool, True/False with true/false
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d)
2012-05-28 11:22:25 +10:00
Martin Schwenke
0e1f20fe03 tests/eventscripts: Tweak expected output for lockd:b restart
Commit 13acd58c41fba1a33894fbd654fed69ea0eac322 mades this test fail,
since lockd:b and lockd:bs were incorrectly producing the same output.

(This used to be ctdb commit fd3b73d7e634f16cbb99d7d5a548e12f00d1aadb)
2012-05-25 15:26:26 +10:00
Martin Schwenke
2d953e6957 tests: Complex tests must not be run from a cluster node
Tickle tests fail if run from a node involved in the test.

The condition is actually weaker than this: the test can't be run from
a CTDB node that is hosting public addresses that may be used by the
test.

Rework ctdb_test_check_real_cluster() to support checking this.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 14012781c3751a514055df29ea70adfb12ecb2d9)
2012-05-25 15:26:18 +10:00
Martin Schwenke
1ba9fa2e48 Eventscripts: Fix deprecated iptables ! usage
This currently causes warning in the logs.

This change is not SLES10-compatible but we already have some other
non-SLES10-compatible changes.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7640352c6697f9d4e0d13afbc8523afc64e7d462)
2012-05-25 15:26:07 +10:00
Martin Schwenke
e2831efd0c tests: test_wrap needs to set TEST_BIN_DIR when installed
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit c5e3e4bccbde349739b90d8761e1aa19637887a8)
2012-05-25 15:25:44 +10:00
Amitay Isaacs
569da46e3c packaging: make ctdb-tests package depend on nc
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit d0b539c4d2d4dc8c9eb95801bff09c3bcbeebca5)
2012-05-25 15:25:29 +10:00
Amitay Isaacs
cfe030e297 tests: Use per node log files when running tests with local daemons
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 61df417821762d87ed01a7b5e64c35079940344d)
2012-05-25 15:25:15 +10:00
Ronnie Sahlberg
bbd33d6394 RECOVERY: Increase the time we allow before timing out recovery related tasks.
If the system is temporarily taking unusually long to perform these tasks it is better to wait a lot longer and allow the tasks to complete than timing out repeatedly and then becomming banned.

(This used to be ctdb commit 03fa2a517247eb2adfba67248e2466f17ea14418)
2012-05-25 12:34:14 +10:00
Ronnie Sahlberg
e7d21834ae RECOVER: When we pull databases during recovery, we used to reallocate the databuffer for each entry added. This would normally not be an issue, but for cases where memory is fragmented, this could start to cost significant cpu if we need to reallocate and move to a different region.
Change this to instead preallocate , by default, 10MByte chunks to the data buffer.
This significantly reduces the number of potential reallocate and move  operations that may be required.

Create a tunable to override/change how much preallocation should be used.

(This used to be ctdb commit 1f262deaad0818f159f9c68330f7fec121679023)
2012-05-25 12:34:06 +10:00
Ronnie Sahlberg
7d9acaeb37 DOCS: Document the new tunables to produce warnings if databases grow unexpectedly big.
(This used to be ctdb commit 6cf6a9b071bd8dd730717ca033337ff73bf247bb)
2012-05-21 13:26:23 +10:00
Ronnie Sahlberg
26322d257d DEBUG: Add checks for and print debug messages when 1) a database contains very many records, 2) when a database is very big, 3) when a single record is very big.
Add tunables to control when to log these instances and allow it to be completely turned off by setting the threshold to 0

(This used to be ctdb commit 9ed58fef4991725f75509433496f4d5ffae0ae87)
2012-05-21 13:26:13 +10:00
Ronnie Sahlberg
dd647d45cb TEVENT: Add back tracking of long runnig events to the local copy of tevent library
(This used to be ctdb commit 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00)
2012-05-21 09:17:37 +10:00
Ronnie Sahlberg
f84545726f GANESHA: make the ganesha script executable by default
(This used to be ctdb commit f59b40b3f8ea3da8ffb8601bc025e83c237072d5)
2012-05-17 11:16:57 +10:00
Ronnie Sahlberg
383711ac82 Merge remote branch 'martins/ganesha'
(This used to be ctdb commit f23b5a160184db8c92f8c69307dc4a64adae839d)
2012-05-17 11:48:07 +10:00
Ronnie Sahlberg
dce5969d12 Debug: When scripts hang, we may need to collect additional data in order to debug why the script hung.
Break this debug and datacollection out into an external script to make it easier to modify what data we need to collect.
For now we only collect a pstree so we can see what part of the script we hung in.

S1037271

(This used to be ctdb commit 6e68797af67bee36f2bad045f94806e7e98f27e9)
2012-05-17 10:29:03 +10:00
Martin Schwenke
835e0b6d49 Eventscripts: Modernise 60.ganesha to match 60.nfs
Originally from Srikrishan Malik <srikrishan.malik@in.ibm.com> with
some style changes by me.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 637cab6304dae66b85668506028c76ea1ee88980)
2012-05-16 17:24:21 +10:00
Martin Schwenke
ffbe59bd44 Eventscripts: restart lockd in the background when going unhealthy
Sometimes the restart can hang when there are I/O problems.  Then the
eventscript times out and gets killed so the node never marked as
unhealthy.

Restarting in the background avoids this.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 13acd58c41fba1a33894fbd654fed69ea0eac322)
2012-05-16 17:19:55 +10:00
Martin Schwenke
92eb004162 Eventscript functions: add optional version to nfs_check_rpc_service()
This can be optional because the 1st item of each action-triple is a
test comparison that starts with '-'.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 92f74fd589467b46c758e116e97417edfe8773d7)
2012-05-16 17:05:05 +10:00
Martin Schwenke
aa50bc580c tests: Move the "ctdb reloadips" test from complex/ to simple/
This is made possible by separation of public addresses files for
local daemons and the addition of get_ctdbd_command_line_option().

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 2bcd58b30d7cf6dd48ad7f019810c6965a44c85a)
2012-05-14 15:13:41 +10:00
Martin Schwenke
4563865fb6 tests: Fix a typo in daemons_setup()
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 863ad337fa3c4effe1fd370d3ba414027c600bd6)
2012-05-14 15:13:41 +10:00
Martin Schwenke
8880484658 tests: New function get_ctdbd_command_line_option() for integration testing
This allows, for example, the public addresses file used by a
particular daemon to be known.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f4b7d14f2e3c7345e7a09abb27c32923fb78cbc4)
2012-05-14 15:13:41 +10:00
Martin Schwenke
e3d357b9c3 tests: Use per-daemon public_addresses file for local daemons
This allows a node's public addresses file to be hacked for testing.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit c7d6e4557d00de674737e2c8d6cbebaa2461c303)
2012-05-14 15:02:19 +10:00
Martin Schwenke
64d90c0795 tests: Restore the old behaviour of "make test" so it uses tests/var
This is finally possible, given all the other changes...  :-)

This is a good default because daemons will be left running, test/var
will still exist and test failures can be investigated.

To "automatically" clean up, do:

  ./tests/run_tests.sh -C -V tests/var -- tests/simple/99_daemons_shutdown.sh

... although "killall ctdbd ; rm -rf tests/var" is less keystrokes.  ;-)

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d661f09c6c76543bd091d51bc0e6fe97ed0f55d1)
2012-05-14 15:02:19 +10:00
Martin Schwenke
594601bdad tests: Fix wrapper scripts to handle options and tests without breakage
If the -V option is given and no tests are supplied, the "cd" command
in run_tests.sh cause scripts/run_tests to interpret the argument to
-V incorrectly.  Therefore, the wrapper scripts can't use "cd" because
they don't know what the options are doing!

Instead scripts/run_tests searches for each test relative to the
current directory and, if not previously found, then searches relative
to the top-level tests directory.  This is a much better way of doing
things.

Given that run_tests.sh and run_cluster_tests.sh were starting to
contain duplicate complex logic, remove run_cluster_tests.sh and
replace it with a symlink to run_tests.sh.  Run_tests.sh checks $0 to
see what options/defaults to use.  Update INSTALL to deal with this.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ed2db1f4e8d2b222d7f912a4a007ce48a23e83b0)
2012-05-14 15:02:19 +10:00
Martin Schwenke
b8e9a3e54d tests: Add a test for "ctdb reloadips"
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d2514051761ba23deee0e118c25afab2ab8d854e)
2012-05-11 12:13:24 +10:00
Martin Schwenke
f510ae64cb tests: In integration tests, use --node-ip to avoid locking weirdness
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a00e80c701a0f9695f41c24e0360c25c0873d49d)
2012-05-11 10:33:27 +10:00
Martin Schwenke
99ed2d11e1 tests: Allow run_cluster_tests.sh to take options
However, options must be followed by "--".

This also fixes:

* a bug where specifying tests caused local daemons to be used; and
* an incorrect comment.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 6b8507d4d3062e709409b3790117d87311b3460d)
2012-05-11 10:33:27 +10:00
Martin Schwenke
af2ab74beb tests: Allow run_tests.sh to take options
However, options must be followed by "--".

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit db8cf8f5e644a0b21a6040287887fee40f38d4db)
2012-05-11 10:33:27 +10:00
Martin Schwenke
b713c11621 tests/eventscripts: Fix a policy routing test
The previous commit 55006ea8999ab3721fcde81b92692661065f0688
highlighted an error in this test.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9f20fbf91706db94f65f62dbd6a4e087890c1da9)
2012-05-11 10:33:27 +10:00
Martin Schwenke
4cf10db7d4 tests/eventscripts: $CTDB_BASE needs to be in $TEST_VAR_DIR
The policy routing tests write the configuration file into $CTDB_BASE,
as per rcommended practice.  Unless this is in $TEST_VAR_DIR this
won't work sensible when the tests are installed.

Things are done slightly different than for /etc.  Here we use
symlinks and we want them to be dereferenced.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 61c80f58a8cfbaca7e669ef8cd95b4f6b5dc66c7)
2012-05-11 10:33:27 +10:00
Martin Schwenke
17a6d1d975 Packaging: Improve dependencies
We don't strictly need gawk (i.e. could probably use nawk), but that
seems to provide /bin/awk on RHEL.

PreReq seems old-school.  We don't have an scriptlets, so nothing
needs to be installed before CTDB.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit e7ba0a30e7b7fe78e83e493128b349708cf0038a)
2012-05-11 10:33:27 +10:00
Martin Schwenke
0fa93a9613 Packaging: add options to ctdb.spec.in to force use of bundled libraries
Ideas borrowed from the Fedora samba4 spec file.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 14a630cbc638d2f3bf699de5d94131e5f7d1a3ea)
2012-05-11 10:33:27 +10:00
Martin Schwenke
fd048a1771 Eventscript functions: add optional version to nfs_check_rpc_service()
This can be optional because the 1st item of each action-triple is a
test comparison that starts with '-'.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 1957d53b78f101cd0cd37d9705a225deef5174a2)
2012-05-11 10:33:27 +10:00
Martin Schwenke
469a5889de Packaging: devel package fixes
Group was non-existent, typo in summary.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f0a14169883661a702a352aa0311a2b433071a83)
2012-05-11 10:33:27 +10:00
Martin Schwenke
9346a5364f Packaging: generate a ctdb-tests package
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5c23244591b8005f91d8e25e719cd332c711db14)
2012-05-11 10:33:27 +10:00
Ronnie Sahlberg
dfdec4a07c We dont need to serialize the "probe which address this node is" if we have given an explicit --node-ip on the commandline
(This used to be ctdb commit e3dc5bd3f1ef1f0ed08f57a5b5bafcac936e9ed0)
2012-05-10 17:42:06 +10:00
Ronnie Sahlberg
a57eba2bb4 Track all child process so we never send a signal to an unrelated process (our child died and kernel wrapped the pid-space and reused the pid for a different process
Wrap all creation of child processes inside ctdb_fork() which is used to track all processes we have spawned.
Capture SIGCHLD to track also which child processes have terminated.

Wrap kill() inside ctdb_kill() and make sure that we never send a !0 signal to a child process pid that has already terminated (and might have been replaced with a

(This used to be ctdb commit f73a4b1495830bcdd094a93732a89dd53b3c2f78)
2012-05-03 14:03:26 +10:00
Ronnie Sahlberg
85432ecc53 DOC: document the reloadips command
(This used to be ctdb commit 90e8c4dc7d89c460ad2da5a9af1cef006db3b1c0)
2012-05-03 11:07:17 +10:00
Ronnie Sahlberg
a367fa6138 RELOADIPS: simplify the reloadips code a bit
and also update the "read public address file" to not check if the address exists already locally when we read if from the child process, to stop it
from spamming the logs with "We already host ..."
messages

(This used to be ctdb commit 334ea830f1bf33419f4a1e78f23afd41a852d0f4)
2012-05-01 15:34:26 +10:00
Amitay Isaacs
733bc2c03c Revert "server: locking: Provide a common API for non-blocking locking of TDBs"
This reverts commit 6a92fc2b8da2bba98dca29b781ab459ba4e879a5.

Reverting incomplete changes to ctdb_lock.c

(This used to be ctdb commit 2a3d22431948f849c93762a6ab49344acb687feb)
2012-05-01 12:09:48 +10:00
Amitay Isaacs
c3c5dec52c server: locking: Provide a common API for non-blocking locking of TDBs
(This used to be ctdb commit 6a92fc2b8da2bba98dca29b781ab459ba4e879a5)
2012-05-01 12:09:38 +10:00
Amitay Isaacs
ec72e30b8f tests/simple: Fix typo in the test message
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit c642b452e7b0272e32c02509ac579b790d9a03e7)
2012-05-01 12:09:38 +10:00
Ronnie Sahlberg
7a1aa560e7 Add new control to reload the public ip address file on a node
Also add a method to use the recovery master/daemon to reload the public ips on all nodes in the cluster.
Reloading the public ips on all node sin the cluster is only suported if all nodes in the cluster are available and healthy.

(This used to be ctdb commit 05603e914f8c12618d7e06943c0f7df207f645b0)
2012-05-01 10:48:08 +10:00
Martin Schwenke
c30356c140 tests: Update README
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit e9fad1ff82e6fb9e6bf615986c41c746fd415058)
2012-04-27 17:19:45 +10:00
Martin Schwenke
a4f4df233f tests/eventscripts: $CTDB_ETCDIR should be in $TEST_VAR_DIR
The policy routing tests modify /etc/iproute2/rt_tables, so this
directory should not be in the installation area.

Instead the contents of tests/eventscripts/etc are copied into a place
under $TEST_VAR_DIR where the directory can be modified with gay
abandon.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a0afb4195caab39891a304b8b4eadd94cab7c4a7)
2012-04-27 15:42:43 +10:00
Martin Schwenke
4528c55d3e tests/eventscripts: Use a canned ctdb.sysconfig rather than a link
The link is hard to manage and has no real advantage.

The canned config is 2 of the 3 currently non-comment/whitespace lines
in config/ctdb.sysconfig.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 66d0b913301c3b1037278bcaa0452ecbe07248df)
2012-04-27 15:42:43 +10:00
Martin Schwenke
a4083f2e97 tests/eventscripts: Explicitly set CTDB_SERVICE_AUTOSTARTSTOP="yes"
No use depending on defaults in the initscript - the tests should
control what is tested.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 1c37abac5fd18c139aa55989d0fb6b475f4c22f1)
2012-04-27 15:42:42 +10:00
Martin Schwenke
6a21c819e7 tests/eventscripts: Be more defensive about removing the var directory
Could add -r but that might avoid error.  The only time it doesn't
exist is the 1st time a top-level var directory is used.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 047d97dc84a5943556efb31bb2856fd04835fffa)
2012-04-27 15:42:42 +10:00
Martin Schwenke
0c8f785628 Eventscripts: fix basename -> dirname typo
I fixed one of these previously but didn't notice this one...  :-(

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 0c674efd19368d41d9cc28909d2b16c1af54c86c)
2012-04-27 15:42:42 +10:00
Martin Schwenke
a14671f829 tests/eventscripts: Add sanity check to esnure events.d/ can be found
If it can't, the installation is probably inconsistent, so a
(hopefully) helpful message is printed.  :-)

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit df732ca8e27f0f3417b4d5d259157bd0e0632124)
2012-04-27 15:42:42 +10:00