Martin Schwenke
464b386d55
ctdb-packaging: Stop RPM from renaming working config to ctdb.rpmsave
...
The change to ctdbd.conf and removal of /etc/sysconfig/ctdb as a
configuration file makes RPM rename the latter with a .rpmsave suffix.
This means that a working configuration is moved aside on upgrade and
manual intervention is needed.
Avoid this by convincing RPM that the existing /etc/sysconfig/ctdb is
still a configuration file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12125
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Aug 8 11:30:58 CEST 2016 on sn-devel-144
2016-08-08 11:30:57 +02:00
Martin Schwenke
d7ecc913bb
ctdb-daemon: Clean up SET_DB_PRIORITY/GET_DB_PRIORITY deprecation
...
The current message is broken:
Control SET_DB_PRIORITY is not implemented any more, use instead
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12126
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
940272d215
ctdb-daemon: Fix CID 1125627 Resource leak (RESOURCE_LEAK)
...
Also fixes CID 1125628.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
b4f23a7e95
ctdb-common: Fix CID 1125585 Dereference after null check (FORWARD_NULL)
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
bbf0b907cb
ctdb-common: Fix CID 1125583 Dereference after null check (FORWARD_NULL)
...
This also fixes CID 1125584.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
7ae3699831
ctdb-common: Fix CID 1125581 Dereference after null check (FORWARD_NULL)
...
This also fixes CID 1125582.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
f802a11d3b
ctdb-tests: Fix CID 1361816 Buffer not null terminated (BUFFER_SIZE_WARNING)
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
4541301d92
ctdb-common: Fix CID 1363227 Resource leak (RESOURCE_LEAK)
...
Occurs on an invalid line that isn't the first. Isn't really a leak
because it is allocated off mem_ctx, which should be freed by the
caller.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
1f942ec36c
ctdb-mutex: Avoid corner case where helper is already reparented to init
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12113
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Amitay Isaacs
88a5791015
ctdb-tools: Use INVALID_GENERATION macro instead of value
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:34 +02:00
Martin Schwenke
2295f5009d
ctdb-doc: Document that "ctdb tickle" can now read from stdin
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12123
Although this has been queued for a while, with changes to add stdin
support to the original ctdb tool, this came for free with the
replacement tool.
addtickle and deltickle also now have this feature. However, they're
internal commands and we're not adding new documentation for
internal/debug commands.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
f2b319e457
ctdb-tools: "ctdb tickle" command should run without daemon
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12123
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Amitay Isaacs
4d144d7106
ctdb-tools: Cancel transaction on error or if commit fails
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12122
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:34 +02:00
Amitay Isaacs
8aa00035fa
ctdb-client: transaction_cancel must free transaction handle
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12122
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:34 +02:00
Amitay Isaacs
3c51ac48df
ctdb-tools: Free temporary memory context before exiting
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
c9750c821e
ctdb-tools: Close tdb database on error
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
2e5e51ebcd
ctdb-tools: Free connection list after processing it
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Martin Schwenke
1f6835c732
ctdb-tools: Add early return for empty connection list
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
If the connection list is empty then process_clist_send() still
creates a request. However, since no subrequests are created for
controls sent, tevent_req_poll() waits forever for an event.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
b54bd763b7
ctdb-tools: Free tickle list before exiting
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
814002c9a1
ctdb-tools: Free record if it does not contain valid data
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
bfe891e418
ctdb-tools: Fix CID 1364706 - resource leak
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
5f5d9549fc
ctdb-tools: Fix CID 1364705 - resource leak
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
45b9c379b5
ctdb-tools: Fix CID 1364704 - resource leak
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
94bf6e69db
ctdb-tools: Fix CID 1364703 - resource leak
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
10019f7cdf
ctdb-tools: Fix CID 1364702 - resource leak
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
25f27e16b2
ctdb-tools: Fix CID 1364701 - resource leak
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
bf1dab28d1
ctdb-tools: Fix CID 1364699 - dereference after null check
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Amitay Isaacs
049dd07b90
ctdb-tests: Add explicit wait to the fork_helper()
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
To create a client process that waits after connect(), instead of trying
to do a blocking write(), go to sleep. The parent can then kill the client
process, once testing is done.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-08 08:17:33 +02:00
Martin Schwenke
8ce8e1d7f8
ctdb-tests: Clean up and rename simple transaction_loop recovery test
...
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
* Restart after test since test does heavy database manipulation
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:33 +02:00
Martin Schwenke
de04cd5784
ctdb-tests: Clean up and rename simple transaction_loop test
...
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:33 +02:00
Martin Schwenke
18b41fcb51
ctdb-tests: Implement --interactive/-i option in transaction_loop
...
Also add PNNs to output.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:33 +02:00
Martin Schwenke
c10dcc7b91
ctdb-tests: Clean up and rename simple fetch_ring test
...
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
* Have fetch_ring print PNN for clearer output and update patterns in
test script to suit
* Simplify sanity checking pattern due to less data because of
--interactive/-i option
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:32 +02:00
Martin Schwenke
82cffc2f57
ctdb-tests: Implement --interactive/-i option in fetch ring
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:32 +02:00
Martin Schwenke
e7a220377e
ctdb-tests: Clean up and rename simple message_ring test
...
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
* Have message_ring print PNN for clearer output and update patterns
in test script to suit.
* Drop quantitative percentage check since this is hard to predict
when under extreme load. To compensate, tighten up expectations for
the total number of messages in each direction: at least 10 messages
are required over 10 seconds.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:32 +02:00
Martin Schwenke
fbb3ef46b9
ctdb-tests: Implement --interactive/-i option in message_ring
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:32 +02:00
Martin Schwenke
b100d78597
ctdb-tests: Add --interactive/-i option to test options parsing code
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:32 +02:00
Volker Lendecke
5d0cc794fd
ctdb: Fix uninitialized variable warnings
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-05 22:20:05 +02:00
Martin Schwenke
87c38d5d74
ctdb-packaging: Move ctdb tests to libexec directory
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12104
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-08-04 18:26:07 +02:00
Andreas Schneider
f9c85d04e9
ctdb-waf: Move ctdb tests to libexec directory
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12104
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-04 18:26:07 +02:00
Martin Schwenke
24e28c0aa5
ctdb-mutex: Fix CID 1359217 Resource leak (RESOURCE_LEAK)
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Aug 3 09:13:55 CEST 2016 on sn-devel-144
2016-08-03 09:13:55 +02:00
Martin Schwenke
c6a7f680ce
ctdb-daemon: Fix CID 1363067 Resource leak (RESOURCE_LEAK)
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-03 05:29:24 +02:00
Martin Schwenke
74aca5f4c6
ctdb-daemon: Fix CID 1363233 Resource leak (RESOURCE_LEAK)
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-03 05:29:24 +02:00
Martin Schwenke
d46960f20e
ctdb-utils: Fix CID 1297451 Explicit null dereferenced (FORWARD_NULL)
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-03 05:29:23 +02:00
Martin Schwenke
aff33a5947
ctdb-common: Consistently use strlcpy() on interface names
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-03 05:29:23 +02:00
Martin Schwenke
763f9c13f2
ctdb-common: Fix CID 1125553 Buffer not null terminated (BUFFER_SIZE_WARNING)
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-03 05:29:23 +02:00
Martin Schwenke
19ed8165bb
ctdb-tests: Stop cross-talk between reclock tests
...
On a busy system the backgrounded counter reset can survive into the
next test and interfere with its result.
To avoid this, wait until all forks of 01.reclock exit before
continuing on to the next test.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug 1 17:53:27 CEST 2016 on sn-devel-144
2016-08-01 17:53:27 +02:00
Martin Schwenke
ed81e51cc1
ctdb-daemon: Fix CID 1364527/8/9: Null pointer dereferences (NULL_RETURNS)
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-28 05:00:18 +02:00
Martin Schwenke
58bd3f8dca
ctdb-tests: Pretend not to ignore return from fgets()
...
With some compilers and picky compiler settings, ignoring the return
value of fgets() can cause compilation to fail.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:18 +02:00
Martin Schwenke
2f7096494b
ctdb-tests: Avoid portability issue in porting tests
...
EUID is bash-only, so this condition always fails on other shells.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:18 +02:00
Martin Schwenke
806f54f15d
ctdb-tests: Remove duplicate EOF terminators in some tool unit tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:18 +02:00
Martin Schwenke
0b4b2d01cf
ctdb-tests: Avoid division by zero in NFS eventscript unit test
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:18 +02:00
Amitay Isaacs
9871194e86
ctdb-tests: Removing sleep from porting_tests
...
This avoids test failures due to timing issues.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:18 +02:00
Amitay Isaacs
d10771cf4c
ctdb-tests: Do not add $VALGRIND to ctdb command
...
unit_test wrapper already adds VALGRIND wrapper.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:18 +02:00
Amitay Isaacs
a86be20872
ctdb-tests: Fix valgrind unintialized error
...
struct ctdb_dbid has padding and needs to be initialized.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:18 +02:00
Amitay Isaacs
3fafe48027
ctdb-packaging: Move ctdb configuration to ctdbd.conf
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:18 +02:00
Amitay Isaacs
3fbb541f9d
ctdb-protocol: Deprecate global transaction controls
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:18 +02:00
Amitay Isaacs
28f62be32e
ctdb-protocol: Drop marshalling for global transaction controls
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
24635e955c
ctdb-client: Drop client code for global transaction controls
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
3314a09aaf
ctdb-daemon: Drop implementation of global transaction controls
...
These were used in serial recovery and for restoring databases using
older ctdb tool. New code uses database specific transaction controls.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
47c400f42c
ctdb-protocol: Deprecate THAW control
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
28b2a6391b
ctdb-daemon: Drop the implementation of THAW control
...
This control was used by the older implementation of tool to restore a
database from backup. In the new implemenation of tool, it freezes and thaws
only the database being restored.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
29b7825dcf
ctdb-tests: Adjust unit test output matching new ctdb
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
70f2573f2a
ctdb-tool: Add replacement ctdb tool using new client API
...
New tool breaks some of the tool unit tests due to improved error
messages. Those changes are in the following patch.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
199293f4a1
ctdb-tool: Remove old ctdb tool
...
Removing and adding replacement code makes the commits cleaner.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Martin Schwenke
87b49c913f
ctdb-daemon: Deletion of IPs is deferred until the next takeover run
...
This drastically simplifies the code. "ctdb reloadips" behaves the
same, since it causes a takeover run immediately after IPs are
deleted. "ctdb delip" now needs to be followed with an explicit "ctdb
ipreallocate".
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
0a759bc3ff
ctdb-daemon: Use consistent naming for monitoring mode
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
5dc18882fd
ctdb-daemon: Reduce QueueBufferSize from 16k to 1k
...
This avoids CTDB spending too much time processing multiple packets and
return to the event loop sooner.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
5d380eff41
ctdb-daemon: Add QueueBufferSize tunable
...
This controls the maximum size of data ctdb will read from sockets at
a time.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:17 +02:00
Amitay Isaacs
57a66ebc8a
ctdb-protocol: Add function ctdb_sock_addr_same_ip
...
... to check if only the addresses are the same.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
76c2208f98
ctdb-common: Fix parsing of debug level
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
dc065b1f35
ctdb-tests: Add machinereadable output tests
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
5d34755be3
ctdb-tests: Add more tests for ctdb setdbsticky and setdbreadonly
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
b64731517a
ctdb-tests: Add tests for idempotence
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
0f5bfa67b7
ctdb-tests: Improve test to match exact output
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
bea1252939
ctdb-tests: Fix typo
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
277aad6870
ctdb-tests: Clean database before the test
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
16f33c992e
ctdb-daemon: Fix statistics update macro
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
b47a244afb
ctdb-doc: Drop documentation for obsolete tunable
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
785150a28a
ctdb-tests: Fix CID 1364526 (Argument cannot be negative)
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
a20c3df649
ctdb-tests: Fix CID 1364525 (Argument cannot be negative)
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
654459054d
ctdb-tests: Fix CID 1364524 (Argument cannot be negative)
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:16 +02:00
Amitay Isaacs
e42d587f10
ctdb-tests: Fix CID 1364523 (Argument cannot be negative)
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:15 +02:00
Amitay Isaacs
13dcaff12c
ctdb-tests: Fix CID 1364522 (Argument cannot be negative)
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:15 +02:00
Amitay Isaacs
89b79136a7
ctdb-tests: Fix CID 1364521 (Argument cannot be negative)
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:15 +02:00
Amitay Isaacs
9e2a7f0f85
ctdb-common: Fix CID 1363227 (Resource leak)
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-28 05:00:15 +02:00
Martin Schwenke
10165c48f1
ctdb-daemon: Move CTDB VNN structure to IP takeover code
...
It is only used in this code.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:15 +02:00
Martin Schwenke
c40fc62642
ctdb-ipalloc: Use a cumulative timeout for takeover run stages
...
RELEASE_IP sometimes times out because killing TCP connections can
take a long time.
The aim of the takeover timeout is actually to limit the total amount
of time for an IP takeover run. So, calculate a combined timeout
offset once and use it for each of the RELEASE_IP, TAKEOVER_IP,
IPREALLOCATED stages. This gives RELEASE_IP more time to kill TCP
connections but still limits the total time.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:15 +02:00
Martin Schwenke
ff6a22757a
ctdb-doc: ctdb_diagnostics(1) tweaks and cross-references
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:15 +02:00
Martin Schwenke
337fc6e2e7
ctdb-doc: Integrate ctdb_diagnostics man page into build
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:15 +02:00
martijn van brummelen
7f56384a8d
ctdb-doc: Add ctdb_diagnostics man page
...
Signed-off-by: martijn van brummelen <martijn@brumit.nl>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-28 05:00:15 +02:00
Martin Schwenke
0e1ff5f156
ctdb-tests: Add database related tool tests
...
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
6a01251b57
ctdb-tests: Implement database related controls in fake_ctdbd
...
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
74989b1eec
ctdb-tools: Simplify "ctdb getdbseqnum" output format
...
Print the sequence number without preamble. Print it in hex to match
the logs.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
41d13470cb
ctdb-tests: Add "ctdb disable/enable" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
58f3bd38b6
ctdb-tests: Implement MODIFY_FLAGS control in fake_ctdbd
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
ae07e3b815
ctdb-tests: Add "ctdb ban/unban" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
3d6c23ef8e
ctdb-tests: Implement SET_BAN_STATE control in fake_ctdbd
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
bd17dae3a0
ctdb-tests: Add "ctdb stop/continue" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
8deb57b855
ctdb-tests: Implement TAKEOVER_RUN message in fake_ctdbd
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
f7a9d59f72
ctdb-tests: Implement STOP_NODE and CONTINUE_NODE controls in fake_ctdbd
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
8ef71685f4
ctdb-tests: Add "ctdb getreclock" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
0e8416d9a7
ctdb-tests: Implement GET_RECLOCK_FILE control in fake_ctdbd
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Martin Schwenke
98f51727c3
ctdb-tests: Add "ctdb getmonmode/disablemonitor/enablemonitor" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:47 +02:00
Amitay Isaacs
87bf2424eb
ctdb-tests: Add monitoring related controls in fake_ctdbd
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:47 +02:00
Martin Schwenke
7303d7ba86
ctdb-tools: Simplify "ctdb getmonmode" output format
...
No preamble, just print keyword ENABLED or DISABLED. Fix the
documentation to reflect this and remove the text that is simply
wrong.
Also remove output from "ctdb enablemonitor" and "ctdb disablemonitor"
on success. This is just noise.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Martin Schwenke
c0d1e9c90a
ctdb-tests: Add "ctdb setifacelink" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Amitay Isaacs
435cf16d18
ctdb-tests: Implement SET_IFACE_LINK_STATE control in fake_ctdbd
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:46 +02:00
Martin Schwenke
5d63d8d3b8
ctdb-tests: Add "ctdb listvars/getvar/setvar" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Amitay Isaacs
be0db16526
ctdb-tests: Implement controls related to tunables in fake_ctdbd
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:46 +02:00
Amitay Isaacs
abd5d7c8fd
ctdb-daemon: Use refactored tunable code
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:46 +02:00
Amitay Isaacs
f79be2ee4c
ctdb-common: Refactor tunable related functions
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:46 +02:00
Martin Schwenke
37d321cb0b
ctdb-tests: Add "ctdb runstate" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Amitay Isaacs
eb2544e406
ctdb-tests: Implement GET_RUNSTATE control in fake_ctdbd
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:46 +02:00
Martin Schwenke
cf5d70c3ca
ctdb-tests: Add "ctdb setdebug" tool tests
...
They also test "ctdb getdebug".
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Amitay Isaacs
e7e33420e6
ctdb-tests: Implement GET_DEBUG and SET_DEBUG controls in fake_ctdbd
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:46 +02:00
Amitay Isaacs
6ee5136286
ctdb-tool: Improve error output in "ctdb setdebug"
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:46 +02:00
Martin Schwenke
b6623feb9c
ctdb-tools: Simplify "ctdb getdebug" output format
...
Print just the debug level as a description, for both human and
machine readable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Martin Schwenke
4af127cc37
ctdb-tests: Add "ctdb pnn" tool test
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Martin Schwenke
c3c106e41f
ctdb-tools: Simplify "ctdb pnn" output format
...
Just print the PNN.
Update dependent code.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Martin Schwenke
d6e1e69765
ctdb-tests: Add "ctdb getpid" tool test
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:45 +02:00
Martin Schwenke
accd1ca19f
ctdb-tools: Simplify "ctdb getpid" output format
...
No preamble, just the PID.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:45 +02:00
Martin Schwenke
032c9f10ac
ctdb-tests: Add "ctdb process-exists" tool test
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:45 +02:00
Amitay Isaacs
339da2295b
ctdb-tool: Simplify "ctdb process-exists"
...
Drop the PNN part of the argument, improve output.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Martin Schwenke
bde3f958aa
ctdb-tests: Add "ctdb uptime" tool test
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Amitay Isaacs
467356d0f8
ctdb-tool: Improve "ctdb uptime" output format
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Martin Schwenke
55040c5103
ctdb-tests: Add "ctdb recmaster" tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Martin Schwenke
d30143d88e
ctdb-tests: Add "ctdb ping" tool test
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Martin Schwenke
48ed5f7fe5
ctdb-tests: Add "ctdb ifaces" tool test
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Amitay Isaacs
e1aa2bbb2d
ctdb-tests: Fix "ctdb status" test
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Martin Schwenke
1c4443684a
ctdb-tests: Drop a "ctdb reloadnodes" tool test
...
Replacement for ctdb tool will not support multiple debug levels.
This test could be modified to use the default debug level but that
would make it identical to reloadnodes test #19 .
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Amitay Isaacs
1bb1b636b6
ctdb-tool: Fix a log message in "ctdb reloadnodes"
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Amitay Isaacs
fc7968dbea
ctdb-tool: Exit with 1 on failure instead of -1
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Amitay Isaacs
02709c7aaa
ctdb-tool: Drop arbitrary exit codes
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Amitay Isaacs
eafa12ec22
ctdb-tests: Drop ctdb tool debug level to NOTICE
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Amitay Isaacs
2b2a7a9269
ctdb-tool: Log a message at INFO level
...
This message was useful when debugging during development but it isn't
generally useful.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:44 +02:00
Martin Schwenke
c77a50dcfb
ctdb-tests: Error on invalid destnode in fake_ctdbd
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Martin Schwenke
046e5663ff
ctdb-tests: Have fake_ctdbd log request IDs
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Martin Schwenke
80f7fd1ce7
ctdb-tests: Allow secondary tool commands to be tested
...
New function simple_test_other() allows other tool commands to be
tested along with the main command.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Martin Schwenke
752c70b021
ctdb-tests: Allow fake_ctdbd and tool to be run under valgrind in tool tests
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:44 +02:00
Martin Schwenke
779a8d8dc3
ctdb-tests: Clean up temporary files in tool tests
...
If CTDB_TESTS_VAR isn't cleaned up between runs then this can result
in a lot of accumulated temporary files, so clean up the temporary
files.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
c6f36b5b29
ctdb-tests: Require setup_ctdbd() call in tool tests
...
This makes the ctdbd setup explicit and allows multiple calls to
simple_test() in the same test without ugly re-initialisation.
While here drop any unneeded ctdbd initialisation, such as VNNMAP and
IFACES. These have often been needlessly present, cluttering the
tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
2a855903de
ctdb-doc: Document limitation of "ctdb reloadips"
...
This limitation can be removed with a reasonable amount of effort. It
probably isn't worth doing until the public IP address configuration
is stored in a cluster-wide database. That seems like the right time
to change the API to handle the details that
CTDB_CONTROL_GET_PUBLIC_IPS doesn't currently retrieve.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
f427fe8102
ctdb-doc: Update allowed debug levels to include "ERROR"
...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
99e41e8df3
ctdb-doc: Drop documentation for "ctdb xpnn"
...
This command was deleted some time ago.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
a66b83d44b
ctdb-doc: Drop documentation for "ctdb setmonmode"
...
The actual command was removed nearly 10 years ago.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Amitay Isaacs
fbce266c23
ctdb-build: Add missing dependency on samba-util
...
reqid.c uses idr, which requires samba-util.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:43 +02:00
Amitay Isaacs
9187f26f99
ctdb-locking: Remove ctdb_db_prio_iterator function
...
It is not used anymore.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:43 +02:00
Amitay Isaacs
b5ede509ab
ctdb-freeze: Remove ctdb_db_prio_frozen() function
...
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:43 +02:00
Amitay Isaacs
2852397691
ctdb-locking: Remove API for locking databases with priority
...
This is not used anymore.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:43 +02:00
Amitay Isaacs
b81824e10d
ctdb-locking: Remove API for locking all databases
...
This has never been used.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:43 +02:00