summaryrefslogtreecommitdiffstats
path: root/ctdb
Commit message (Collapse)AuthorAgeFilesLines
...
* ctdb-common: mkdir_p should not try to create .Amitay Isaacs2014-01-161-0/+4
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4Matthias Dieter Wallnöfer2014-01-091-4/+0
| | | | | | | | | http://www.python.org/doc//current/c-api/none.html Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date(master): Thu Jan 9 16:27:47 CET 2014 on sn-devel-104
* ctdb/eventscripts: Do not reconfigure in "monitor" eventsMartin Schwenke2013-12-175-24/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "monitor" events can be cancelled. If a reconfigure action does a service restart then the "monitor" event can be cancelled at the inconvenient moment after the service is stopped. In this case the service stays down and the node may become unhealthy (depending on whether there are any repair actions in the monitor event). A long time ago we did service reconfiguration in "monitor" events following failovers. Service reconfiguration was then moved to the "ipreallocated" event. However, reconfiguration in "monitor" events has been kept as a last resort in case an "ipreallocate" event does not occur. The only important case that this covers is "ctdb deleteip", where "releaseip" events are generated without a corresponding "ipreallocated". Therefore, IPs can be deleted without running the required service reconfiguration. The supported way of removing IP addresses is now via "ctdb reloadips", which always causes a takeover run with a corresponding "ipreallocate" event. This means that service reconfiguration in "monitor" events is no longer required and should be removed because it is unsafe. Also update the associated tests. Make the first confirm that the monitor event no longer does reconfiguration. Change the others to test that monitor status is correctly replayed when something else is doing a reconfigure and currently holds the reconfigure lock. 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): Tue Dec 17 06:32:35 CET 2013 on sn-devel-104
* Fix CID 1138340 Resource leakVolker Lendecke2013-12-171-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix CID 1138341 Resource leakVolker Lendecke2013-12-171-0/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ctdb:packaging:RPM: don't run autogen.Michael Adam2013-12-091-3/+0
| | | | | | | | | | | | | | | | | autogen is already run in maketarball.sh which generates the tarball for the RPM. This way, we don't have a rpm build dependency on autoconf. Recent changes introduced a dependency into autoconf version >= 2.60, so this fix allows the generated source RPM to be built also on older platforms. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-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 Dec 9 05:47:00 CET 2013 on sn-devel-104
* ctdb:packaging:RPM: package the new manpagesMichael Adam2013-12-091-0/+4
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:build: install the new manpagesMichael Adam2013-12-091-0/+6
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests: update READMEMichael Adam2013-12-051-5/+23
| | | | | | | | explain how to run individual tests and test collections and remove mention of tests/scripts/run_tests which does not exist any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb/tests/scripts: Promote scripts/run_testsMartin Schwenke2013-12-052-317/+304
| | | | | | | The wrapper is not needed anymore. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/scripts: Simplify the top-level test scriptsMartin Schwenke2013-12-052-46/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment run_tests.sh has quite fragile argument processing. It needs that annoying "--" between options and tests. The random default (mktemp -d) for TEST_VAR_DIR is wrong and is worked around in various places. Instead: * Change the default behaviour to print a summary, add new option -N to turn off summary, and remove old -s option. * Change the default behaviour to run integration tests with local daemons, add new options -c to run on a cluster, remove old -l option. * Make $testdir/var the default if the tests are not installed, and $(mktemp -d ) the default if tests are installed. * Move the default tests for local/cluster into scripts/run_tests. run_tests.sh (and the run_cluster_tests.sh symlink) should behave as before but with slightly more reasonable defaults. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/scripts: Sort command-line optionsMartin Schwenke2013-12-051-16/+16
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/integration: Decentralise the daemon restart codeMartin Schwenke2013-12-052-7/+14
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/integration: Update daemons shutdown pseudo-testMartin Schwenke2013-12-053-3/+16
| | | | | | | | Don't scatter the TEST_LOCAL_DAEMONS logic around the code. Limit it to the local daemons file. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/simple: Local daemons version of setup_ctdb() overridesMartin Schwenke2013-12-052-4/+3
| | | | | | | | setup_ctdb() doesn't need to do anything on a cluster. To avoid a conditional, just override it for local daemons. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/integration: Remove some unused functionsMartin Schwenke2013-12-051-43/+0
| | | | | | | This was the start of some refactorisation that was never completed. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/integration: Remove the time logging codeMartin Schwenke2013-12-052-62/+0
| | | | | | | | This hasn't been required for a long time and is probably broken. If it is needed in future then we know where to find it. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/simple: Move the local daemons code to its own fileMartin Schwenke2013-12-053-124/+125
| | | | | | | This is just a straight move. The clever stuff will follow. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/tests/integration: Update NFS tickles test and supporting codeMartin Schwenke2013-12-052-176/+17
| | | | | | | | | | | | | | | This currently requires an eventscript to be dynamically installed. This eventscript is only used to help determine when a monitor event has occurred. This code is horrible and fragile. A better way is to just monitor the output of "ctdb scriptstatus". When changes it changes then a monitor event has occurred. Also remove the old code that checks for tickle information in shared storage. CTDB hasn't done things this way for a long time. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb:tests: in the stub "ip link show" command use echo instead of catMichael Adam2013-11-281-4/+2
| | | | | | | | | | | | This case of "ip link show" does not break autobuild with "Broken pipe" messages, but let's be consistent. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Nov 28 09:23:03 CET 2013 on sn-devel-104
* ctdb:test: remove unused ip2ipmask from integration.bashMichael Adam2013-11-281-7/+0
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests:76_ctdb_pdb_recovery: change from using ctdb pstore to ctdb ptrans.Michael Adam2013-11-281-4/+2
| | | | | | | | | | This removes the requirement to create a temporary file and hence makes this test runnable against local daemons and against a real cluster without further changes. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a messageMichael Adam2013-11-281-1/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a messageMichael Adam2013-11-281-1/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests: in the stub ip command, avoid broken pipe by using echo instead ↵Michael Adam2013-11-281-9/+3
| | | | | | | | | | | | of cat This fixes running "make autotest" from autobuild, since it prevents irritating error output in delete_ip_from_iface() when calling ip addr list ... | grep -Fq "inet ..." . Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests: ignore SIGPIPE in unit testsMichael Adam2013-11-281-0/+2
| | | | | | | | | | | This makes scripts called in the unit tests behave like when called from ctdbd which ignodes SIGPIPE. This also makes the scrips behave the same when called from "make autotest" directly and via autobuild (python). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests: add path of ip command to extra output in the error caseMichael Adam2013-11-281-0/+1
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests: remove old now unused script test/recover.shMichael Adam2013-11-281-107/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb:build: Update mkversion.sh to use samba-* tagsMartin Schwenke2013-11-281-3/+3
| | | | | | | | | To test CTDB on a cluster we need to be able to build test RPMs with relatively sane version numbers. This is a minimal change to allow that to happen, until CTDB is integrated into the Samba build system. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests/simple: Nobody looks at /tmp/recloop.out so use /dev/null insteadMartin Schwenke2013-11-271-1/+1
| | | | | | | | | | | Otherwise this should use mktemp, something should look at the output and the file should be removed. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Nov 27 20:39:00 CET 2013 on sn-devel-104
* ctdb:tests: run_tests should ignore bogus test directoriesMartin Schwenke2013-11-271-0/+2
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb:tests: New "autotest" Makefile.in targetMartin Schwenke2013-11-271-0/+3
| | | | | | | | | | | | This needs to run with socket wrapper and needs to stop after the 1st error. Pair-Programmed-With: Michael Adam <obnox@samba.org> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Amitay Isaacs <amitay@gmail.com>
* ctdb:tests: Add -S option to support socket wrapperMartin Schwenke2013-11-271-1/+9
| | | | | | | | Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb:tests: Rework unit test result filteringMartin Schwenke2013-11-274-19/+18
| | | | | | | Using a variable is too fragile, so use a function instead. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb:tests: remove unused setup_nmap_output_filter()Martin Schwenke2013-11-271-5/+0
| | | | | | | The tests that used it have gone. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb:tests/integration: Be more careful when killing ctdbdMartin Schwenke2013-11-271-1/+1
| | | | | | | | Also match $TEST_VAR_DIR in the socket name. This means that we'll only ever kill ctdbd process belong to our own test run. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb: Update NEWSMartin Schwenke2013-11-271-0/+38
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-scripts: Be careful when generating unique pids for stack tracesAmitay Isaacs2013-11-271-1/+1
| | | | | | | sort expects the data to be line based, so make it so. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-config: Simplify the default CTDB configuration fileAmitay Isaacs2013-11-271-322/+19
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-programmed-with: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-scripts: Replace hard-coded /var/ctdb with CTDB_VARDIRAmitay Isaacs2013-11-271-2/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-scripts: Set defaults for CTDB_DBDIR and CTDB_DBDIR_PERSISTENTAmitay Isaacs2013-11-271-0/+5
| | | | | | | | | If these configuration variables are not defined, then there should a default fallback. This is a workaround till CTDB compile time configuration can be accessed at runtime. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-eventscripts: Perform share check before NFS RPC checks in 60.ganeshaAmitay Isaacs2013-11-271-6/+6
| | | | | | | | If NFS RPC checks do restart Ganesha, then it's possible that share check can fail prematurely. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tools/ctdb: Improve error checking when parsing node stringMartin Schwenke2013-11-271-1/+8
| | | | | | | If a node isn't numeric then it is silently converted to 0. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-recoverd: Only respond to currently queued ipreallocated requestsMartin Schwenke2013-11-271-1/+10
| | | | | | | | | | | Otherwise new requests can come in during the latter parts of the takeover run when the IP allocation algorithm has already run, and the new requests will be dequeued even though they haven't really be processed. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-scripts: Add an early exit to statd-callout's notify caseMartin Schwenke2013-11-271-0/+1
| | | | | | | | If $statd_state is empty then the loop will run once and print spurious errors. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-eventscripts: Remove the nfs_statd_update() call from 60.ganeshaMartin Schwenke2013-11-271-4/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests/integration: Neaten up some of the persistent database testsMartin Schwenke2013-11-274-150/+171
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tools/ctdb: Fix tstore command to generate ltdb header internallyAmitay Isaacs2013-11-271-8/+26
| | | | | | | | | | This fixes an alignment discrepancy on 32-bit vs 64-bit platforms. sizeof(struct ctdb_ltdb_header) = 20 (32-bit) = 24 (64-bit) Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests/takeover: Fix bogus test descriptionMartin Schwenke2013-11-271-1/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-tests/simple: User sleep_for() instead of sleepMartin Schwenke2013-11-271-2/+2
| | | | | | | Progress... Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>