IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The debug code should run "ctdb status" on a cluster node, not on the
test client.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 448cd8db1305c1e6dfab323f92eac4a576596e4e)
The parser for the output of the ctdb_fetch program
did not match the output that ctdb_fetch generates.
It seemed to rather come from the ctdb_bench test...
This patch adapts the parser to correctly interpret
the output of ctdb_fetch.
Michael
(This used to be ctdb commit 836b95f32724cf37e4f643f20653f78842613692)
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)
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)
Add a "stopped" case to log events and stop the event script from
failing with an unknown event.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7f67f7395e2233f0bba2e9662404aad49e13f645)
The parsing of "ctdb status -Y" output to determine various node
states was implemented very strictly. Therefore, the parsing broke
due to the addition of the new "stopped" state to the output of "ctdb
status -Y". This relaxes the parsing so that it should work for
versions prior to the introduction of the "stopped" state, as well as
future versions that add new states to the end of the list of bits in
output of "ctdb status -Y".
Similarly the check for cluster unhealthy (in _cluster_is_healthy())
now just checks for a single 1 in any bit in the "ctdb status -Y"
output, rather than checking for a particular number of 0s.
New tests
tests/simple/{41_ctdb_stop.sh,42_ctdb_continue.sh,43_stop_recmaster_yield.sh}
do rudimentary testing of the stop and continue functions.
Remove tests tests/simple/41_ctdb_ban.sh and
tests/simple/42_ctdb_unban.sh. They were both unreliable.
tests/simple/21_ctdb_disablemonitor.sh now schedules a restart, since
one will be required.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 67c5bfb5f02c9d45a32d976021ede4fb2174dfe9)
The debug code should run "ctdb status" on a cluster node, not on the
test client.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 34e6f8a04b12f8879eb42d417f9741502ccccf0f)
* 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)
This works around potential race conditions in the init script where
the restart operation is not necessarily reliable. It just wraps the
actual restart in a loop and tries for a successful restart up to 5
times.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1cac8a0ad429f29d1508158c7f7c42a2f1a22945)
If wait_until() does not timeout, print the time taken for the command
to succeed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bdb856ee22816ae1f6b8d15856555f488054f489)
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)
There are still very rare cases where IPs haven't been reallocated
before the beginning of the next test, so this adds a sleep and an
extra call to "ctdb recover" to restart_ctdb().
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c2bdb77d91761c003e2f0e6918a27c54150f6030)
Sometimes "stty size" reports 0, for example when running in a shell
under Emacs. In this case, we just change it to 80.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e309cb3f95efcf6cff7d7c19713d7b161a138383)
* ctdb_restart_when_done() now schedules a restart by setting an
explicit variable that is respected in ctdb_test_exit(), rather than
adding a restart to $ctdb_test_exit_hook. This means that restarts
are all done in one place.
* ctdb_test_exit() turns off "set -e" to make sure that all cleanup
happens.
* ctdb_test_exit() now prints a clear message indicating where the
test ends and the cleanup begins. This message also includes the
return code of the test.
* Add debug in cluster_is_healthy to try to capture information about
unexpected unhealthiness when a test starts.
* Simplify simple/07_ctdb_process_exists.sh so that the exit code is
generated more obviously.
* Remove redundant calls to ctdb_test_exit at the end of tests, since
they're done automatically via a trap. Also remove any preceding
warnings of restarts or final hints about test success/failure.
* Allow multi-digit debug levels in simple/12_ctdb_getdebug.sh and
simple/13_ctdb_setdebug.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b6fa044a1364cbb3008085041453ee4885f7ced1)
Glitches during restarts of the CTDB cluster have been causing some
tests to fail. This is because restarts are initiated in the body of
many tests. This adds a simple function ctdb_restart_when_done, which
schedules a restart using an existing hook in the test exit code.
This function is now used in tests that need to restart CTDB.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d440e83bb4f0c19c085915d0f0e87cc0dabbc569)
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)
Limit the allowable difference in message counts in either direction
around the ring to 5% (up from 2%). There is something environmental
making this blow out to 3% very occasionally when there's no obvious
problem with ctdb.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d6e6909ac629212b3028e13b958e1a17c64bee8c)
negative. ctdb_bench.c checks to ensure the timer has advanced from 0
before dividing.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 723413f246399b25166462d2018237920515655f)
simple/12_ctdb_getdebug.sh now recognises output with multi-digit node
numbers.
Sharing the ctdb directory via NFS and testing on a real cluster by
setting CTDB_TEST_REAL_CLUSTER didn't work by default. The fix is to
hack scripts/test_wrap so that it tries to find a valid bin directory
next to the directory containing it is in.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ea2ca769e1d1068fbbad843750b19acfd87360e0)
looping forever on older versions of CTDB.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 03dfcf9f284c9926479a8dd4e5acf1f5d2b964aa)
tests/TODO. Remove tests/start_daemons.sh - no longer used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5cdbef46b74e6a5ba2383ef025e69fe605fa4f6e)
directory to $PATH if local daemons are being used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a497010f67d6a8e68f4d6d7e516b88d2261b1062)
run from the tests subdirectory... and most other sensible places.
Rename $CTDB_TEST_REMOTE_SCRIPTS_DIR to $CTDB_TEST_REMOTE_DIR since it
is now intented that this directory can contain test binaries too.
daemons_start() now passes a full path to the events.d directory when
starting ctdbd. Also fixed the path to ctdbd. 41_ctdb_ban.sh and
42_ctdb_unban.sh fail immediately if they fail to select a test node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3ecce31d3a3f72b9fa851ac99291865c119e551e)
replace them with new simple tests (52_ctdb_fetch.sh,
53_ctdb_transaction.sh, 61_ctdb_persistent_safe.sh,
62_ctdb_persistent_unsafe.sh). Remove "_simple" from some test
filenames in the simple subdirectory - that's redundant. Always run
ctdb as $CTDB to allow $VALGRIND magic to be used. Use pgrep/pkill to
detect/kill local daemons so those running under valgrind can be found
too - to support this, always run local daemons with the full path to
the executable. run_tests now supports -s option to print sumamry
when done - with more and more tests, it is getting hard to follow
progress. Sort the output of commands in 06_ctdb_getpid.sh to make
sure they compare nicely and also allow the processes' executables to
be called "memcheck" to catch those running under valgrind. Remove
redundant calls to onnode in commands run from calls
try_command_on_node in some tests. 41_ctdb_ban.sh and
42_ctdb_unban.sh avoid banning the recmaster, since this causes the
recmaster to be reassigned and all nodes to be unbanned. Minor
cleanups.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 33cdf3e4bcfadf8e20822ca352babf7acca16821)
public_addresses files - these are now created in tests/var as needed.
09_ctdb_ping.sh now recognises new "node disconnected" message.
Replace custom recovery detection code (which could not have been
working) with a call to "ctdb recover" in 32_ctdb_enable_simple.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 486ed3b5b483f1c12c2d978ec6564bd33a2c6aee)
Function try_command_on_node node passes any options other than -v to
onnode. Minor update to 14_ctdb_statistics.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e627f8e5fe8e2e3ea423b7dbd12d74597fb4983b)