summaryrefslogtreecommitdiff
path: root/ctdb
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-daemon: Clean up SET_DB_PRIORITY/GET_DB_PRIORITY deprecationMartin Schwenke2016-08-101-2/+2
| | | | | | | | | | | | 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> (cherry picked from commit d7ecc913bb40783c8cf8c66e3c3e99e6df414381)
* ctdb-packaging: Stop RPM from renaming working config to ctdb.rpmsaveMartin Schwenke2016-08-101-0/+11
| | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 464b386d55b0c509b86645bdac7f6d3df489e902)
* ctdb-doc: Document that "ctdb tickle" can now read from stdinMartin Schwenke2016-08-101-6/+17
| | | | | | | | | | | | | | | | 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> (cherry picked from commit 2295f5009dabfc09eec40bb4f30679d76310ce12)
* ctdb-tools: "ctdb tickle" command should run without daemonMartin Schwenke2016-08-101-1/+1
| | | | | | | | 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> (cherry picked from commit f2b319e457eb43410997615f834f0a21fa5e5b0a)
* ctdb-tools: Cancel transaction on error or if commit failsAmitay Isaacs2016-08-101-0/+6
| | | | | | | | 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> (cherry picked from commit 4d144d7106d56bbb48669dd35eb324377dd09b59)
* ctdb-client: transaction_cancel must free transaction handleAmitay Isaacs2016-08-101-0/+3
| | | | | | | | 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> (cherry picked from commit 8aa00035faeb307c061dc20e62a0ace7f2a1413b)
* ctdb-tools: Free temporary memory context before exitingAmitay Isaacs2016-08-101-1/+3
| | | | | | | | 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> (cherry picked from commit 3c51ac48df50a877ded34f3678aeb13f3509570d)
* ctdb-tools: Close tdb database on errorAmitay Isaacs2016-08-101-0/+6
| | | | | | | | 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> (cherry picked from commit c9750c821e06364cb4559f857c359c14e6799303)
* ctdb-tools: Free connection list after processing itAmitay Isaacs2016-08-101-0/+4
| | | | | | | | 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> (cherry picked from commit 2e5e51ebcd3ec8283cdd9c9d13dbe1fc836f8a3d)
* ctdb-tools: Add early return for empty connection listMartin Schwenke2016-08-101-0/+6
| | | | | | | | | | | | 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> (cherry picked from commit 1f6835c73245366111946b92605315c0cac84295)
* ctdb-tools: Free tickle list before exitingAmitay Isaacs2016-08-101-0/+1
| | | | | | | | 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> (cherry picked from commit b54bd763b7a4ff3cd1983a8ccc89b23db5263a4d)
* ctdb-tools: Free record if it does not contain valid dataAmitay Isaacs2016-08-101-0/+1
| | | | | | | | 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> (cherry picked from commit 814002c9a10227fd6cc13fdc974d2312201d7c19)
* ctdb-tools: Fix CID 1364706 - resource leakAmitay Isaacs2016-08-101-0/+4
| | | | | | | | 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> (cherry picked from commit bfe891e418fd372c1e7036f08e81b65c27843a79)
* ctdb-tools: Fix CID 1364705 - resource leakAmitay Isaacs2016-08-101-0/+2
| | | | | | | | 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> (cherry picked from commit 5f5d9549fcae4b2fa4b99bef3892a24bdbb0eaa9)
* ctdb-tools: Fix CID 1364704 - resource leakAmitay Isaacs2016-08-101-0/+1
| | | | | | | | 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> (cherry picked from commit 45b9c379b590ce0ff03ccaf6c970e0aee1a4b745)
* ctdb-tools: Fix CID 1364703 - resource leakAmitay Isaacs2016-08-101-0/+4
| | | | | | | | 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> (cherry picked from commit 94bf6e69dba1b97d90168efceaafa43d27186778)
* ctdb-tools: Fix CID 1364702 - resource leakAmitay Isaacs2016-08-101-0/+2
| | | | | | | | 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> (cherry picked from commit 10019f7cdfa4b3f5485f063d409aa55ca5f14f6a)
* ctdb-tools: Fix CID 1364701 - resource leakAmitay Isaacs2016-08-101-6/+5
| | | | | | | | 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> (cherry picked from commit 25f27e16b26e2c96a35dd7b42d22d16d63be6037)
* ctdb-tools: Fix CID 1364699 - dereference after null checkAmitay Isaacs2016-08-101-0/+2
| | | | | | | | 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> (cherry picked from commit bf1dab28d1d5887f39739eb29537727d97054c5d)
* ctdb-mutex: Avoid corner case where helper is already reparented to initMartin Schwenke2016-08-102-1/+15
| | | | | | | | 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> (cherry picked from commit 1f942ec36c98127e25d7aa9b8370a4f621b9d362)
* ctdb-daemon: Fix CID 1125627 Resource leak (RESOURCE_LEAK)Martin Schwenke2016-08-101-2/+7
| | | | | | | | | | 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> (cherry picked from commit 940272d215049f5f5079aa926e69eae1985a4bfa)
* ctdb-common: Fix CID 1125585 Dereference after null check (FORWARD_NULL)Martin Schwenke2016-08-101-1/+1
| | | | | | | | 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> (cherry picked from commit b4f23a7e95cd9c8fc4a6324d4ec5a2881eaec207)
* ctdb-common: Fix CID 1125583 Dereference after null check (FORWARD_NULL)Martin Schwenke2016-08-101-1/+1
| | | | | | | | | | 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> (cherry picked from commit bbf0b907cb04184515d0f5f09f14824df1c2e59f)
* ctdb-common: Fix CID 1125581 Dereference after null check (FORWARD_NULL)Martin Schwenke2016-08-101-1/+1
| | | | | | | | | | 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> (cherry picked from commit 7ae3699831427725f12e0a26a0681e59f2fbb2d9)
* ctdb-tests: Fix CID 1361816 Buffer not null terminated (BUFFER_SIZE_WARNING)Martin Schwenke2016-08-101-2/+2
| | | | | | | | 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> (cherry picked from commit f802a11d3ba808baba6cb2d31d706952df1e3159)
* ctdb-common: Fix CID 1363227 Resource leak (RESOURCE_LEAK)Martin Schwenke2016-08-101-0/+1
| | | | | | | | | | | | 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> (cherry picked from commit 4541301d92e3c140adb6444143ad697d35926179)
* ctdb-mutex: Fix CID 1359217 Resource leak (RESOURCE_LEAK)Martin Schwenke2016-08-101-2/+9
| | | | | | | | | | | | 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> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Aug 3 09:13:55 CEST 2016 on sn-devel-144 (cherry picked from commit 24e28c0aa52399f03acf830a1ad72af0139b0606)
* ctdb-daemon: Fix CID 1363067 Resource leak (RESOURCE_LEAK)Martin Schwenke2016-08-101-0/+1
| | | | | | | | 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> (cherry picked from commit c6a7f680ce74d4a630fa9305d0a926cc1a4b3d2c)
* ctdb-daemon: Fix CID 1363233 Resource leak (RESOURCE_LEAK)Martin Schwenke2016-08-101-0/+1
| | | | | | | | 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> (cherry picked from commit 74aca5f4c671d9f15ae6c3a901978a1cf247dd6f)
* ctdb-utils: Fix CID 1297451 Explicit null dereferenced (FORWARD_NULL)Martin Schwenke2016-08-101-1/+3
| | | | | | | | 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> (cherry picked from commit d46960f20e795cd4abc1c727705f77b2f0e0e564)
* ctdb-common: Consistently use strlcpy() on interface namesMartin Schwenke2016-08-101-3/+3
| | | | | | | | 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> (cherry picked from commit aff33a59479cafcb1f24a07ff76383d47bb196b3)
* ctdb-common: Fix CID 1125553 Buffer not null terminated (BUFFER_SIZE_WARNING)Martin Schwenke2016-08-101-1/+1
| | | | | | | | 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> (cherry picked from commit 763f9c13f2998a8858e8a3ec013d166a3d429835)
* ctdb-tests: Add explicit wait to the fork_helper()Amitay Isaacs2016-08-101-11/+6
| | | | | | | | | | | | 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> (cherry picked from commit 049dd07b909dc56a246799f8a96235989a5a605f)
* ctdb-tests: Clean up and rename simple transaction_loop recovery testMartin Schwenke2016-08-101-14/+4
| | | | | | | | | | | | | | | * 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> (cherry picked from commit 8ce8e1d7f8c05158f0f5f4e673f3d9a40f94f00d)
* ctdb-tests: Clean up and rename simple transaction_loop testMartin Schwenke2016-08-101-13/+2
| | | | | | | | | | | | | * 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> (cherry picked from commit de04cd578416168290c51f7c4e326b864ab425a4)
* ctdb-tests: Implement --interactive/-i option in transaction_loopMartin Schwenke2016-08-101-6/+13
| | | | | | | | | | | 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> (cherry picked from commit 18b41fcb51942ebcd4041fe3e3694712a5a5e43a)
* ctdb-tests: Clean up and rename simple fetch_ring testMartin Schwenke2016-08-103-65/+48
| | | | | | | | | | | | | | | | | | | * 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> (cherry picked from commit c10dcc7b91df62f740a4789763234f8bb2f0a27f)
* ctdb-tests: Implement --interactive/-i option in fetch ringMartin Schwenke2016-08-101-3/+9
| | | | | | | | | 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> (cherry picked from commit 82cffc2f5759fb73bba37e45fc20b24b30ab0438)
* ctdb-tests: Clean up and rename simple message_ring testMartin Schwenke2016-08-103-94/+69
| | | | | | | | | | | | | | | | | | | | | * 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> (cherry picked from commit e7a220377ec14090435f448c9a900f8f8e852a77)
* ctdb-tests: Implement --interactive/-i option in message_ringMartin Schwenke2016-08-101-5/+9
| | | | | | | | | 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> (cherry picked from commit fbb3ef46b99f4e3ccf710367e50f8b9f89fee52c)
* ctdb-tests: Add --interactive/-i option to test options parsing codeMartin Schwenke2016-08-102-0/+4
| | | | | | | | | 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> (cherry picked from commit b100d78597959ad314e4f4f6816a8ff14100fb6e)
* ctdb-tests: Stop cross-talk between reclock testsMartin Schwenke2016-08-101-0/+11
| | | | | | | | | | | | | | | | | | 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. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109 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 (cherry picked from commit 19ed8165bbe374e1ea277fd4dd5a65ee932b4f05)
* ctdb-packaging: Move ctdb tests to libexec directoryMartin Schwenke2016-08-101-2/+2
| | | | | | | | 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> (cherry picked from commit 87c38d5d741f5e58f643ad4f797c523c67bbab00)
* ctdb-waf: Move ctdb tests to libexec directoryAndreas Schneider2016-08-101-12/+12
| | | | | | | | 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> (cherry picked from commit f9c85d04e9edb3af9479e9c83d5b1ec77b9c2ee2)
* ctdb-daemon: Fix CID 1364527/8/9: Null pointer dereferences (NULL_RETURNS)Martin Schwenke2016-07-282-0/+12
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* ctdb-tests: Pretend not to ignore return from fgets()Martin Schwenke2016-07-281-2/+7
| | | | | | | | 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>
* ctdb-tests: Avoid portability issue in porting testsMartin Schwenke2016-07-281-1/+2
| | | | | | | 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>
* ctdb-tests: Remove duplicate EOF terminators in some tool unit testsMartin Schwenke2016-07-283-3/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Avoid division by zero in NFS eventscript unit testMartin Schwenke2016-07-281-1/+2
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Removing sleep from porting_testsAmitay Isaacs2016-07-281-7/+4
| | | | | | | This avoids test failures due to timing issues. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>