vlendec/samba-autobuild/.git
8 years agotests: Update README files and add new README files where missing
Martin Schwenke [Fri, 20 Apr 2012 06:37:09 +0000 (16:37 +1000)]
tests: Update README files and add new README files where missing

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bef03b32f8ec114a64c55b25951aeeb939d87b33)

8 years agotests: Update top-level wrapper scripts
Martin Schwenke [Fri, 20 Apr 2012 04:10:34 +0000 (14:10 +1000)]
tests: Update top-level wrapper scripts

* Add the unit tests to "make test"
* Make scripts run from anywhere

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 95947123eee687ed83eebc567397a5bc9d55a945)

8 years agotests: run_tests should exit with failed test status if running with -H
Martin Schwenke [Fri, 20 Apr 2012 04:09:43 +0000 (14:09 +1000)]
tests: run_tests should exit with failed test status if running with -H

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6eb7fa572e7fc212332ddd68793e3f35161baf7c)

8 years agotests: test_wrap can use $TEST_SCRIPTS_DIR for a little extra clarity
Martin Schwenke [Fri, 20 Apr 2012 03:57:01 +0000 (13:57 +1000)]
tests: test_wrap can use $TEST_SCRIPTS_DIR for a little extra clarity

Also add a comment to explain what is being added to $PATH.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 704a3e3b83aff63e8f7b0650c141776ed2c1f047)

8 years agotests: test_wrap needs to set TEST_SCRIPTS_DIR
Amitay Isaacs [Thu, 19 Apr 2012 05:40:53 +0000 (15:40 +1000)]
tests: test_wrap needs to set TEST_SCRIPTS_DIR

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 79e979d67e3a2a5a13ef8fd2ef8f56331ec51558)

8 years agotests: CTDB_TEST_WRAPPER has to be an absolute path on a real cluster
Amitay Isaacs [Thu, 19 Apr 2012 05:33:46 +0000 (15:33 +1000)]
tests: CTDB_TEST_WRAPPER has to be an absolute path on a real cluster

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a0a7759d47ef5de4a8214273e39c50fb1f6e2e0c)

8 years agotests: Fix wrapper scripts
Amitay Isaacs [Thu, 19 Apr 2012 05:18:49 +0000 (15:18 +1000)]
tests: Fix wrapper scripts

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit eef162ceaac6853bf1ff622691901289280bc25f)

8 years agotests: Fix trailing whitespace issues in integration.bash
Martin Schwenke [Thu, 19 Apr 2012 02:19:02 +0000 (12:19 +1000)]
tests: Fix trailing whitespace issues in integration.bash

git complains...

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d714cf7924674a7a0eb6d585eb74a6a4df26fc12)

8 years agotests: Add new -H option for run_tests to avoid printing header/footer
Martin Schwenke [Thu, 19 Apr 2012 02:10:25 +0000 (12:10 +1000)]
tests: Add new -H option for run_tests to avoid printing header/footer

This is useful for using run_tests to run one test at a time within an
alternative test framework.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit dc71294a33e88baa4e85fa1fa66cab58a83c2607)

8 years agotests: Add -e option to cause run_tests to exit on first test failure
Martin Schwenke [Thu, 19 Apr 2012 01:50:32 +0000 (11:50 +1000)]
tests: Add -e option to cause run_tests to exit on first test failure

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f45295a3005474957852d0e7a5c3807e30ab519d)

8 years agotests: Remove ctdb_test_env
Martin Schwenke [Thu, 19 Apr 2012 01:31:02 +0000 (11:31 +1000)]
tests: Remove ctdb_test_env

Move the contents to integration.bash and run_tests as appropriate.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6136ab02db261b26a2a58b526c913e37e8146841)

8 years agotests: Programs run by tests should be found in $PATH
Martin Schwenke [Thu, 19 Apr 2012 01:27:05 +0000 (11:27 +1000)]
tests: Programs run by tests should be found in $PATH

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b5308142d03332d6d4e0c3b77283c772462fbb23)

8 years agotests: Move relative directory path hack from run_tests to common.sh
Martin Schwenke [Thu, 19 Apr 2012 01:23:07 +0000 (11:23 +1000)]
tests: Move relative directory path hack from run_tests to common.sh

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 66a7fece867966528689d2784a284e32d687a0f5)

8 years agotests: Local daemons are no longer the default, now require run_tests -l
Martin Schwenke [Thu, 19 Apr 2012 01:14:28 +0000 (11:14 +1000)]
tests: Local daemons are no longer the default, now require run_tests -l

Testing with local daemons is the current default but this is not the
most common use case.  Therefore, we make local daemons optional by
using the -l switch with run_tests or by setting TEST_LOCAL_DAEMONS to
the number of daemons to be used (-l sets this to 3).

TEST_LOCAL_DAEMONS replaces CTDB_TEST_NUM_DAEMONS and
CTDB_TEST_REAL_CLUSTER is removed.

Most relevant logic is moved from ctdb_test_env to integration.bash.
ctdb_test_check_real_cluster() is moved from integration.bash to
complex/scripts/local.bash.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 72ecae61c43b318ec94b527a12cbb0a382e8c3db)

8 years agoEventscripts - Fix typo in 13.per_ip_routing support for __auto_link_local__
Martin Schwenke [Wed, 18 Apr 2012 06:49:48 +0000 (16:49 +1000)]
Eventscripts - Fix typo in 13.per_ip_routing support for __auto_link_local__

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 9542e770a9780740b49122f1f52f08b32eca4b35)

8 years agotests: Rationalise integration test infrastructure
Martin Schwenke [Wed, 18 Apr 2012 05:04:50 +0000 (15:04 +1000)]
tests: Rationalise integration test infrastructure

* run_tests no longer includes common.sh, which is only to be included
  by test cases.  Therefore, it defines its own die() function.

* TEST_SUBDIR is now set in common.sh

* Move complex-only functions to complex/scripts/local.bash

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bfa1d6638d3e116640eb4e3bb71b21ba6ef8cae5)

8 years agotests: Rename ctdb_test_functions.bash to integration.bash
Martin Schwenke [Wed, 18 Apr 2012 04:55:21 +0000 (14:55 +1000)]
tests: Rename ctdb_test_functions.bash to integration.bash

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)

8 years agoMerge remote branch 'amitay/tdb-sync'
Ronnie Sahlberg [Wed, 25 Apr 2012 22:09:34 +0000 (08:09 +1000)]
Merge remote branch 'amitay/tdb-sync'

(This used to be ctdb commit 8052ee0a6bda3fa88501d77b2d53315be2b75ec1)

8 years agoMerge remote branch 'amitay/tevent-sync'
Ronnie Sahlberg [Wed, 25 Apr 2012 22:09:23 +0000 (08:09 +1000)]
Merge remote branch 'amitay/tevent-sync'

(This used to be ctdb commit 17ff3f240b0d72c72ed28d70fb9aeb3b20c80670)

8 years agoMerge remote branch 'amitay/talloc-sync'
Ronnie Sahlberg [Wed, 25 Apr 2012 22:09:05 +0000 (08:09 +1000)]
Merge remote branch 'amitay/talloc-sync'

(This used to be ctdb commit fdd5b9ac0a79f6bc7c8a05da2e2f11e002392bcd)

8 years agoMerge remote branch 'martins/master'
Ronnie Sahlberg [Wed, 18 Apr 2012 03:48:43 +0000 (13:48 +1000)]
Merge remote branch 'martins/master'

(This used to be ctdb commit abe7ebe6c531f912efe4ebc1daade4d2af67574c)

8 years agotests: More unit test factoring/rationalisation and bug fixes
Martin Schwenke [Wed, 18 Apr 2012 00:37:45 +0000 (10:37 +1000)]
tests: More unit test factoring/rationalisation and bug fixes

Move some options from eventscripts/run_tests.sh to scripts/run_tests.
Remove the former.

Move some functions from eventscripts/scripts/local.sh to
scripts/unit.sh.

Both of these are modified during move so they are no longer
eventscript-specific.

Tweak */local.sh so that the new functions in unit.sh are used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7ff485687891732074c9fc9998502ca197663d02)

8 years agotests/eventscripts: Share directories must be absolute in eventscript tests
Martin Schwenke [Wed, 18 Apr 2012 00:35:25 +0000 (10:35 +1000)]
tests/eventscripts: Share directories must be absolute in eventscript tests

This fixes eventscripts/scripts/local.sh:setup_generic() so that
directories listed in $FAKE_SHARES are absolute instead of potentially
relative (and, therefore, ignored by the NFS share check).

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8544162b7a4efa23c92bc0d2774df95bb7f0f463)

8 years agotests/eventscripts: Tweak an error message in a policy routing test
Martin Schwenke [Tue, 17 Apr 2012 02:57:46 +0000 (12:57 +1000)]
tests/eventscripts: Tweak an error message in a policy routing test

It currently has my home directory pasted into it.  That can't be
right...  ;-)

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5d6e71cf6e1e0665ec96e7e4e2cfd31f40ebabae)

8 years agotests - run_tests needs to expand directories like "." and "..".
Martin Schwenke [Mon, 16 Apr 2012 06:27:20 +0000 (16:27 +1000)]
tests - run_tests needs to expand directories like "." and "..".

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit fd08fc6c88cb80190ce87325867de0391cf1af51)

8 years agotests/eventscripts - Restructure according to new convention
Martin Schwenke [Mon, 16 Apr 2012 06:24:12 +0000 (16:24 +1000)]
tests/eventscripts - Restructure according to new convention

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit eb13507713ba6732271b7c3024bfddbda6da5ffc)

8 years agotests - run_tests ignores trailing '/' on directories
Martin Schwenke [Mon, 16 Apr 2012 05:58:44 +0000 (15:58 +1000)]
tests - run_tests ignores trailing '/' on directories

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit dbec696930327ff07b39282e3084eef4ded064c0)

8 years agotests/takeover - Restructure according to new convention
Martin Schwenke [Mon, 16 Apr 2012 05:53:24 +0000 (15:53 +1000)]
tests/takeover - Restructure according to new convention

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f94897ef9504c144937409688fa7a646e0b0ceae)

8 years agotests/onnode - Restructure according to new convention
Martin Schwenke [Mon, 16 Apr 2012 05:29:44 +0000 (15:29 +1000)]
tests/onnode - Restructure according to new convention

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4c87888b2a559c0d1f285919a42de450a537a02f)

8 years agotests/tool - Restructure according to new convention
Martin Schwenke [Mon, 16 Apr 2012 04:25:50 +0000 (14:25 +1000)]
tests/tool - Restructure according to new convention

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 89571585d87b391ff79647cd1f0f6ac193079e72)

8 years agotests/tool: New nodestatus test
Amitay Isaacs [Fri, 13 Apr 2012 02:06:53 +0000 (12:06 +1000)]
tests/tool: New nodestatus test

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit ca9e75eaea9c9b02bb44ca338e28fdae0c8d582c)

8 years agotests/tool: Fix the nodestatus test
Amitay Isaacs [Fri, 13 Apr 2012 02:05:59 +0000 (12:05 +1000)]
tests/tool: Fix the nodestatus test

Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a65ba7211ec7f102b32060b173606a61fb5c20a9)

8 years agotests - run_tests includes common.sh, uses die()
Martin Schwenke [Mon, 16 Apr 2012 04:54:51 +0000 (14:54 +1000)]
tests - run_tests includes common.sh, uses die()

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 21df43c74bfcff420fdaf9df5440c25529c543d2)

8 years agotests - run_tests can take a directory as an argument
Martin Schwenke [Mon, 16 Apr 2012 04:52:17 +0000 (14:52 +1000)]
tests - run_tests can take a directory as an argument

This makes it run all tests in the specified directory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 89719384a74161ffa0c03602ecdd9e758d521d75)

8 years agotests - add -v option to set TEST_VERBOSE=true
Martin Schwenke [Mon, 16 Apr 2012 04:51:22 +0000 (14:51 +1000)]
tests - add -v option to set TEST_VERBOSE=true

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 43badc5418b9f533398cd579607d9f1fc0f8f417)

8 years agotests - move functions only used by scripts/run_tests into that script
Martin Schwenke [Mon, 16 Apr 2012 04:48:49 +0000 (14:48 +1000)]
tests - move functions only used by scripts/run_tests into that script

Along with minor logic tweaks and removal of test_exit().

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 00713eb46cce638339845799bba2da041b3d02fb)

8 years agotests - add scripts/unit.sh
Martin Schwenke [Mon, 16 Apr 2012 04:33:37 +0000 (14:33 +1000)]
tests - add scripts/unit.sh

This will be sourced by all unit tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit afdaa5f032938d56ff315d9553cb285ebc413c4c)

8 years agotests - add scripts/common.sh
Martin Schwenke [Mon, 16 Apr 2012 04:32:55 +0000 (14:32 +1000)]
tests - add scripts/common.sh

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a7ad94fe9f2e773567dbb6500469dd2dd2f2f04b)

8 years agotests - export new variable TEST_SCRIPTS_DIR
Martin Schwenke [Mon, 16 Apr 2012 04:27:22 +0000 (14:27 +1000)]
tests - export new variable TEST_SCRIPTS_DIR

This replaces previous script-local variable ctdb_test_scripts_dir.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 107b465172205cb304549fcffaf36b9416696c15)

8 years agoTests - IP allocation - 2 tests for NODE_FLAGS_NOIPTAKEOVER
Martin Schwenke [Thu, 12 Apr 2012 05:18:17 +0000 (15:18 +1000)]
Tests - IP allocation - 2 tests for NODE_FLAGS_NOIPTAKEOVER

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit fa54a1095a7504863ed30bff8e0828a8be6dde55)

8 years agoTests - IP allocation - add another LCP2 test based on a test failure
Martin Schwenke [Thu, 12 Apr 2012 04:17:46 +0000 (14:17 +1000)]
Tests - IP allocation - add another LCP2 test based on a test failure

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 89e322562f25dcb8d84357a19e71b2272b2f29a8)

8 years agoTests - turn of time logging by default
Martin Schwenke [Thu, 29 Mar 2012 03:54:22 +0000 (14:54 +1100)]
Tests - turn of time logging by default

We haven't seen problems related to time jumps for a long time.  Turn
this off by default.

To switch it back on set $CTDB_TEST_TIME_LOGGING to any non-null
value.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2aa9bbf3a52dde0707eb06acd91e57c8da5c717f)

8 years agolib/tdb: Sync tdb from samba git tree
Amitay Isaacs [Fri, 13 Apr 2012 07:38:14 +0000 (17:38 +1000)]
lib/tdb: Sync tdb from samba git tree

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)

8 years agolib/tdb: Remove the files required to build tdb as a library
Amitay Isaacs [Fri, 13 Apr 2012 07:43:23 +0000 (17:43 +1000)]
lib/tdb: Remove the files required to build tdb as a library

Since tdb library will never be built from ctdb sources, we don't need the build
related files.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a7aace3d165e6cb7d63950107e584edaee12a357)

8 years agolib/talloc: Sync talloc from samba git tree
Amitay Isaacs [Thu, 12 Apr 2012 03:43:44 +0000 (13:43 +1000)]
lib/talloc: Sync talloc from samba git tree

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 670ebada4bafe79bd535c9bb5cc2d5d49d646af3)

8 years agolib/talloc: Remove the files required to build talloc as a library
Amitay Isaacs [Thu, 12 Apr 2012 04:06:58 +0000 (14:06 +1000)]
lib/talloc: Remove the files required to build talloc as a library

Since talloc library will never be built from ctdb sources, we don't need the
build related files.

(This used to be ctdb commit 2cd6a7ce648c1d2cc4d5580c3809858c100fa930)

8 years agolib/tevent: Sync tevent from samba git tree
Amitay Isaacs [Fri, 13 Apr 2012 07:18:53 +0000 (17:18 +1000)]
lib/tevent: Sync tevent from samba git tree

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 483459c79884891b3639a8bb865d5e8318cde98c)

8 years agolib/tevent: Remove the files required to build tevent as a library
Amitay Isaacs [Thu, 12 Apr 2012 04:25:45 +0000 (14:25 +1000)]
lib/tevent: Remove the files required to build tevent as a library

Since we are not going to build tevent library from ctdb source, remote build
related files.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit efbb7e0b9dcde547b46efd8e3b26c571e4fcf893)

8 years agolib/tevent: Remove local modifications to tevent
Amitay Isaacs [Fri, 13 Apr 2012 07:07:13 +0000 (17:07 +1000)]
lib/tevent: Remove local modifications to tevent

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit d1bc4a97ea649f5a07802178591688e438313ff8)

8 years agoctdb_test: Remove faked wrappers for tevent functions in stub testing
Amitay Isaacs [Fri, 13 Apr 2012 06:28:41 +0000 (16:28 +1000)]
ctdb_test: Remove faked wrappers for tevent functions in stub testing

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 74539cc619b17ea187e34b5866869212896b0c1a)

8 years agoRemove explicit include of lib/tevent/tevent.h.
Amitay Isaacs [Fri, 13 Apr 2012 06:47:28 +0000 (16:47 +1000)]
Remove explicit include of lib/tevent/tevent.h.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)

8 years agoincludes: Move special tevent defines from tevent.h to includes.h
Amitay Isaacs [Fri, 13 Apr 2012 06:46:38 +0000 (16:46 +1000)]
includes: Move special tevent defines from tevent.h to includes.h

This allows to build against system tevent library. Also include tevent header
along with other common headers.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 9ae4389c2c959c5dcd8395fdae2b25ed7e1e873a)

8 years agoctdbd: Fix spurious warnings when running with --nopublicipcheck
Amitay Isaacs [Wed, 4 Apr 2012 04:42:56 +0000 (14:42 +1000)]
ctdbd: Fix spurious warnings when running with --nopublicipcheck

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 67b909a0718d6cfce82ffce0830da3a6ff1f6c4b)

8 years agorecoverd: Fix spurious warnings when running with --nopublicipcheck
Amitay Isaacs [Wed, 4 Apr 2012 04:42:23 +0000 (14:42 +1000)]
recoverd: Fix spurious warnings when running with --nopublicipcheck

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 7f8096f56d8274151705ac822b582d972078f8fe)

8 years agotests: Use CTDB_TEST_REAL_CLUSTER to decide if tests use local daemons
Amitay Isaacs [Wed, 28 Mar 2012 03:08:08 +0000 (14:08 +1100)]
tests: Use CTDB_TEST_REAL_CLUSTER to decide if tests use local daemons

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit d5b2ad651495f32091bd33d30871638de0de633a)

8 years agotests: Set the debug level = 3 when running local tests
Amitay Isaacs [Wed, 28 Mar 2012 02:56:03 +0000 (13:56 +1100)]
tests: Set the debug level = 3 when running local tests

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit b86b947797c51e3576c6b34f547434c3f0aa36f3)

8 years agotests: Check assigned IPs from ctdb output
Amitay Isaacs [Wed, 28 Mar 2012 02:52:38 +0000 (13:52 +1100)]
tests: Check assigned IPs from ctdb output

This fixes the test ctdb_config_add_ip when running against local daemons.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit b81c2c8a2360001fe73f9fd9aa1ba32665fdb0bb)

8 years agotests: Check for assigned IP addresses only if we are on real cluster
Amitay Isaacs [Wed, 28 Mar 2012 02:51:25 +0000 (13:51 +1100)]
tests: Check for assigned IP addresses only if we are on real cluster

This fixes the ctdb_ip test when running against local daemons.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a108fc14d90b6d552736d19b0ea104f2508dc331)

8 years agoctdbd: Fix the error message string
Amitay Isaacs [Tue, 27 Mar 2012 06:20:34 +0000 (17:20 +1100)]
ctdbd: Fix the error message string

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 15f63ebab9686734f41a6adf38d4a7faa919ac66)

8 years agotests: Fix the error messages in test event script
Amitay Isaacs [Tue, 27 Mar 2012 06:07:52 +0000 (17:07 +1100)]
tests: Fix the error messages in test event script

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 706e6e3ef6765fbba29e531e590c48fe742b9914)

8 years agotests: Add regular expression parsing for hop_count_buckets
Amitay Isaacs [Tue, 27 Mar 2012 00:37:42 +0000 (11:37 +1100)]
tests: Add regular expression parsing for hop_count_buckets

This fixes the test to check ctdb statistics output.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 98c633ab4824e0e4d28ab2eb2532e16eb859bd94)

8 years agotests: Add a script to run cluster tests and make target "test_cluster"
Amitay Isaacs [Wed, 21 Mar 2012 00:51:56 +0000 (11:51 +1100)]
tests: Add a script to run cluster tests and make target "test_cluster"

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 420a10be89c62b4d605f3b972d78fd69dd9f5bb1)

8 years agotests: exportfs always outputs with options in brackets
Amitay Isaacs [Mon, 13 Feb 2012 03:03:12 +0000 (14:03 +1100)]
tests: exportfs always outputs with options in brackets

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit bdd8b8ab20169936fa723fa77cead1b76b6cd0b5)

8 years agotests/tool: New nodestatus test
Amitay Isaacs [Fri, 13 Apr 2012 02:06:53 +0000 (12:06 +1000)]
tests/tool: New nodestatus test

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 902d8a4709e7a269d2a75522a998f9a60ae13d78)

8 years agotests/tool: Fix the nodestatus test
Amitay Isaacs [Fri, 13 Apr 2012 02:05:59 +0000 (12:05 +1000)]
tests/tool: Fix the nodestatus test

Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 261258c1a4268230b2559bc5d8664b1197b22450)

8 years agoAdd test for NoIPTakeover
Ronnie Sahlberg [Thu, 12 Apr 2012 00:31:17 +0000 (10:31 +1000)]
Add test for NoIPTakeover

(This used to be ctdb commit 79172330d10ae0d5a7e5bf724959c9e5784716b4)

8 years agoCTDB: add back the "rebalanceip" command
Ronnie Sahlberg [Tue, 3 Apr 2012 03:43:21 +0000 (13:43 +1000)]
CTDB: add back the "rebalanceip" command

(This used to be ctdb commit 83aea6488002aa75dd25752fa0d164afb8b4f300)

8 years agobuild: Substitute POPT macros once and reuse variables
Amitay Isaacs [Fri, 30 Mar 2012 01:06:05 +0000 (12:06 +1100)]
build: Substitute POPT macros once and reuse variables

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a2ba2c4ec153c8844cf7f5b0de03b2269ec892f3)

8 years agorecovery: Add prototypes for tdb internal functions
Amitay Isaacs [Mon, 26 Mar 2012 23:53:25 +0000 (10:53 +1100)]
recovery: Add prototypes for tdb internal functions

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 98ac99c4a79fe2ee024890bb27c3ca68dc02d434)

8 years agobuild: Use system tdb library if available
Amitay Isaacs [Wed, 21 Mar 2012 03:45:56 +0000 (14:45 +1100)]
build: Use system tdb library if available

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 10ab88a5c822ac403a70a9cd1a6c81020eb91d08)

8 years agobuild: Use system tevent library if available
Amitay Isaacs [Wed, 21 Mar 2012 04:56:45 +0000 (15:56 +1100)]
build: Use system tevent library if available

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 2ade83de4e1f318c91489ec9a7f90d1b26f77e1b)

8 years agobuild: Use system talloc library if available
Amitay Isaacs [Wed, 21 Mar 2012 02:18:10 +0000 (13:18 +1100)]
build: Use system talloc library if available

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 94f1e02406c353c3a0235685acdd107ee5a7f285)

8 years agobuild: Display correct LIB_FLAGS while building
Amitay Isaacs [Wed, 21 Mar 2012 05:08:57 +0000 (16:08 +1100)]
build: Display correct LIB_FLAGS while building

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 0cbe7a4f92795203f022252a50a240b8bd4238c3)

8 years agobuild: Remove re-definition of same variable
Amitay Isaacs [Mon, 19 Mar 2012 22:22:54 +0000 (09:22 +1100)]
build: Remove re-definition of same variable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 36e690faab3d76919780c8550fe6d49fb6bbfba5)

8 years agopackaging: Setup directories for rpmbuild
Amitay Isaacs [Mon, 6 Feb 2012 05:45:50 +0000 (16:45 +1100)]
packaging: Setup directories for rpmbuild

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 45773dab630ee44b39df0dd4b50f43fb1e7bb0ba)

8 years agobuild: Add rules to create ctags/etags
Amitay Isaacs [Wed, 11 Jan 2012 08:04:39 +0000 (19:04 +1100)]
build: Add rules to create ctags/etags

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit a9e9444a7a78f5ef0e929a8dbd8ca0c68b40acd4)

8 years agoInitscript - add backup of corrupt non-persistent databases
Martin Schwenke [Wed, 28 Mar 2012 03:50:36 +0000 (14:50 +1100)]
Initscript - add backup of corrupt non-persistent databases

Corrupt non-persistent databases never get analysed because ctdbd
zeroes them at startup.

Modify the initscript so that corrupt non-persistent databases are
moved aside to a backup.  If the number of backups for a particular
database exceeds $CTDB_MAX_CORRUPT_DB_BACKUPS (default 10) then the
oldest excess backups are garbage collected.

Abstracts from and cleans up the code for checking persistent
databases.

Logging of related messages is done to syslog or a log file as
specified.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 00cd75595685dae829758abf1a4cb644af7ed50e)

8 years agoAdd policy routing documentation to ctdbd(1).
Martin Schwenke [Fri, 23 Mar 2012 03:31:31 +0000 (14:31 +1100)]
Add policy routing documentation to ctdbd(1).

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5cdeb0dd8827b13b06265c75dfac359bcd6ad10c)

8 years agoMerge remote branch 'martins/policy_routing'
Ronnie Sahlberg [Thu, 22 Mar 2012 04:39:59 +0000 (15:39 +1100)]
Merge remote branch 'martins/policy_routing'

(This used to be ctdb commit 7293762046e25a9c96e6417e34e18c214ebc6e55)

8 years agoUndo damage done by d8d37493478a26c5f1809a5f3df89ffd6e149281
Martin Schwenke [Thu, 22 Mar 2012 04:27:25 +0000 (15:27 +1100)]
Undo damage done by d8d37493478a26c5f1809a5f3df89ffd6e149281

The implementation of DisableIPFailover got intermingled with
--nopublicipcheck.  This just looks wrong - Ronnie must have been
having a bad day.  :-)

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5083b266dd68b292c4275505f3d1b878dbf12f11)

8 years agoTests - eventscripts - initial policy routing tests
Martin Schwenke [Tue, 20 Mar 2012 06:22:02 +0000 (17:22 +1100)]
Tests - eventscripts - initial policy routing tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7d7488a49bc7e799f39f3da3fa81be7a2e14480a)

8 years agoTests - eventscripts - new function simple_test_command()
Martin Schwenke [Tue, 20 Mar 2012 06:19:01 +0000 (17:19 +1100)]
Tests - eventscripts - new function simple_test_command()

Allows running arbitrary command and comparing output against
expected.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit da2e9650a97f99e7d694659926d9958927edd8ad)

8 years agoTests - eventscripts - change summary columns
Martin Schwenke [Tue, 20 Mar 2012 06:17:47 +0000 (17:17 +1100)]
Tests - eventscripts - change summary columns

To accommodate 13.per_ip-routing in output.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0142729c96b8bfecfabe35439071557bcc6ed4da)

8 years agoTests - eventscripts - rationalise CTDB fakery support
Martin Schwenke [Tue, 20 Mar 2012 06:15:33 +0000 (17:15 +1100)]
Tests - eventscripts - rationalise CTDB fakery support

Remove functions for marking nodes as down/up.  This is now done via
ctdb disable/enable in the stub.

Also more consistent temporary directory use.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1db9a533aacc6e02ddbadf76241429144a949e1c)

8 years agoTests - eventscripts - improved support functions for handling public IPs
Martin Schwenke [Tue, 20 Mar 2012 06:14:22 +0000 (17:14 +1100)]
Tests - eventscripts - improved support functions for handling public IPs

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 299ce89fb3deeefcc7c01b20197dc6adee1e8194)

8 years agoTests - eventscripts - add support functions for policy routing testing
Martin Schwenke [Tue, 20 Mar 2012 06:13:21 +0000 (17:13 +1100)]
Tests - eventscripts - add support functions for policy routing testing

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 79eec235ac9b051333751186c32924d92e6ebeff)

8 years agoUpdate .gitignore for eventscript testing fu.
Martin Schwenke [Tue, 20 Mar 2012 06:10:05 +0000 (17:10 +1100)]
Update .gitignore for eventscript testing fu.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0fc20ab5207d4f812bf62b90a66c707f76742f84)

8 years agoTests - eventscripts - fix hardcoding error
Martin Schwenke [Tue, 20 Mar 2012 06:06:51 +0000 (17:06 +1100)]
Tests - eventscripts - fix hardcoding error

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 9c30bf7fd3d94884e27a258571a28dca5e460177)

8 years agoTests - eventscripts - stub ctdb command updates
Martin Schwenke [Tue, 20 Mar 2012 06:00:50 +0000 (17:00 +1100)]
Tests - eventscripts - stub ctdb command updates

* Proper IP (re)allocation using ctdbd's IP allocation algorithm.
* Therefore, "ctdb ip" works sensibly.
* Add enable, disable, moveip.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6d4b4b1293ba960d8fdf81958d6e8dd23c9d771a)

8 years agoTests - eventscripts - more public IPs in default setup
Martin Schwenke [Tue, 20 Mar 2012 05:26:41 +0000 (16:26 +1100)]
Tests - eventscripts - more public IPs in default setup

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 38396185effbcf313678c2e94d4bd20f534c4f03)

8 years agoTests - eventscripts - add -A/-D options
Martin Schwenke [Tue, 20 Mar 2012 05:25:34 +0000 (16:25 +1100)]
Tests - eventscripts - add -A/-D options

Make it easier to spot differences between desired output and actual
output.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d132a8f4a8c0573ac447713a71911f02b6f0d73c)

8 years agoTests - eventscripts - ip stub command should print errors to stderr
Martin Schwenke [Tue, 20 Mar 2012 05:24:41 +0000 (16:24 +1100)]
Tests - eventscripts - ip stub command should print errors to stderr

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 236d572556e447e2d82d14d2c8a40ed8cb98944d)

8 years agoEventscripts - make 13.per_ip_routing fail gracefully if config is missing
Martin Schwenke [Tue, 20 Mar 2012 05:23:24 +0000 (16:23 +1100)]
Eventscripts - make 13.per_ip_routing fail gracefully if config is missing

Currently it spews out random messages about the file being missing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 351ca413eec460330571ca8b01ad269728fe15df)

8 years agoEventscripts - make 13.per_ip_routing try harder to find public_addresses
Martin Schwenke [Tue, 20 Mar 2012 05:21:09 +0000 (16:21 +1100)]
Eventscripts - make 13.per_ip_routing try harder to find public_addresses

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d4621277240721e6d130a930b0100506b64467ea)

8 years agoEventscripts - use set_proc() rather than accessing /proc directly
Martin Schwenke [Tue, 20 Mar 2012 05:20:10 +0000 (16:20 +1100)]
Eventscripts - use set_proc() rather than accessing /proc directly

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bdb4cdaf2aed79c8de6a8db8c01685b242808310)

8 years agoEventscripts - 13.per_ip_routing should use dirname not basename for mkdir
Martin Schwenke [Tue, 20 Mar 2012 05:18:49 +0000 (16:18 +1100)]
Eventscripts - 13.per_ip_routing should use dirname not basename for mkdir

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d034845ecea66b47004bc73f2554914a397b1c9d)

8 years agoEventscript tests - implement ip route in stub
Martin Schwenke [Thu, 15 Mar 2012 04:48:25 +0000 (15:48 +1100)]
Eventscript tests - implement ip route in stub

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ac2cd2a8cbed97348ceae54167ad83cb074ff6b3)

8 years agoEventscript tests - implement ip rule in stub
Martin Schwenke [Thu, 15 Mar 2012 02:22:51 +0000 (13:22 +1100)]
Eventscript tests - implement ip rule in stub

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 26292f362890ca6cb65d0028d50fa97458e0449f)

8 years agoEventscript tests - make ip command stub vaguely maintainable
Martin Schwenke [Wed, 14 Mar 2012 04:15:18 +0000 (15:15 +1100)]
Eventscript tests - make ip command stub vaguely maintainable

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8b8e17bea87a8c16f7c0f54fcfe29190f203f673)

8 years agoEventscript tests - make error message consistent with recent change
Martin Schwenke [Wed, 14 Mar 2012 04:14:04 +0000 (15:14 +1100)]
Eventscript tests - make error message consistent with recent change

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f4949b3c1b36949544e98c9fbb64447f94f9e432)