1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

323 Commits

Author SHA1 Message Date
Martin Schwenke
957c38b65c ctdb-packaging: Test package requires tcpdump
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13838

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
2019-03-15 05:17:14 +00:00
Martin Schwenke
b2b8dce4fc ctdb-packaging: ctdb package should not own system library directory
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13838

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
2019-03-15 05:17:14 +00:00
Amitay Isaacs
4443124fe8 ctdb-packaging: Call waf with python wrapper
This allows to build packages even when python3 is not available by
setting PYTHON variable.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-12-18 07:12:09 +01:00
Martin Schwenke
46fd4f144e ctdb-tests: Add local_daemons.sh
This provides a separate script for handling local daemons.  It can be
used for testing outside of the CTDB simple test suite.  It is
installed as ctdb_local_daemons.

The logic is copied from ctdb/tests/simple/scripts/local_daemons.bash.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-11-06 07:16:17 +01:00
Martin Schwenke
8fe6a0274b ctdb-packaging: Enable some standard event scripts if none are enabled
CTDB needs the legacy/00.ctdb event script to be able to function
properly.  If this script is not enabled then assume a first-time
install or an upgrade to a version that requires events scripts to be
enabled via symlinks.  In these cases enable this script and other
commonly used scripts.

Remove links during uninstall (but not during upgrade).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-07-11 11:48:39 +02:00
Martin Schwenke
06be1c8593 ctdb-build: Install event scripts in CTDB_DATADIR
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-07-11 11:48:38 +02:00
Martin Schwenke
4bdf97a935 ctdb-scripts: Change directory for notifications to events/notification
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-06-05 17:47:26 +02:00
Martin Schwenke
12fd8d7a5c ctdb-scripts: Move event scripts to events/legacy/ directory
This is the initial location that will be used by the new
multi-component aware event daemon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-06-05 17:47:26 +02:00
Martin Schwenke
87284da7a2 ctdb: Drop configuration file ctdbd.conf
Drop function loadconfig(), replacing uses with "load_system_config
ctdb".  Drop translation of old-style configuration to new
configuration file.  Drop export of debugging variables.  Drop
documentation and configuration examples.

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): Thu May 17 07:03:04 CEST 2018 on sn-devel-144
2018-05-17 07:03:04 +02:00
Martin Schwenke
1aa17eb447 ctdb-config: Add default ctdb.conf file
Install it in RPM.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
72ba7ea887 ctdb-docs: Add ctdb.conf(5)
This documents the new Samba-style configuration file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:32 +02:00
Martin Schwenke
31747da5ff ctdb-build: Create database directories during installation
Create and package.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-17 04:04:30 +02:00
Amitay Isaacs
b72d5fc7ba ctdb-packaging: Package all helpers using wildcard
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-05-12 12:06:28 +02:00
Martin Schwenke
7e31a1382f ctdb-config: Add default ctdb.sysconfig file, update ctdb.service
Install ctdb.sysconfig in RPM.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
74230c59b6 ctdb-docs: Document system options and resource controls
The existing configuration file is disappearing so these configuration
options need a new home that is not handled by ctdbd_wrapper.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
f63f9053ef ctdb-config: Add a default script.options file
Include it in the RPM.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
a8ccf41b87 ctdb-docs: Document script.options
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Martin Schwenke
e5af067866 ctdb-scripts: Drop CTDB_NOTIFY_SCRIPT configuration option
Notification scripts are installed into $CTDB_BASE/notify.d/ and are
always run by notify.sh.  Leave notify.sh where it is for now but no
longer consider it a configuration file.  This is an interim measure
and will be changed again soon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01 13:31:18 +02:00
Martin Schwenke
02fc52d69b ctdb-scripts: Tunables are now loaded from ctdb.tunables
Using CTDB_SET_TunableVariables in the main configuration file is no
longer supported.

The only subtlety is an unexpected order change in one of the unit
test results.  This is because the old implementation implicitly
sorted the tunable variables via the set command.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:21 +02:00
Martin Schwenke
9fe85f4cc9 ctdb-packaging: Package up relevant /var subdirectories
They're already created at installation time.  This way they don't
need to be created at startup.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-09 07:08:24 +01:00
Martin Schwenke
5a99835c38 ctdb-packaging: Use RPM's local state directory
Instead of fixed /var.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-09 07:08:24 +01:00
Martin Schwenke
ca315203be ctdb-common: Drop debugging variable CTDB_EXTERNAL_TRACE
This was an attempt to debug an unexpected situation.  It never
triggered, so delete it and all supporting code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-01 19:39:15 +01:00
Martin Schwenke
61a0ae9161 ctdb-packaging: Package event scripts via a wildcard
This avoids churn as event scripts are renamed and moved about.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-01 19:39:14 +01:00
Martin Schwenke
1e18edc76a ctdb-packaging: Make the ctdb package own more directories
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-01 19:39:14 +01:00
Martin Schwenke
8d9b41d427 ctdb-takeover: Add takeover helper
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-12-19 04:07:08 +01:00
Amitay Isaacs
fc28a74254 ctdb-daemon: Remove ctdb_event_helper
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Sun Dec 18 18:10:50 CET 2016 on sn-devel-144
2016-12-18 18:10:50 +01:00
Amitay Isaacs
9cbdb40612 ctdb-tool: Add helper for talking to event daemon
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-12-18 14:23:23 +01:00
Amitay Isaacs
950110f3c1 ctdb-eventd: Add event script handling daemon
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-12-18 14:23:22 +01:00
Amitay Isaacs
546f1722c9 ctdb-packaging: Update required tdb version for tdb_storev()
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2016-10-27 23:53:13 +02:00
Martin Schwenke
fd8e562069 ctdb-packaging: Move CTDB tests to /usr/local/share/ctdb/tests/
In time, other things will end up in /use/local/share/ctdb/.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12104

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-10-14 08:07:11 +02:00
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
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
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
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
Martin Schwenke
48d1fd8299 ctdb-scripts: Add eventscript 06.nfs
This generates takeip-pre and releaseip-pre call-out events.

One use is to put NFS into grace before an IP is assigned to an
interface.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-06-08 10:33:19 +02:00
Amitay Isaacs
97e1f53dae ctdb-packaging: Remove tevent-unix-util public library
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11946

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-06-06 12:26:19 +02:00
Martin Schwenke
f667ff6485 ctdb-doc: Document cluster mutex helper API
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): Thu Apr 28 13:18:07 CEST 2016 on sn-devel-144
2016-04-28 13:18:06 +02:00
Martin Schwenke
5cf3b7a1e3 ctdb: Add new helper ctdb_mutex_fcntl_helper
This implements the type of fcntl locking that the recovery lock uses.
The intent is to use it for multiple locks and allow the choice of
helper to be configured.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-28 09:39:16 +02:00
Martin Schwenke
0352224262 ctdb-tools: Add new ctdb_lvs helper
This will replace the ctdb CLI tool "lvs" and "lvsmaster" options.  It
also makes LVS daemon support unnecessary.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-15 05:57:17 +02:00
Martin Schwenke
1924323af6 ctdb-killtcp: New helper ctdb_killtcp
This will allow killing of TCP connections without daemon involvement.

It looks strange that the common code for daemon and helper is in the
server directory.  Having it in the server directory means less
temporary changes to the build configuration.  This code will move
into the helper itself and will no longer be used by the daemon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-01 04:42:11 +02:00
Martin Schwenke
21ec67e2e9 ctdb-doc: Drop outdated NEWS file
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-03-10 03:34:19 +01:00
Martin Schwenke
c65d174eae ctdb-packaging: Set --libexecdir in RPM spec file
If the files section uses %{_libexecdir} then CTDB must also be
configured to build and install with the same path, otherwise rpmbuild
can fail due to a mismatch.  "rpmbuild --showrc" indicates that the
default %configure command sets:

        --libexecdir=%{_libexecdir} \

A mismatch will occur on SUSE systems, where SLES 12 and OpenSUSE 12
set _libexecdir to %{_exec_prefix}/lib.

The failure was initially seen when testing on Debian where
_libexecdir is set to %{_prefix}/lib/x86_64-linux-gnu, though Debian
is an unlikely platform for building RPMs...

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): Mon Mar  7 14:43:15 CET 2016 on sn-devel-144
2016-03-07 14:43:15 +01:00
Martin Schwenke
484f3bfae1 ctdb-packaging: Drop changelog section from RPM spec file
This is unmaintained and misleading.

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): Mon Mar  7 05:00:15 CET 2016 on sn-devel-144
2016-03-07 05:00:15 +01:00
Martin Schwenke
0a5cb637d4 ctdb: Install helpers under libexecdir
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-02-12 09:01:14 +01:00
Günther Deschner
6825a22970 ctdb: do not provide a useless pkgconfig file for ctdb.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11696

We neither have public headers nor a public library.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Jan 29 04:33:36 CET 2016 on sn-devel-144
2016-01-29 04:33:35 +01:00
Martin Schwenke
1538fc4585 ctdb-tools: Add standalone ctdb_natgw tool script
This is intended to replace the use of "ctdb natgwlist" in 11.natgw
and provide different views of the NAT gateway status.

It replaces the use of CTDB_NATGW_SLAVE_ONLY=yes with a "slave-only"
keyword in the NAT gateway nodes file.  This means the nodes file must
be consistent on all nodes in a NAT gateway group.

Note that this script is not yet integrated, so there are no behaviour
or documentation changes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-01-25 07:18:25 +01:00
Mathieu Parent
c315fce17e Fix various spelling errors
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Nov  6 13:43:45 CET 2015 on sn-devel-104
2015-11-06 13:43:45 +01:00
Amitay Isaacs
951431910d ctdb-recoverd: Add parallel database recovery helper
Parallel database recovery fixes the samba/ctdb deadlock during recovery.

Many times samba tries to grab multiple record locks in sequence.
Consider a case when samba is already holding a record lock on a database
and tries to get a record lock on second database.  If the second record
is not available on the local node, samba asks ctdb to migrate the record.
If recovery occurs at this time (e.g. node becoming inactive), ctdb
cannot freeze all the databases since samba is already holding a lock
and waiting for the second lock.  CTDB can process the second record
request only after the recovery is complete, thus causing a deadlock.

In parallel database recovery, each database is frozen and recovered
independent from each other.  So as soon as the second database is
recovered, CTDB will resend all the pending migration requests and Samba
can get the second lock.  Once samba releases both the locks, ctdb can
freeze the first database and recover it completing recovery process.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-10-07 14:53:29 +02:00
Amitay Isaacs
facd3c864e ctdb-packaging: Package public library and header for tevent-unix-util
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-10-07 14:53:28 +02:00
Amitay Isaacs
100917b169 ctdb-packaging: Install header files in ctdb subdirectory
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-10-07 14:53:28 +02:00