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

299 Commits

Author SHA1 Message Date
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
Amitay Isaacs
90b633ea79 ctdb-build: Do not mark ctdb private headers public
These headers are used by the server code and should not be marked public.
Samba builds against the in-tree version of the headers and should not
be built with externally installed CTDB.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-10-07 14:53:28 +02:00
Martin Schwenke
8c2948eba5 ctdb-scripts: Drop 62.cnfs eventscript
To get a similar effect just do something like this:

  mmaddcallback ctdb-disable-on-quorumLoss \
    --command /usr/bin/ctdb \
    --event quorumLoss --parms "disable"

  mmaddcallback ctdb-enable-on-quorumReached \
    --command /usr/bin/ctdb \
    --event quorumReached --parms "enable"

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-09-15 08:56:20 +02:00
Martin Schwenke
47f7d1b1c8 ctdb-scripts: Rename 40.fs_use to 05.system
Will put all the system monitoring in here, simplifying 00.ctdb.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-08-29 17:06:25 +02:00
Martin Schwenke
b0bc4d2cab ctdb-scripts: Move 60.nfs Ganesha callout to doc/examples/
We don't expect to maintain an up-to-date copy.  NFS Ganesha team
might provide patches.

Also move the Ganesha .check file

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-21 07:54:09 +02:00
Martin Schwenke
bb7093ab09 ctdb-scripts: Add portmapper NFS .check file
Unhealthy after 1 failed attempt to contact the portmapper.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-14 09:57:18 +02:00
Martin Schwenke
6586651508 ctdb-scripts: Remove 60.ganesha, replace with callout for 60.nfs
This isn't a straightforward move of code from 60.ganesha to the
callout.  Simplifications have been made to allow better
interoperation with the new NFS checking logic.

The following configuration variables have been removed:

  CTDB_GANESHA_REC_SUBDIR

    Edit NFS ganesha callout to change this location

  CTDB_NFS_SERVER_MODE, NFS_SERVER_MODE

    Use CTDB_NFS_CALLOUT instead

  CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK, CTDB_SKIP_GANESHA_NFSD_CHECK

    Disable the corresponding .check file instead

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-14 09:57:18 +02:00
Martin Schwenke
9c87d1dd29 ctdb-scripts: Parameterise 60.nfs with $CTDB_NFS_CALLOUT
The goal is to have a single NFS eventscript.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-14 09:57:18 +02:00
Martin Schwenke
74428e5c14 ctdb-scripts: Switch NFS checks to new style
Note that the 60.ganesha RPC checks need to be identical to those in
the nfs-checks.d/ directory.  This is because the NFS unit test
infrastructure checks output against what should be produced by the
checks in nfs-checks.d/.  This is a minor issue, since one of the aims
of this work is to remove the need for a separate 60.ganesha.

In most cases configuration variable CTDB_NFS_DUMP_STUCK_THREADS is
now ignored.  This is now handled by passing the desired number of
threads to the command specified in the service_debug_cmd variable in
a .check file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-14 09:57:18 +02:00
Amitay Isaacs
6c4e3cf1a9 ctdb-packaging: Package private libraries
Remove the private libraries from builtin_libraries and package them
instead.

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): Wed Jul  1 07:19:43 CEST 2015 on sn-devel-104
2015-07-01 07:19:43 +02:00
Martin Schwenke
3b25face87 ctdb-scripts: New eventscript 10.external
This is an alternative to 10.interface and is installed as disabled by
default.  It should only be used with DisableIPFailover=yes and when
IP failover is being handled externally.  In this mode CTDB can be
informed of public IP address movements using "ctdb moveip".

During the "startup" event, this eventscript currently finds any
public IP addresses configured in $CTDB_PUBLIC_ADDRESSES and tells
CTDB which node they are on using "ctdb moveip".  This allows CTDB to
send ARPs and tickle-ACKs.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-05-13 06:42:13 +02:00
Martin Schwenke
88b24858d8 ctdb-build: Fix handling of public headers
Add the header munging, add/package ctdb_version.h, create
directory include/public.

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 Oct  6 14:56:07 CEST 2014 on sn-devel-104
2014-10-06 14:56:06 +02:00
Martin Schwenke
59c3025706 ctdb-build: Change from ctdb-util to samba-util
Remove local lib/util and lib/tdb-wrap. Update wscript, packaging and
includes.h.

The only potentially surprising thing here is a fake samba-util
subsystem that just depends on samba-util-core.  As explained in a
comment:

  When a combined build is implemented, CTDB will wanted to build
  against samba-util rather than samba-util-core.  Similarly, other
  Samba subsystems expect samba-util.  So, for a standalone build,
  just define a fake samba-util subsystem that pulls in
  samba-util-core.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-10-06 12:34:33 +02:00
Amitay Isaacs
efd34bb274 ctdb-doc: Add ctdb-statistics manual page
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-09-12 08:46:15 +02:00
Martin Schwenke
05f08d5148 ctdb-build: Don't try to set lib64 directory automatically in build
Just install into lib/ and let packagers decide on this policy, since
it can vary between distributions.  Update our packaging files
accordingly.

A secondary matter is that things are incorrectly installed into
lib64/ when building with 32-bit userspace on a 64-bit kernel.  If
this is done then it should depend on the architecture of the
compiler.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Amitay Isaacs
fefb3a718f ctdb-packaging: Minimum required tevent library is 0.9.16
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-06-30 09:06:12 +02:00
Amitay Isaacs
c3dc1f1b98 ctdb-packaging: Remove unused files
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:10 +02:00
Amitay Isaacs
6e078c90a8 ctdb-packaging: Modify spec file to use waf build instead of autoconf
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:10 +02:00
Amitay Isaacs
ae32b297c2 ctdb-packaging: Fix date/days in changelog
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:10 +02:00
Amitay Isaacs
69324b61f0 ctdb-daemon: Add helper process to execute event scripts
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-01-16 12:11:37 +11:00
Michael Adam
c65ad56d40 ctdb:packaging:RPM: don't run autogen.
autogen is already run in maketarball.sh which generates
the tarball for the RPM.

This way, we don't have a rpm build dependency on autoconf.
Recent changes introduced a dependency into autoconf
version >= 2.60, so this fix allows the generated
source RPM to be built also on older platforms.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-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 Dec  9 05:47:00 CET 2013 on sn-devel-104
2013-12-09 05:47:00 +01:00
Michael Adam
7dbb068aa7 ctdb:packaging:RPM: package the new manpages
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2013-12-09 10:35:50 +11:00
Amitay Isaacs
c330df8552 doc/examples: Add CTDB configuration examples
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 6a5469a63547029f4fc704a4d4075543e06c36d1)
2013-10-24 16:57:16 +11:00
Mathieu Parent
0e80ca24f3 Add missing events.d/99.timeout
(This used to be ctdb commit 1f6cc8764e28058c56d0350147032b6e30cb355d)
2013-10-24 16:54:07 +11:00
Amitay Isaacs
7a8337a01d libctdb: Remove incomplete libctdb
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit c5a7f2b4ff011e1393c4ff34864f85e6b472ff07)
2013-10-04 15:15:35 +10:00