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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This reverts commit 88f88d86b0d08240f749fb721b8c401c2eeb1099.
This is dangerous and, on reflection, I can't see it being useful.
There are often permanent IPs on interfaces that CTDB shares with its
public IPs.
(This used to be ctdb commit 16aba4eb620844626a1c71c58b51658caf44dea6)
Less copying and pasting is a good thing...
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7d4b8cce96f33fff647a0c9d259c121dfc8403e9)
If $CTDB_SERVICE_AUTOSTARTSTOP="yes" then service start/stop is done
in the background with logging.
Fix some unit tests for samba and winbind.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3a3dae4cb5ec8b4b8381a4013adda25b87641f3a)
winbind and samba can be separately managed. This makes the service
starting and stopping code way too complicated, and even adds a small
amount of complexity to the monitoring code. The sensible option is
to split this eventscript in two.
There are two potentially backward incompatible changes here:
* Functionality has been removed that allowed 50.samba to manage
winbind when CTDB_MANAGES_WINBIND was unset but the smb.conf
"security" parameter was set to "ADS" or "DOMAIN".
Maintaining this functionality would have required moving the
testparm-related code to the functions file, deciding where the
cache file should go, and then calling it from both 49.winbind and
50.samba. This feature wasn't of great value and asking
administrators to set an extra variable in exchange for code
simplicity seems like a reasonable deal.
* External code will need to be changed if it calls 50.samba directly
with winbind-related expectations. This is fairly obvious!
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 34535ae64420926b9a3bf7d453fed4e6f4c90115)
Some code (e.g. NAT gateway code) modifies the returned result so was
modifying the original.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a3f15d2828325bbfba5bc5c0a30429e2ce572a44)
This involves refactoring ip_route_check_table() into a new function
ip_check_table() which tables the operation type (i.e. rule/route) as
an argument.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit acdaa04079a9827885f32a7bc078d3365c89b474)
Test the startup and monitor events too.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c29a943f9bbcfecb861e71d007c7698a53dc8773)
It currently needs the real testparm command installed even though it
only uses limited features. It is easy enough to fake up the
functionality that 50.samba uses.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 7ef9916bd95ff2472359a412eac5489f1aad2dce)
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)