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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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)
26_ctdb_config_check_error_on_unreachable_ctdb.sh to work with new
generic error message when trying to talk to disconnected node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 33afe9bae732e62994e5957ee143a9c49571898b)
something vaguely useful. ctdb_test_exit unsets $ctdb_test_exit_hook.
Fix bug in 17_ctdb_config_delete_ip.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f90f6e19952d58b8590fe550ecf2308bd9b065dc)
$CTDB_TEST_REAL_CLUSTER is not set. After a ctdb restart, force a
recovery to attempt to help tests that follows.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 497c40f69e06776861a780500da1952eb7ea8fc1)
setup of local daemons so that it correctly assigns no public IPs to a
single node each time. Separate out daemon_setup so that the
selection of the node with no public IPs is only done once at the
beginning of testing. Clean up all current tests, mostly with a view
to ensuring that a node selected for testing some kind of failover
actually has public addresses assigned. Reenabled 01_ctdb_version.sh
- it now passes if rpm doesn't do anything useful on the node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 86807e8b7b179cbe87e559fb3b1f02c8b1990dc4)
sleeps from ban/unban tests. Now expect "ctdb ping" to return false
if it fails, so made relevant change to 09_ctdb_ping.sh. New
functions install_eventscript and uninstall_eventscript. New
setup/cleanup tests 00_ctdb_install_eventscript.sh and
99_ctdb_uninstall_eventscript.sh. New test 21_ctdb_disablemonitor.sh,
which is incredibly complex.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 23bffef2295772f5b795236d60b7fb6ea754b7fb)
them, randomly pick a single node that will not have any public IPs
assigned. This will make life a bit more interesting and will
simulate what happens on real clusters with a management node. Some
tests were disabling a node to implicitly trigger a ctdb restart - now
use an explicit restart of ctdb when it is required.
17_ctdb_config_delete_ip.sh now randomly chooses a public IP on any
node to disable - this works around a problem where the hardcoded node
might not have any public addresses.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3d59783c0e9478f4766c380945d6200fc654f5d9)
support checking the monitoring mode.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4e1c079deb0aafb99d4114bb6504ff5ba1cbdeb4)
if the shell exits and ctdb_test_exit cancels this trap. This means
that a testcase executing under set -e will call ctdb_test_exit on
failure, allowing the cluster to be restarted if necessary so that
following tests can complete successfully. ctdb_test_exit now
respects $?, so a test will fail if the last thing executed before
ctdb_test_exit failed - this probably means the above trap was
triggered.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 805a426aaee5ecfc5bd1c097069fe58f8241dfe2)
$TEST_WRAP to $CTDB_TEST_WRAPPER - value now set using
$CTDB_TEST_REMOTE_SCRIPTS_DIR if that is set.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a69545d7dec78eefb85a1598e5db4667cc210bf9)
frozen/unfrozen via ctdb statistics command.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e040a989096cf7d5c0cdece1713ff903cb7568f8)
file soon. Simplify 06_ctdb_getpid.sh by using -v option to
try_command_on_node.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c6fc68db9061547e73ec2b811e260bd7da7f58fa)
processing to all tests. New script ctdb_test_env sets up environment
for tests, is now sourced by run_tests, and can also take a test on
the command-line, complete with options. Various cleanups and
improvements. Document tests that have been properly implemented in
ctdbd.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 826e85fe5291067b8d0b9c22918d63024aa6141c)
Move setting of $CTDB_NODES_SOCKETS to tests/scripts/run_tests and
make it only happen if $CTDB_TEST_REAL_CLUSTER is not set. Bugfix in
function ips_are_on_nodeglob. New/proper implementations of functions
stop_daemons and start_daemons, now called by function restart_ctdb.
In start_daemons.sh, add public addresses file generation/usage, use
new option --nopublicipcheck to ctdbd to avoid crazy behaviour and
kill ctdbd more carefully to avoid killing real daemons on a real
cluster - this should be able to coexist on a node of a real cluster.
start_daemons.sh is temporarily incompatible with start_daemons
function, but expecting to replace that script with function calls
very soon anyway...
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 4c54772c5c2fa7d2a25963379b5b96caf0c2521c)
add support to send ipv6 "gratious arp" aka neighbor solicitation packets from ctdb
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
(This used to be ctdb commit 0a38ea11af9237501f2951fee698a59b46f8750d)
ctdb_attach() so that we can pass TDB_NOSYNC when we attach to
a persistent database and want fast unsafe writes instead of
slow but safe tdb_transaction writes.
enhance the ctdb_persistent test suite to test both safe and unsafe writes
(This used to be ctdb commit 4948574f5a290434f3edd0c052cf13f3645deec4)
use the timelimit argument to the persistent writer to run the test for
30 seconds by default
(This used to be ctdb commit 181318fea6886c40d0aff02d0de777f28ffeddce)
so that we have n persistent writers on n nodes,
all writers writing persistently to the same record.
each writer on a node has its own "counter" in this record that is incremented by one in each iteration.
the persistent writer on node 0 also checks that all the counters in the record are increasing monotonically and if they are not, flagging it as an ERROR.
(This used to be ctdb commit 00006222ece63ae3b7f3477646232ae5bbeee6f4)
delete all persistent databases when the test starts
(the tests only uses test databases in a special test directory)
do not set up any public addresses in the tests
wait until there are no disconnected or unhealthy nodes when starting the
test daemons instead of waiting for the recovery mode to change.
we do want to wait until the system has recovered and ALL nodes are ok.
(This used to be ctdb commit dfe0c44c1e8e9dab790686c5ba798986d04bf218)
set the node initially unhealthy and let the status monitoring bring the node online.
This fixes a problem with winbindd, where it refused to start because secrets.tdb was not populated
but we could not populate ctdbd, because the net command would not run while ctdbd was still doing startup
and thus frozen
(This used to be ctdb commit 3a001b793dd76fb96addf1e2ccb74da326fbcfbc)
struct so that if we timeout a control we can print debug info such as
what opcode failed and to which node
we dont need the *status parameter to ctdb_client_control_state
create async versions of the getrecmaster control
pass a memory context to getrecmaster
(This used to be ctdb commit 558b680c82f830fba82c283c78c2de8a0b150b75)
we store in the tree and use a node destructor so that when the data is
talloc_free()d we also remove the node from the tree.
(This used to be ctdb commit b8dabd1811ebd85ee031563e95085f720a2fa04d)
the data of the tree.
this callback makes it more convenient to manage cases where one might
want to insert multiple entries into the tree with the same key
rename the tree->tree pointer to tree->root since this is supposed to
point to the root of the tree
add a small test utility
(This used to be ctdb commit f6313bed9c53e0d1c36c9e08ac707e88e2a4fcd5)
- added DatabaseHashSize tunable
- added logging of events inside recovery (for timing)
(This used to be ctdb commit 3593cdb928b91e217faf1b3c537fa28dc82cdace)
records in the test database.
the tool first creates the number of records requested, then it will
loop infinitely reading the records out again.
(This used to be ctdb commit dca2497097a9cdff268b1e5d446f6feb71bfb389)
to start a recovery session. The node is banned from the cluster for the RecoveryBanPeriod (default of 5 minutes)
(This used to be ctdb commit 4ad43dd07f526b6002477177fbf55483246c2c0c)
- use -n to specify node number in ctdb utility
- change 'ctdb status' to 'ctdb statistics'
- added 'ctdb status' which shows status
- added netmask to public IPs, so you don't try a takeover on a
foreign network
- cleaned up tools/ctdb_control.c a lot
- generate usage message at runtime
(This used to be ctdb commit 28de71c03ace7d32a9fd9882fabbd5d668b97656)
update the recovery test script to start all ctdb daemons with a
recovery daemon
(This used to be ctdb commit 47794e16df285cacefc30208d892d931a6e46b96)
ctdb_ctrl_ calls are timedout due to nodes arriving or leaving the
cluster it crashes the recovery daemon afterwards with a SEGV but no
useful stack backtrace
(This used to be ctdb commit cd3abc7349e86555ccd87cd47a1dcc2adad2f46c)
start the daemons with explicit socketnames and explicit ip address/port
remove all --socket= from all ctdb_control calls since they are not
needed anymore
(This used to be ctdb commit 593a959d428f5b4a913117a9b5c8fe65a3eb950e)
of traversing the full cluster.
this makes it easier to debug recovery
update the test script for recovery to reflect the newish signatures to
ctdb_control
the catdb control does still segfault however when there are missing
nodes in the cluster as there are toward the end of the recovery test
(This used to be ctdb commit 8de2a97c14a444f817ceb36461314f10c9601ecc)
this program is a client to the local ctdb daemon
every second it pulls all vnnmap and nodemaps from all nodes that are
available and checks if a recovery is required
a recovery is required if :
* all nodes do NOT have an identical vnnmap and generation
* all nodes do NOT have an identical nodemap
* there are active nodes that are NOT in the nodemap
* there are nodes in the nodemap that are NOT active
During recovery, the recovery tool will also make sure that all nodes
know about and have created all databases.
(This used to be ctdb commit 2f2650467bac7e8954de7c17cb34f46b0bdbcd26)
- allow controls to know which client invoked them
- added a client_id to clients, so they can be identified remotely
- added the ability to remove registered srvids
- in the list_keys code, register a temp srvid, then remove it afterwards
(This used to be ctdb commit 29603c51cc6d81362532cd8e50f75c8360c5f5ef)
attach to databases after the protocol has started. The daemon
broadcasts information on new databases to the other daemons.
This also eliminates the need for the client to know about the hash
between db name and db_id.
(This used to be ctdb commit 3bad91a9d987d4c09fe3322eac23c2733660ad08)
fix the logic in ctdb_connected to print CONNECTED if the node is
connected and UNAVAILABLE when the node is dead instead of the opposite
(This used to be ctdb commit 0f431d2f3e0bd94d10fe77e56cf0ed6c48402400)
- make ctdb capable of alternative connection (like ib) again, solved the fork problem
- do_debug memory overwrite bugfix (occured using ibwrapper_test with wrong address given)
(This used to be ctdb commit da0b84cda26d544f63841dfd770ed7ebad401944)
version. The client version is different enough that this is
worthwhile
- enable local shortcut for client version of ctdb_call
- add idr_find_type(), with better error reporting in case of type
mismatch
(This used to be ctdb commit 2388094c5f7b6ce003e86b05620c06217d63b49c)
this function can be used in test applications to perform an orderly shutdown of the ctdb cluster once the test has completed.
the ctdb nodes will remain operational until all of them have received a shutdown from their client(s) after which the ctdb daemons will all terminate.
this eliminates the need to using sleep() in some of the test applications
(This used to be ctdb commit f35db69dc190b11659aad85495bb66308fdb5599)
- fixed memory leaks in the 3 packet receive routines. The problem was
that the ctdb_call logic would occasionally complete and free a
incoming packet, which would then be freed again in the packet
receive routine. The solution is to make the packet a child of a
temporary context in the receive routine then free that temporary
context. That allows other routines to keep or free the packet if
they want to, while allowing us to safely free it (via a free of the
temporary context) in the receive function
(This used to be ctdb commit 304aaaa7235febbe97ff9ecb43875b7265ac48cd)
fetch, to avoid the daemon re-reading it
- suffix the database name with the node name so that testing on
loopback doesn't result in a name collision in the database open
(This used to be ctdb commit ad30a4db75450643ff146c40faa306a021de3dd2)
code. It may be added back later once everything is working nicely,
or simulated using a in-process pipe instead of a unix domain socket
- rewrote the ctdb_fetch_lock() code to follow the new design
(This used to be ctdb commit 5024dd1f305fe1ecc262db2240c56f773b4f28f0)
change ctdb_client_fetch_lock to return a status code instead of a record handle and make it unconditionally fill in data.
change ctdb_client_store_unlock to take ctdb_db and key as arguments instead of a record handle
update the ctdb_fetch.c test to use the clientside helpers for fetching and storing data
(This used to be ctdb commit 22d5d40375e0135916c97945646f94119612615d)
The problem we have is this:
- we want the client smbd processes to be able to 'shortcut' access
to the ltdb, by directly accessing the ltdb, and if the header of
the record shows we are the dmaster then process immediately, with
no overhead of talking across the unix domain socket
- a client doing a shortcut will use tdb_chainlock() to lock the
record while processing
- we want the main ctdb daemon to be able to set locks on the
record, and when those locks collide with a 'shortcut' fcntl lock,
we want the ctdb daemon to keep processing other operations
- we don't want to have to send a message from a smbd client to the
ctdbd each time it releases a lock
The solution is shown in this example. Note that the expensive fork()
and blocking lock is only paid in case of contention, so in the median
case I think this is zero cost.
(This used to be ctdb commit a3248c3e2b740cd2403acffd3c1f6a33dca0ea03)
they both successfully fetch and lock the same record at this stage but when the actual locking works properly the second child will block.
this test allows us to verify the blocking once we have implemented it
(This used to be ctdb commit b1c0baa03a669757aaacb6e1a2794224f5ba2cd7)
there is still a bug in the ctdb code in that the children no longer receive messages from the parent for unknown reasons
(This used to be ctdb commit 468f68e4607900c5c38aea428a48dd6ea1647411)
this makes it possible to do fetch_lock and store_unlock across a domain socket to read/write data.
note that the actual locking is NOT implemented yet
(This used to be ctdb commit c7a397c56caf71283c081e5b97620085ed5108c6)
for now:
fetch a record
store a known entry for this record
fetch the record again (and later verify we got the same record)
store it back again
this will not work right now since we dont yet store the record inside the daemon
(This used to be ctdb commit f502094499a3c25ab58aa3d192588b5e6dd2b8e4)
note that the store_unlock does not actually do anything yet apart from passing the pdu from client to daemon and daemon responds.
next is to make sure the daemon actually stores the data in a database
(This used to be ctdb commit 167d6993e78f6a1d0f6607ef66925a14993ae6a1)
no locking is yet done and the store_unlock call is still missing
the ./tests/fetch.sh --daemon test fails with parent process dying which needs to be investigated.
(This used to be ctdb commit 7d7141c968950a8856f1be79871932b688bfb07f)
- split client specific routines out of ctdb_daemon.c
- use ctdb_queue code in message send from client to daemon
- use clearer names in client/daemon functions
- use talloc autofree context to avoid global for unlink of socket on
exit
- start on API change for message handler, to allow ctdb messaging to
handle daemon mode with multiple clients
(This used to be ctdb commit 53555db45f3583ae4a32cc3aa9e07fb8ef2a77e3)
we can no longer use this function from the application if we are in daemon mode.
add a horrible "sleep()" to ctdb_test.c to prevent the daemon from dissapearing (parent process died) when the application exits which may happen before the other nodes in the test have finished talking to our daemon
(This used to be ctdb commit 74d35dafe06d71e755f3a58cc58d4b9b56fc821b)
send the correct structure back to a client
assorted other cleanups
(tests/test1.sh now works in daemon mode)
(This used to be ctdb commit f4593754cab750dfdb9384884502e2e1b8fde1f0)
(I had error 206 at direct bzr merge, so 1st I did a "bzr branch" and merged that one.)
(This used to be ctdb commit 9d4d2a8e034f1288583eb98c0f48a51ff323ccac)
It came to light I have to fragment the send buffer in case destination's to fit receiver's buffers.
Additionally fixed many bugs.
Still testing.
+ TODO: clean code.
(This used to be ctdb commit 2f8876f09bc92169487cb077326579044560a121)
(basic functional test, compilable, untested)
Adjusted makefile and ibwrapper state checking.
(This used to be ctdb commit 82410f42fe5d428eda0ba96c11774e142f672d24)
- only need 10 elements in test code, more just makes it hard to
follow in a debugger
(This used to be ctdb commit 7df191112b10466a35a4ff130dade52a6c3c2646)
- split up ctdb layer code into 3 modules
- added a simple test suite
- added packet structures for ctdb_call
- switched to an array for ctdb_node to make vnn lookup easy and fast
(This used to be ctdb commit 8a17460a816a5970f2df8244a06aec55d814f186)