Ronnie Sahlberg [Thu, 11 Aug 2011 01:45:59 +0000 (11:45 +1000)]
When starting and stopping ctdb through the init-script, make sure we first clear all public ips bvefore we start the daemon, in case they are still hanging around since a previous kill -9 and also make sure we drop them after we have stopped the deamon when shutting down
CQ S1027550
Ronnie Sahlberg [Thu, 11 Aug 2011 00:07:50 +0000 (10:07 +1000)]
Add documentation for the new filesystem use monitoring
Ronnie Sahlberg [Thu, 11 Aug 2011 00:00:53 +0000 (10:00 +1000)]
Add new eventscript 40.fs_use that can be used to monitor file system use and flag a node unhealthy when they become full
Ronnie Sahlberg [Wed, 10 Aug 2011 23:11:38 +0000 (09:11 +1000)]
make the persistent even longer for lvs to make people even happier
Ronnie Sahlberg [Wed, 10 Aug 2011 21:14:57 +0000 (07:14 +1000)]
increase the persistent timeout to make people happier
Ronnie Sahlberg [Wed, 10 Aug 2011 21:13:28 +0000 (07:13 +1000)]
check the shares if they are available before we decide to try to restart nfs
CQ S1027529
Ronnie Sahlberg [Wed, 10 Aug 2011 05:36:20 +0000 (15:36 +1000)]
Merge remote branch 'martins/eventscript.00.ctdb'
Martin Schwenke [Wed, 10 Aug 2011 05:32:58 +0000 (15:32 +1000)]
Merge branch 'eventscript.20.multipathd' into eventscript.00.ctdb
Ronnie Sahlberg [Wed, 10 Aug 2011 05:32:24 +0000 (15:32 +1000)]
Merge remote branch 'martins/eventscript.20.multipathd'
Martin Schwenke [Wed, 10 Aug 2011 05:32:11 +0000 (15:32 +1000)]
Merge branch 'eventscript.62.cnfs' into eventscript.20.multipathd
Ronnie Sahlberg [Wed, 10 Aug 2011 05:31:56 +0000 (15:31 +1000)]
Merge remote branch 'martins/eventscript.62.cnfs'
Martin Schwenke [Wed, 10 Aug 2011 05:31:13 +0000 (15:31 +1000)]
Merge branch 'eventscript.13.per_ip_routing' into eventscript.62.cnfs
Ronnie Sahlberg [Wed, 10 Aug 2011 05:22:46 +0000 (15:22 +1000)]
Merge remote branch 'martins/eventscript.13.per_ip_routing'
Ronnie Sahlberg [Wed, 10 Aug 2011 05:18:16 +0000 (15:18 +1000)]
Merge remote branch 'martins/eventscript_tests'
Ronnie Sahlberg [Wed, 10 Aug 2011 05:15:12 +0000 (15:15 +1000)]
Merge remote branch 'martins/eventscripts_relative'
Ronnie Sahlberg [Wed, 10 Aug 2011 05:11:00 +0000 (15:11 +1000)]
Merge remote branch 'martins/test_suite'
Martin Schwenke [Wed, 15 Dec 2010 21:48:21 +0000 (08:48 +1100)]
Evenscripts: update 61.cnfs to use ctdb_setup_service_state_dir.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 15 Dec 2010 21:42:44 +0000 (08:42 +1100)]
Evenscripts: update 13.per_ip_routing to use ctdb_setup_service_state_dir.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 15 Dec 2010 21:45:28 +0000 (08:45 +1100)]
Evenscripts: update 20.multipathd to use ctdb_setup_service_state_dir.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 17 Dec 2010 05:23:31 +0000 (16:23 +1100)]
Eventscripts: fix dangerous rm -rf in 00.ctdb init event.
Also remove some unnecessary absolute paths for commands, which were
making the code slightly difficult to read.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 17 Dec 2010 05:21:53 +0000 (16:21 +1100)]
Eventscripts: 00.ctdb uses $service_state_dir, neaten update_config_from_tdb().
This also fixes a bug where update_config_from_tdb() used an incorrect
filename in one place.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 19 Nov 2010 03:32:28 +0000 (14:32 +1100)]
00.ctdb eventscript removes all files from $ctdb_active_dir.
Without this you can get into a situation where ctdbd can not start.
If the active file for a service exists but the service is not
running, then trying to stop the service may fail, causing the
eventscript to exit from ctdb_start_stop_service().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 07:29:49 +0000 (17:29 +1000)]
Scripts: add note about not using absolute command paths to README.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 05:19:34 +0000 (15:19 +1000)]
Add a README to the config/ subdirectory.
This includes a comment about using POSIX Bourne shell, including a
suggestion not to use "local" variables.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 14 Dec 2010 23:49:48 +0000 (10:49 +1100)]
Eventscript functions: new function ctdb_setup_service_state_dir().
To be used by eventscripts to create a per-service directory for their
own state data. $service_state_dir is set to point to the new
directory.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 14 Dec 2010 23:45:17 +0000 (10:45 +1100)]
Eventscript functions: new functions to remember/check if service managed.
This was done ad hoc and was badly named.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 9 Aug 2011 03:12:08 +0000 (13:12 +1000)]
Merge branch 'test_suite' into ronnie_target
Martin Schwenke [Tue, 9 Aug 2011 03:11:38 +0000 (13:11 +1000)]
Merge branch 'eventscript_tests' into ronnie_target
Martin Schwenke [Tue, 12 Oct 2010 05:49:42 +0000 (16:49 +1100)]
Test suite: print debug output after cluster (un)healthy flip-flop on restart.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 11 Feb 2011 04:13:37 +0000 (15:13 +1100)]
Allow proxy_node to be specified for wait_until_node_has_status().
Default to "any"... but allow specification because sometimes it
matters...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 11 Feb 2011 04:14:46 +0000 (15:14 +1100)]
Test suite: Fix consistency in 26_ctdb_config_check_error_on_unreachable.
The test currently waits until any node thinks that the test node is
disconnected, and then uses node 0 as a proxy for testing. However,
nodes may notice at different times that a node is disconnected, so
this test can fail unnecessarily.
We force the proxy node for the wait-until-disconnected to be the same
as the proxy node used to launch the actual tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 16 Feb 2011 20:03:19 +0000 (07:03 +1100)]
Test suite: Fix consistency in 09_ctdb_ping.sh.
Same problem as described in commit
283a85b42d9c0a26acb64d5abcc7f175e31e6e75.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 13 Apr 2011 06:22:02 +0000 (16:22 +1000)]
Test suite: Strip architecture suffix from CTDB RPM package version.
Later versions of RPM seem to include it but we don't want it.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 11 May 2011 05:14:16 +0000 (15:14 +1000)]
Test suite: remove getmonmode test.
This can't be made 100% reliable since the monitor mode can change
underneath us due to some event. Therefore, the test is useless.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Conflicts:
tests/simple/20_ctdb_getmonmode.sh
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 12 Oct 2010 04:10:43 +0000 (15:10 +1100)]
Test suite: Try much harder to get a healthy cluster when it is restarted.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 8 Aug 2011 06:11:14 +0000 (16:11 +1000)]
Tests - Disable the Samba and NFS eventscript tests.
They're broken and not worth fixing without infrastructure changes so
disable them by taking away the execute bit. This is somewhat easier
than trying to merge in all the other tests but not these ones.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 8 Aug 2011 05:53:28 +0000 (15:53 +1000)]
Tests - Tweak 10.interfaces 802.ad bonding test to work with current code.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 05:17:37 +0000 (15:17 +1000)]
Scripts: remove absolute paths from interface_modify.sh.
The "ip" command is currently run as "/sbin/ip". This makes it
impossible to replace with a stub in unit testing. The functions file
controls $PATH, so we don't need absolute paths.
This replaces the absolute paths...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 05:17:37 +0000 (15:17 +1000)]
Scripts: remove absolute paths from interface_modify.sh.
The "ip" command is currently run as "/sbin/ip". This makes it
impossible to replace with a stub in unit testing. The functions file
controls $PATH, so we don't need absolute paths.
This replaces the absolute paths...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 8 Aug 2011 05:44:30 +0000 (15:44 +1000)]
Eventscripts - Remove local variable usage in 10.interfaces.
POSIX sh doesn't have local variables. Debian's dash doesn't behave
the same way as bash on this contruct:
local var=`command that produces multiple words`
It only assigns the 1st word and may print an error.
Just remove the use of the "local" keyword in monitor_interfaces() to
solve this. It isn't actually limiting the scope of any variables
that are used outside the function.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 8 Aug 2011 05:42:45 +0000 (15:42 +1000)]
Tests - implement "ctdb -Y ip -v" in stub for eventscript testing.
This is pretty limited but it gets 10.interfaces tests working.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 8 Aug 2011 04:45:30 +0000 (14:45 +1000)]
Tests - stub ip program should assume interface name if "dev" not specified.
Currently it fails if you don't use the "dev" keyword.
This makes it behave as expected.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 05:06:10 +0000 (15:06 +1000)]
Eventscripts: source a file specified by $CTDB_RC_LOCAL in functions file.
Another unit testing hook. This is easier than dropping files into
rc.local.d/ and then removing them.
The file has to be executable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 5 Jul 2011 07:12:21 +0000 (17:12 +1000)]
Tests: update tests to work with previous commit.
Issues:
* 10.monitor no longer prints a message when there is no
public_addresses file.
* Extra bonding test added to check workaround for IEEE 802.3ad
Dynamic link aggregation bonding mode bug.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Thu, 7 Jul 2011 06:17:52 +0000 (16:17 +1000)]
Tests: eventscripts and onnode tests use stubs/ subdirectory instead of bin/.
This sets up a more useful convention and avoids future .gitignore
problems.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 5 Jul 2011 02:54:51 +0000 (12:54 +1000)]
Tests: tweak some samba tests to cope with debug from ctdb_check_tcp_ports().
This is a bit too static. However, it can fixed up later if it is a
hassle.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 5 Jul 2011 02:53:20 +0000 (12:53 +1000)]
Tests: Oops! Add bin directory for eventscript tests.
It was matched by .gitignore.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 07:30:45 +0000 (17:30 +1000)]
Git should ignore tests/eventscripts/var.x
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 07:29:13 +0000 (17:29 +1000)]
Tests: initial eventscript unit tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 8 Aug 2011 03:25:40 +0000 (13:25 +1000)]
Merge remote-tracking branch 'origin/master' into eventscripts_relative
Martin Schwenke [Tue, 14 Dec 2010 23:21:39 +0000 (10:21 +1100)]
Eventscript functions - use $CTDB_VARDIR instead of local $ctdb_spool_dir.
Signed-off-by: Martin Schwenke <martin@meltin.net>
David Disseldorp [Sun, 31 Jul 2011 01:14:54 +0000 (03:14 +0200)]
io: Make queue_io_read() safe for reentry
queue_io_read() may be reentered via the queue callback, recoverd is
particularly guilty of this.
queue_io_read() is not safe for reentry if more than one packet is
received and partial chunks follow - data read off the pipe on re-entry
is assumed to be the start-of-packet four byte length. This leads to a
wrongly aligned stream and the notorious "Invalid packet of length 0"
errors.
This change fixes queue_io_read() to be safe under reentry, only a
single packet is processed per call.
https://bugzilla.samba.org/show_bug.cgi?id=8319
Ronnie Sahlberg [Fri, 5 Aug 2011 00:03:34 +0000 (10:03 +1000)]
Remove a log message about setting linkstate for an unknown interface.
sometimes we do want to try to set the linkstate for interfaces that are not in use by public addresses right now (but posisbly by other mechanisms) and these messages just spam the logs
S1026357
Martin Schwenke [Thu, 4 Aug 2011 07:14:11 +0000 (17:14 +1000)]
Eventscripts - remove some more absolute paths to commands.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Ronnie Sahlberg [Thu, 4 Aug 2011 03:49:02 +0000 (13:49 +1000)]
remove log message we dont need
S1026492
Ronnie Sahlberg [Thu, 4 Aug 2011 03:47:52 +0000 (13:47 +1000)]
remove a non-error logmessage about persistent databases being healthy, as expected
S1026492
Ronnie Sahlberg [Thu, 4 Aug 2011 03:46:12 +0000 (13:46 +1000)]
remove a log message we dont need about "allow clients to attach to databases"
S1026492
Ronnie Sahlberg [Thu, 4 Aug 2011 03:44:25 +0000 (13:44 +1000)]
Change the message when we start the daemon to "CTDB starting on node"
S1026492
Martin Schwenke [Wed, 3 Aug 2011 10:12:48 +0000 (20:12 +1000)]
Eventscripts - Rework the use of get_proc() for the bonding checks.
Call call_proc(), put the output into a variable and then use it.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 05:16:32 +0000 (15:16 +1000)]
Eventscripts: update 60.nfs service() start to use set_proc().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 05:36:28 +0000 (15:36 +1000)]
Eventscripts: update 10.interface to use set_proc() and get_proc().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 04:58:13 +0000 (14:58 +1000)]
Eventscripts: use set_proc() in startstop_nfs().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 13 Apr 2011 02:08:09 +0000 (12:08 +1000)]
Eventscripts: remove unnecessary absolute paths from external commands.
For eventscript unit testing it will be necessary to override external
commands to allow stub implementations to be used. If absolute paths
aren't used then this can be done using either a fake bin/
subdirectory or by using shell functions.
This removes all of the simple cases of absolute paths.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Conflicts:
config/ctdb.init
config/events.d/50.samba
Keep old code but remove absolute paths.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 28 Jun 2011 04:54:33 +0000 (14:54 +1000)]
Eventscripts: new functions set_proc() and get_proc().
These provide a thin layer around writing and reading files in /proc.
They can be easily replaced by stubs for unit testing.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 11 May 2011 05:18:11 +0000 (15:18 +1000)]
Eventscripts: remove ctdb_wait_command() and ctdb_wait_tcp_ports() functions.
These haven't been used for a long time.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Ronnie Sahlberg [Wed, 3 Aug 2011 06:56:26 +0000 (16:56 +1000)]
Merge remote branch 'martins/test_suite'
Martin Schwenke [Tue, 28 Jun 2011 05:04:58 +0000 (15:04 +1000)]
Eventscripts: iptables() should put lock in $CTDB_VARDIR.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 1 Dec 2010 22:48:02 +0000 (09:48 +1100)]
Make Emacs recognise that the eventscript functions file is a shell script.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 7 Jun 2011 05:57:29 +0000 (15:57 +1000)]
Eventscript functions: add $CTDB_ETCDIR and hook service() functions.
* $CTDB_ETCDIR defaults to /etc but can be changed for testing. All
hard-coded instances of /etc have been changed to $CTDB_ETCDIR.
This includes references to /etc/init.d and /etc/sysconfig.
* service() and nice_service() functions now call new function
_service(). This makes it easier to override these functions (say,
in rc.local) for testing and call most of the existing functionality
using _service().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 14 Dec 2010 23:08:16 +0000 (10:08 +1100)]
Set $CTDB_VARDIR in the functions file.
This will be needed when eventscripts that use it are called
externally.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Ronnie Sahlberg [Wed, 3 Aug 2011 06:26:43 +0000 (16:26 +1000)]
Merge remote branch 'martins/onnode_tests'
Ronnie Sahlberg [Wed, 3 Aug 2011 06:25:46 +0000 (16:25 +1000)]
Merge remote branch 'martins/lcp2_sim'
Martin Schwenke [Tue, 28 Sep 2010 04:37:02 +0000 (14:37 +1000)]
Test suite: when the cluster flip-flops (un)healthy, using "ctdb status -Y".
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 24 Sep 2010 04:34:46 +0000 (14:34 +1000)]
Test suite: Print debug info from cluster nodes when time jumps occur.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Thu, 23 Sep 2010 05:01:01 +0000 (15:01 +1000)]
Test suite: Add debug for cluster (un)healthy flip-flop after restart.
We're seeing the cluster become healthy after a restart and then
revert to being unhealthy. It looks like there's a race and the
cluster shouldn't have been healthy, given that we seem to see that
the monitor cycle hasn't yet been run.
This collects some state debug info from all nodes after the cluster
becomes healthy. This is printed if the cluster is then unexpectedly
unhealthy a short time later.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 21 Sep 2010 03:34:22 +0000 (13:34 +1000)]
Test suite: add more debug to time jump post mortem.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Thu, 9 Sep 2010 07:21:11 +0000 (17:21 +1000)]
Test suite: add automated checking of time logs.
This depends on the format of onnode output and also depends on
simple/00_ctdb_onnode.sh having been run.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Thu, 9 Sep 2010 05:41:03 +0000 (15:41 +1000)]
Test suite: make time log use seconds since epoch.
Easier to implement automatic checking.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 31 Aug 2010 07:48:00 +0000 (17:48 +1000)]
Test suite: CTDB_SAMBA_SKIP_SHARE_CHECK test now uses _loadconfig().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 31 Aug 2010 07:44:05 +0000 (17:44 +1000)]
Test suite: CTDB_NFS_SKIP_SHARE_CHECK test now uses _loadconfig().
The manual replacement of loadconfig() had bit rotted and no longer
worked.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 31 Aug 2010 07:28:00 +0000 (17:28 +1000)]
Test suite: make time logging only happen on a real cluster, not local daemons.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 30 Aug 2010 04:23:29 +0000 (14:23 +1000)]
Test suite: add time logging.
We're seeing some weirdness with CTDB controls timing out. We're
wondering if time is jumping forward, so this creates a time log on
each node that we can examine later if tests fail weirdly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Thu, 7 Jul 2011 06:17:52 +0000 (16:17 +1000)]
Tests: eventscripts and onnode tests use stubs/ subdirectory instead of bin/.
This sets up a more useful convention and avoids future .gitignore
problems.
Resolved conflict while cherry-picking this:
Don't take the eventscripts files for this branch. We'll put them
elsewhere.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 7 Jun 2011 06:06:42 +0000 (16:06 +1000)]
Tests: run_tests script no longer prints filename in summary descriptions.
If filenames should be printed in descriptions in the summary then the
descriptions should include the filename. A better option is to
include something more human-readable that makes the test just as
easily identifiable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 7 Jun 2011 06:05:48 +0000 (16:05 +1000)]
Tests: onnode tests changed to use a simple define_test() function.
This makes global changes easier.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 25 May 2011 03:44:17 +0000 (13:44 +1000)]
Tests: add initial onnode tests
Add some simple tests for the onnode command. These use fake ssh and
ctdb commands that are added to $PATH. The infrastructure used is
quite flexible and would allow more complex tests to be written.
As-is, these tests expose some bugs in the an older version of onnode
that is included so it can be used to validate some of the tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Wed, 25 May 2011 03:39:11 +0000 (13:39 +1000)]
Tests: change output format of run_tests script and add -q option
Putting PASSED/FAILED on the left makes it easier to scan the results
and simplifies the code. Also put starts around the word "*FAILED*"
to make it more obvious.
Also add a -q option to throw away test output and only display the
summary (if -s is also specified).
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 23 May 2011 05:41:59 +0000 (15:41 +1000)]
Test suite: add a -d option to the run_tests script.
This causes summary lines (when used with -s) to be pretty printed and
include the test description. This is the 4th line of the test output
- that is, immediately after the header.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 5 Jul 2011 05:00:31 +0000 (15:00 +1000)]
ctdb natgwlist should return non-zero when there is no natgw.
This makes it 2, since this error corresponds loosely to ENOENT.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Ronnie Sahlberg [Tue, 2 Aug 2011 09:25:14 +0000 (19:25 +1000)]
make test: add two missing events to the special test eventscript
Martin Schwenke [Mon, 1 Aug 2011 03:37:06 +0000 (13:37 +1000)]
Eventscripts - 10.interfaces should not check orphaned interfaces.
If the last IP address on an interfaces is removed then that
interfaces should no longer be checked by 10.interfaces. However,
"ctdb ifaces" still lists such interfaces so they are currently
checked.
The problem really needs to be addressed in ctdbd but a neat quick
eventscript fix will be minimally invasive...
This changes the code to use "ctdb -Y ip -v" instead of "ctdb -Y
ifaces". The former includes details of all public addresses and
associated interfaces, so when an address is removed there is no
output for it. This avoids orphaned interfaces from being listed.
The logic is also slightly improved so that $IFACES includes just a
(non-uniquified) list of interfaces, allowing an existing loop to be
removed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Thu, 28 Jul 2011 02:09:39 +0000 (12:09 +1000)]
IP allocation simulation - Pad IPv4 addresses in LCP2 algorithm.
This makes IPv4 addresses comparable with IPv6 but reduces the overall
effectiveness of the algorithm. The alternative would be to treat
these addresses separately while trying to keep all the IPs in overall
balance... which is basically the problem that LCP2 solves. :-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 25 Jul 2011 01:10:09 +0000 (11:10 +1000)]
IP allocation simulation - make stats label for LCP2 imbalance more meaningful.
This time in the stats summary.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 25 Jul 2011 01:04:52 +0000 (11:04 +1000)]
IP allocation simulation - make stats label for LCP2 imbalance more meaningful.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 25 Jul 2011 01:00:43 +0000 (11:00 +1000)]
IP allocation simulation - add examples.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 22 Jul 2011 10:24:28 +0000 (20:24 +1000)]
IP allocation simulation - tighten up termination condition for -x.
When there are IP groups, do not terminate when the overall cluster
goes out of balance.
Also make explicit that grat_ip_moves is an integer not a boolean, so
only terminate if it is greater than 0.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 22 Jul 2011 10:21:46 +0000 (20:21 +1000)]
IP allocation simulation - fix documentation for diff() function.
It had out-of-date information and a typo.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 22 Jul 2011 10:20:05 +0000 (20:20 +1000)]
IP allocation simulation - add mean imbalance statistics.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 22 Jul 2011 10:15:53 +0000 (20:15 +1000)]
IP allocation simulation - add -A/--aggressive option.
This is likely to cause many more state changes for nodes. In this
mode the odds of a failover are applied to determine whether a state
change occurs for each node. If no state change occurs then the
process is repeated.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 22 Jul 2011 10:11:32 +0000 (20:11 +1000)]
IP allocation simulation - add LCP2 imbalance metric to node state output.
Print the LCP imbalance metric after the list of IPs.
To make this more sensible, but most of the printing logic into the
Node class.
Signed-off-by: Martin Schwenke <martin@meltin.net>