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

299 Commits

Author SHA1 Message Date
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
cd7f401744 ctdb-mkversion: Support external VERSION specification
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-20 23:38:09 +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
Martin Schwenke
609fee6135 ctdb:build: Update mkversion.sh to use samba-* tags
To test CTDB on a cluster we need to be able to build test RPMs with
relatively sane version numbers.  This is a minimal change to allow
that to happen, until CTDB is integrated into the Samba build system.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2013-11-28 07:31:12 +01: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
Martin Schwenke
aecd66d0a0 packaging: Remove pushd/popd from maketarball.sh, don't need bash
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3ffca990a18cbd31c8bd3ae01c6671d60da58f58)
2013-08-22 17:00:20 +10:00
Martin Schwenke
6f9090648a packaging: Allow setting custom release number in RPM spec file
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 867afb247bd8cc86c8d738f051a44cc534cafacf)
2013-08-09 11:07:37 +10:00
Amitay Isaacs
5f0b19c6f7 packaging: Bundle debug_locks.sh script in RPM
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 5740155cc5de1a223412e8529aa1a383a5412514)
2013-07-16 12:59:50 +10:00
Martin Schwenke
e4d99cc899 packaging: Add systemd support
Based on an original patch by Sumit Bose <sbose@redhat.com>.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit e43a4b7b69a21c4cec2453dcac436b64bf5d7f06)
2013-07-10 18:14:33 +10:00
Martin Schwenke
adbee6ae4e initscript: Simpify initscript and control CTDB via new ctdbd_wrapper
Currently the initscript is very complex.  This makes it hard to read
and hard to add support for new init systems, such as systemd.

Create a wrapper called ctdbd_wrapper to be installed alongside ctdbd.
This is called by the initscript to start and stop ctdbd.  It does the
ctdbd option construct and waits until ctdbd is properly initialised
before it exits.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit e3abc7eebab5cceddc4ce7817890dd5db9be3450)
2013-07-10 15:19:27 +10:00
Amitay Isaacs
3dcdd39801 packaging: When building with system libraries, add dependency for them
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 8225b3e77e140db34b52571a95d553d1e59e3f1e)
2013-07-10 14:33:18 +10:00
Amitay Isaacs
a11e8ab75a packaging: Enable compiler optimizations
This reverts d09570c70551aa40390ce9ceffe7bc234e1afafe.

... hoping the segv has been found in last 6 years. :-)

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 9b529189f8456fad7868fc154ae27a6fd87e93b3)
2013-07-04 20:43:52 +10:00
Amitay Isaacs
b169182ff2 packaging: Allow building RPMs with system tdb/talloc/tevent
To build CTDB RPMs with system installed libraries, use following command:

  ./packaging/RPM/makerpms.sh \
    --with system_talloc \
    --with system_tdb \
    --with system_tevent

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit bb54f3924ff19cd089b0a166fe8368db162ad709)
2013-07-04 20:41:51 +10:00
Amitay Isaacs
ae03a5e3ee packaging: Do not mark /etc/ctdb/functions as configuration file
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 1b0faae9c939a2f8da3cacba715ca62a5830d190)
2013-07-04 16:49:22 +10:00
Amitay Isaacs
71930e12b5 packaging: Install README.notify.d using %doc directive
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 53d34eb2f9e5434dea4e7182b6af566a3a96a368)
2013-07-04 16:49:15 +10:00
Amitay Isaacs
4a7f01f37e packaging: Install docs using %doc directive
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 6fe584d05543eebd24abd19bab502dc4da04e921)
2013-07-04 16:49:06 +10:00
Amitay Isaacs
dfa845151a packaging: Remove ctdb_transaction from docdir
It's bundled in ctdb-tests package.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 7e53fbf92b6dd5211d918ea0e23126b7dfa50c42)
2013-07-04 14:30:46 +10:00
Amitay Isaacs
585a2715a6 packaging: Update the minimum required library versions
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 5f8547b1531bba4950b3d873a997585c3a16d31e)
2013-06-17 10:44:31 +10:00
Martin Schwenke
7adf52e6b3 packaging: Create separate package for pcp pmda
To build ctdb-pcp-pmda package, run packaging/RPM/makerpms.sh script with
"--with pmda" option.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 85e11b9b13b3add88c1b8957be51793cc1db4f2d)
2013-05-28 14:24:16 +10:00
Martin Schwenke
2d3d5c133e packaging: makerpms.sh can take multiple arguments for rpmbuild
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f2ef3510407fbad29908195c58e4160d5a81e8a4)
2013-05-27 15:15:25 +10:00
Amitay Isaacs
30aa825c1e locking: Add a standalone helper to lock record/db
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a08b6ac19506160f3fb5925ea025027dce07781d)
2013-05-24 09:06:39 +10:00
Amitay Isaacs
6d0c388e5c build: Rename version.h to ctdb_version.h
This avoids clash with version.h from Samba tree.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit d18fcfff674e876abde8d51afec92d9c4a090d2f)
2013-05-23 16:18:23 +10:00
Martin Schwenke
ce145ab65e Packaging: maketarball.sh should be a bash script due to pushd use
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3105f9e291d0792199ac9e689f6d0e0a47ee4b0d)
2013-05-23 16:18:23 +10:00
Martin Schwenke
bb39f0a186 scripts: Rework notify.sh to use notify.d/ directory
This makes it easier to add notification handlers.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d29e9a420b133088bf23a847c8d1dbce56c25eb0)
2013-05-23 16:18:23 +10:00
Martin Schwenke
434f9e8594 eventscripts: 60.nfs uses nfs_check_rpc_services() to check NFS RPC services
* New directory nfs-rpc-checks.d/ replaces hardcoded rules in 60.nfs

* Installation and packaging additions to handle nfs-rpc-checks.d/

* Unit test updates, including deleting 1 test that sanity checked
  test infrastructure

* Test infrastructure changes to use nfs-rpc-checks.d/

Note that this removes support for $CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK in
60.nfs.  To get the equivalent behaviour, edit 20.nfsd.check and
remove/comment all lines.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7e792d6768d9ca420ce3713cb122e63afd594b15)
2013-05-07 12:55:09 +10:00
Amitay Isaacs
d931e73fb8 statd-callout: Make sure statd callout script always runs as root
In RHEL 6+, rpc.statd runs as "rpcuser" instead of root as on RHEL 5. This
prevents CTDB tool commands talking to daemon since "rpcuser" cannot access
CTDB socket.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fe8c4880b371492a38554868d4ca10918c54e412)
2013-04-08 11:14:28 +10:00
Amitay Isaacs
79aeac6bfe packaging: Use maketarball.sh script to create tarball for RPM
This removes the duplicate code for building tarball and reuses existing
script.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 16a91c2a4d03b46743611e2fe844bb2cef95e46a)
2012-10-30 18:01:38 +11:00
Amitay Isaacs
49bddd6f1e packaging: Use optional argument as targetdir when creating tarball
In addition, do not modify CTDB version string with extra suffix.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 3d4838db51dd8199b9c29aebb6e7bfbd2a27b8bb)
2012-10-30 15:58:14 +11:00
Amitay Isaacs
b0f90052cb tool/ctdb: Always support ctdb version command, don't make it optional
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit f8af7d8de76e68e5c4bde15f832a31ce9107e8c7)
2012-10-30 11:56:00 +11:00
Amitay Isaacs
92207245ba packaging: Create include/version.h to define CTDB_VERSION_STRING
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit b151f9b62299ec5b887c62cef780547a39c0ba9d)
2012-10-30 11:55:59 +11:00
Amitay Isaacs
42d8e379fe packaging: Bundle README, COPYING and html version of manpages
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 6871415f6cb50c4f9753067359f0e264d3f93871)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
231898db1f packaging: Use common code to generate VERSION string
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0019291371af1e63ee132ed173ba7f52a0291a44)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
5ea3a56b62 packaging: Factor out the code to genreate VERSION string
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 19fb26346567d2249b1237f92d871022db2ba8cd)
2012-10-22 18:15:17 +11:00
Amitay Isaacs
68b32e53ce packaging: Build docs and include them in tarball
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 69f0473b72aadab5bd5791ccff2facd0cd469d43)
2012-10-22 18:15:17 +11:00
Martin Schwenke
8d7562f3f8 common: Debug ctdb_addr_to_str() using new function ctdb_external_trace()
We've seen this function report "Unknown family, 0" and then CTDB
disappeared without a trace.  If we can reproduce it then this might
help us to debug it.

The idea is that you do something like the following in /etc/sysconfig/ctdb:

  export CTDB_EXTERNAL_TRACE="/etc/ctdb/config/gcore_trace.sh"

When we hit this error than we call out to gcore to get a core file so
we can do forensics.  This might block CTDB for a few seconds.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7895bc003f087ab2f3181df3c464386f59bfcc39)
2012-10-18 20:05:42 +11:00
Martin Schwenke
f3ae31e741 Eventscripts: split 50.samba into 49.winbind and 50.samba
winbind and samba can be separately managed.  This makes the service
starting and stopping code way too complicated, and even adds a small
amount of complexity to the monitoring code.  The sensible option is
to split this eventscript in two.

There are two potentially backward incompatible changes here:

* Functionality has been removed that allowed 50.samba to manage
  winbind when CTDB_MANAGES_WINBIND was unset but the smb.conf
  "security" parameter was set to "ADS" or "DOMAIN".

  Maintaining this functionality would have required moving the
  testparm-related code to the functions file, deciding where the
  cache file should go, and then calling it from both 49.winbind and
  50.samba.  This feature wasn't of great value and asking
  administrators to set an extra variable in exchange for code
  simplicity seems like a reasonable deal.

* External code will need to be changed if it calls 50.samba directly
  with winbind-related expectations.  This is fairly obvious!

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 34535ae64420926b9a3bf7d453fed4e6f4c90115)
2012-10-03 08:46:32 +10:00
Amitay Isaacs
569da46e3c packaging: make ctdb-tests package depend on nc
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit d0b539c4d2d4dc8c9eb95801bff09c3bcbeebca5)
2012-05-25 15:25:29 +10:00
Ronnie Sahlberg
dce5969d12 Debug: When scripts hang, we may need to collect additional data in order to debug why the script hung.
Break this debug and datacollection out into an external script to make it easier to modify what data we need to collect.
For now we only collect a pstree so we can see what part of the script we hung in.

S1037271

(This used to be ctdb commit 6e68797af67bee36f2bad045f94806e7e98f27e9)
2012-05-17 10:29:03 +10:00