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 correct variable is $test_node_ips, not $ips.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8d17dacee415dd0b4268805a366a86f83e33f27c)
Sometimes "ctdb sync" doesn't do its job, so we end up with unassigned
IPs.
If $test_node isn't set then this is bad. However, try a few times to
ensure it is set.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2fd0157382b42aa5c5212b8e743c6f589edc6662)
Note the old $CTDB_TEST_REAL_CLUSTER - it doesn't exist anymore...
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 47180dc75d15f3d61470705603565b718491c9f8)
There's no point recalculating this value.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6e7bd9685406ae024d413a5d9d8c6e0d89b15567)
Instead of selecting the 1st pnn found, select the 1st one that isn't -1.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f02e501342112aab67aee95f253e29a670b29273)
If the record does not exist in persistent DB, RSN for that record is
considered 0. To write a record, RSN for that record should be set to 1,
otherwise the RSN check would fail.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit ac89da4eea98fa686408c5671a6c44c0fd1d7a58)
There were two issues with this test:
1. Since the messages are sent from one node to the next, if a node
does not register for messages before CTDB on that nodes receives
the message, it will never be seen by ctdb_fetch and it would
block on receive and would not send any messages to next node.
The crude solution is to sleep just before the messages are sent,
so that ctdb_fetch on all nodes have registered for the messages.
2. If ctdb_fetch stops sending messages after timelimit expiry, the
next node will keep waiting to receive messages in event_loop_once().
The default timeout is 30 seconds for event_loop_once(). Adding a
timed event will always set the timeout value to the time remaining
for the timed event to expire.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit bc55e09fdac9f743d6428bfe0be77840ad0fd1ba)
Commit 13acd58c41fba1a33894fbd654fed69ea0eac322 mades this test fail,
since lockd:b and lockd:bs were incorrectly producing the same output.
(This used to be ctdb commit fd3b73d7e634f16cbb99d7d5a548e12f00d1aadb)
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)
This allows, for example, the public addresses file used by a
particular daemon to be known.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f4b7d14f2e3c7345e7a09abb27c32923fb78cbc4)
This allows a node's public addresses file to be hacked for testing.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c7d6e4557d00de674737e2c8d6cbebaa2461c303)
If the -V option is given and no tests are supplied, the "cd" command
in run_tests.sh cause scripts/run_tests to interpret the argument to
-V incorrectly. Therefore, the wrapper scripts can't use "cd" because
they don't know what the options are doing!
Instead scripts/run_tests searches for each test relative to the
current directory and, if not previously found, then searches relative
to the top-level tests directory. This is a much better way of doing
things.
Given that run_tests.sh and run_cluster_tests.sh were starting to
contain duplicate complex logic, remove run_cluster_tests.sh and
replace it with a symlink to run_tests.sh. Run_tests.sh checks $0 to
see what options/defaults to use. Update INSTALL to deal with this.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ed2db1f4e8d2b222d7f912a4a007ce48a23e83b0)
However, options must be followed by "--".
This also fixes:
* a bug where specifying tests caused local daemons to be used; and
* an incorrect comment.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6b8507d4d3062e709409b3790117d87311b3460d)
However, options must be followed by "--".
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit db8cf8f5e644a0b21a6040287887fee40f38d4db)
The previous commit 55006ea8999ab3721fcde81b92692661065f0688
highlighted an error in this test.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 9f20fbf91706db94f65f62dbd6a4e087890c1da9)
The policy routing tests write the configuration file into $CTDB_BASE,
as per rcommended practice. Unless this is in $TEST_VAR_DIR this
won't work sensible when the tests are installed.
Things are done slightly different than for /etc. Here we use
symlinks and we want them to be dereferenced.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 61c80f58a8cfbaca7e669ef8cd95b4f6b5dc66c7)
Wrap all creation of child processes inside ctdb_fork() which is used to track all processes we have spawned.
Capture SIGCHLD to track also which child processes have terminated.
Wrap kill() inside ctdb_kill() and make sure that we never send a !0 signal to a child process pid that has already terminated (and might have been replaced with a
(This used to be ctdb commit f73a4b1495830bcdd094a93732a89dd53b3c2f78)
The policy routing tests modify /etc/iproute2/rt_tables, so this
directory should not be in the installation area.
Instead the contents of tests/eventscripts/etc are copied into a place
under $TEST_VAR_DIR where the directory can be modified with gay
abandon.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a0afb4195caab39891a304b8b4eadd94cab7c4a7)
The link is hard to manage and has no real advantage.
The canned config is 2 of the 3 currently non-comment/whitespace lines
in config/ctdb.sysconfig.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 66d0b913301c3b1037278bcaa0452ecbe07248df)
No use depending on defaults in the initscript - the tests should
control what is tested.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1c37abac5fd18c139aa55989d0fb6b475f4c22f1)
Could add -r but that might avoid error. The only time it doesn't
exist is the 1st time a top-level var directory is used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 047d97dc84a5943556efb31bb2856fd04835fffa)
If it can't, the installation is probably inconsistent, so a
(hopefully) helpful message is printed. :-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit df732ca8e27f0f3417b4d5d259157bd0e0632124)
This could all be done in Makefile.in, but that would be very complex.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 12c9986059cacda819e669fa77d613b408c62599)
Only shuts them down if $TEST_CLEANUP is true.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit eddfc02335202d853e29a89f08225ab44cac8a25)
Sets TEST_CLEANUP=true and causes $TEST_VAR_DIR to be removed... and
potentially other cleanup actions in testcases.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3219f221a858e499f084b8beb44610537312602b)
No need for a default, especially since there is no sane default!
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b430a5f61cfdc28e967890602ce6dac0e922c07d)
This directory is already guaranteed to be absolute, so no check is
needed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 78f6f209eb15102f4e8baa9106583df0ef4bb693)
There are 2 subtleties:
* Local daemons currently use the in-tree tests/events.d/ subdirectory
for their eventscripts. However, some tests install/remove test-specific
eventscripts so now $TEST_VAR_DIR/events.d/ is used and the standard
eventscripts are copied there at setup time.
* The pgrep/pkill logic for killing local daemons currently relies on
ctdbd being run with a full path to tests/bin/ctdbd. If the tests
are installed and run against an installed daemon then this won't
work. Therefore, ctdbd is now expected to be in $PATH and is
found/killed by matching:
ctdbd --socket=.* --nlist .* --nopublicipcheck
This is complex but should avoid killing a real ctdbd running on a
node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 301491802eec0e49e108f5aae7d7be379703d72c)
Part of preparation to be able to install the tests. The current var/
subdirectories will end up somewhere in /usr/local/ or /usr/ and we
don't want to put temporary files there.
This creates a temporary TEST_VAR_DIR by default.
If -V is specified then the given directory will be used as
TEST_VAR_DIR. This allows the current behaviour where individual
integration tests can be run against already-running daemons 9with
sockets and other stuff already created) to save time and trouble.
Yes, there are plans for a clean-up option... ;-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8e4ec9a40bb7d392d7474b067a74fa121c069007)
This is unused and can't be used with the current test infrastructure.
It may have been useful with ctdb_test_env but I don't think it was
ever used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4aa879466dd46cb4e8710edbbaac1276521e475b)
tdbdump may not be installed and would be an unnecessary dependency.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit fbabc05569d91bf033f474d89f51b49490943332)
Hardcoding "sh -x" is suboptimal because some scripts, like onnode,
require bash.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 246809af64c03d26288abff5907ed46614e72b15)
* 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)