1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

104215 Commits

Author SHA1 Message Date
Ralph Boehme
da61c97058 s3/smbd: add cleanupd_init_send()/recv()
Previously, without this patch, if cleanupd died for whatever reason, it
would be restarted from smbd. However, if cleanupd initialization
failed and it exitted again, there would be no child entry in smbd for
it and it wouldn't be attempted to restart it again.

This patch adds async send/recv methods for starting cleanupd that will
reschedule restart attempt every second in case initilisation failed.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12022

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-28 05:00:18 +02:00
Ralph Boehme
9c1cd31c0f s3/lib: add smbd_cleanupd.tdb
This will be used between cleanupd and smbd for passing information
about exitted smbd childs.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12022

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-28 05:00:18 +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
44bbdbef2a WHATSNEW: ctdb updates
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
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
Volker Lendecke
9e676b25dd dsdb: Fix CID 1364520 Incorrect expression (EVALUATION_ORDER)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 26 23:48:19 CEST 2016 on sn-devel-144
2016-07-26 23:48:19 +02:00
Andrew Bartlett
add64427fd ldb_ldb: Do not re-scan the index list for new DNs
This DN can not already be in the list, because it is being
added to this DB for the first time just now.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jul 26 16:42:16 CEST 2016 on sn-devel-144
2016-07-26 16:42:16 +02:00
Garming Sam
8dabd57d1c kcc: Clean up repsTo attribute for old DCs
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Jul 26 05:11:57 CEST 2016 on sn-devel-144
2016-07-26 05:11:57 +02:00