| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Refactor the NFS test setup/cleanup code into new common functions.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 29e98017221326bdc9b1c4f7c05b3b495c1de29b)
|
|
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit b849fb4923d6a34141fe19006a974de81508ceda)
|
|
|
|
|
|
|
|
| |
It doesn't set $h at all...
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3f268805c14c51f23024267916eae161bada8a0e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d2514051761ba23deee0e118c25afab2ab8d854e)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bef03b32f8ec114a64c55b25951aeeb939d87b33)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)
|
|
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit bdd8b8ab20169936fa723fa77cead1b76b6cd0b5)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a63e603cb7e21a7334c6a07bc4415ff089dab3c1)
|
|
|
|
|
|
|
|
| |
... on Debian system and derivated.
(ctdb_diagnostics still hardcodes /etc/sysconfig/)
(This used to be ctdb commit 1341329f6125d491b82c873f793af819e677f714)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 651e6703b6dc4d11ba7d6d0b44d3be1f485a0f75)
|
|
|
|
|
|
|
|
|
| |
The manual replacement of loadconfig() had bit rotted and no longer
worked.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bf23e7166385d305c6860b37c120f70a9aa33aa5)
|
|
|
|
|
|
|
|
| |
Use onnode any where possible rather than a fixed node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 51561720d2b4db5b307da3d410661075e2a6c3ca)
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now kill ctdbd on the test node instead of disabling it. This
ensures that the only tickles we see will come from the takeover node.
We also sleep for TickleUpdateInterval before checking for asking ctdb
about the tickles.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 48cd8325c070f6942aa13a25269021e4c8ed188f)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c32ffd203e42a39010ce2d6e98253e8e48de515a)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c35d3e6341bc4e288393efa429b68bf6568b9b11)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4763ccbfeaedd0fd953dbeda17ef9af41386688b)
|
|
|
|
|
|
|
|
|
|
| |
The test depended on the exit code of "ctdb gettickles", which always
succeeds. This change wraps the command in a function that checks
whether the tickle we're interested in is registered.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c4b05a731e1bee8f5b46529773a4f5389b2b6064)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NFS test sleeps for MonitorInterval to give CTDB time to record an
NFS tickle. However, this isn't always long enough. This changes the
test to wait until a monitor event has actually occurred.
The CIFS test assumes that Samba is able to register a tickle with
CTDB before it notices that netstat has registered the tickle and can
use onnode to ask CTDB about it. That is an incorrect assumption -
sometimes we can get to the point of asking CTDB about the tickle
before Samba and CTDB have processed it. This adds a timeout loop
that makes the CIFS test wait until the tickle has been registered or
fail after 10 seconds.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 20a9d35933d89dc7eb710075f360686a49d78609)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timeout for waiting for state changes isn't very predictable. It
is "about" MonitorInterval seconds... but can be longer given the
duration of eventscript runs and other things. So, we change the
timeout to MonitorInterval + EventScriptTimeout, hoping it never takes
that long.
Move the eventscript installation/removal from the old fake-tests into
a function in the functions file. Implement supporting functions to
create/remove/check-for various files that it handles. Also add a
function that uses all of this that waits for the next monitor event
(but only if all other monitor events pass).
The final check in the skip share check tests uses the above and waits
for a monitor event, and then checks that the node is still healthy.
Also enhance the wait_until function to handle a command starting with
'!' (as a separate word) to make it easy to wait for a file not to
exist.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 25e82a8a667a54c6921ef076c63fdd738dd75d19)
|
|
|
|
|
|
|
|
|
|
| |
Monitor events sometimes happen a little bit more than MonitorInterval
seconds apart. This changes some timeouts to MonitorInterval + 1
seconds.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6ef4364b3349145b2fec23e0431cd6df6dcadd41)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f50d64a8ac91415ca297216d2103ff940076f02b)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 31216fd48117526c943e42d137ce24ef89fa0009)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit cd65d8acb97aa9f83ff0d0585bf09caef2d2f3eb)
|
|
|
|
|
|
|
|
|
|
| |
In complex/31_nfs_tickle.sh we run sed against a file that might not
exist, causing potential garbage from stderr in the output. Check
that the file exists before running sed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f9b71757f034732647228d4b8a8f00528028b6b0)
|
|
|
|
|
|
|
|
|
|
| |
Add a -v so we see the output of the command that tries to get the
value of NFS_TICKLE_SHARED_DIRECTORY. That way we can tell if a value
was retrived OK or if we're using the default.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c53353c6402f378f29200313d82f1f9262d628b1)
|
|
|
|
|
|
|
|
|
|
| |
Rather than hardcoding the location of the shared tickle directory,
attempt to use the value of NFS_TICKLE_SHARED_DIRECTORY from
/etc/sysconfig/nfs on node 0.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 878437a909ea44dfc3635f082e34741ee256e505)
|
|
|
|
|
|
|
|
|
|
| |
This failed when node 0 had no public IPs because we would always run
"ctdb gettickles" on node. We now ask node 0 for the tickles on the
test node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8fcc4610de926f44e18ec85fb57ca5f7d3c28bd6)
|
|
|
|
|
|
| |
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b7787255391eddef8458f81ff9b75d9116e2afd3)
|
|
|
|
|
|
|
|
|
|
|
| |
Something, perhaps root_squash, causing permission denied on the test
file after we copy it over with scp. This sets the initial
permissions to be friendly and adds -p to the scp command to maintain
those friendly permissions.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 52f21f5a92eb14df7540a2ae9e212d936e646c06)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 2 new tests for NFS failover.
* Factor repeated code from tests into new functions
select_test_node_and_ips(), gratarp_sniff_start() and
gratarp_sniff_wait_show(). Use these new functions in existing and
new tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit de0b58e18fcc0f90075fca74077ab62ae8dab5da)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cluster_is_healthy() is now run locally in tests and internally causes
_cluster_is_healthy() to be run on node 0. When it detects that the
cluster is unhealthy and $ctdb_test_restart_scheduled is not true,
debug information is printed. This replaces the previous use of
$CTDB_TEST_CLEANING_UP.
To avoid spurious debug on expected restarts, added scheduled
restarts to several tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ee7caae3a55a64fb50cd28fa2fd4663c5dd83b4f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
3 separate tests:
* Check that gratuitous ARPs are received and take effect.
* Check that ping still works after failover.
* Check, via SSH, that the hostname changes after failover.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 92011cc05bbdb517ec6a4573f5cb9f6f21c3059e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Removed a race from tpcdump_start(). It seems impossible to tell
when tcpdump is actually ready to capture packets. So this function
now generates some dummy ping packets and waits until it sees them
in the output file.
* tcpdump_start() sets $tcpdump_filter. This is the default filter
for tcpdump_wait() and tcpdump_show(), but other filters may be
passed to those functions.
* New functions tcptickle_sniff_start() and
tcptickle_sniff_wait_show() handle capturing TCP tickle packets.
These are used by complex/31_nfs_tickle.sh and
complex/32_cifs_tickle.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8e2a89935a969340bfead8ed040d74703947cb81)
|
|
New tests/complex/ subdirectory contains 2 new tests to ensure that
NFS and CIFS connections are tracked by CTDB and that tickle resets
are sent when a node is disabled.
Changes to ctdb_test_functions.bash to support these tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 31cc46eb157ca1301312f14879e4fb4da7d81088)
|