[SCM] Samba Shared Repository - branch master updated
Amitay Isaacs
amitay at samba.org
Wed Jul 11 12:48:03 UTC 2018
The branch, master has been updated
via 4628afa ctdb-scripts: Provide a gstack function if gstack is not available
via 451c6b6 ctdb-tests: Drop residual CTDB_MANAGED_<service> variables
via e081caf ctdb-scripts: Drop event script CTDB_MANAGED_<service> variables
via c08c95c ctdb-tests: Drop event script tests where CTDB_MANAGED_<service>=no
via a757e07 ctdb-tests: Ensure some event scripts are enabled for cluster tests
via 8fe6a02 ctdb-packaging: Enable some standard event scripts if none are enabled
via 0937ce0 ctdb-build: Enable some standard event scripts if none are enabled
via 06be1c8 ctdb-build: Install event scripts in CTDB_DATADIR
via a3610d1 ctdb-tests: Clean up define_test() for event scripts
via f029e2a ctdb-tests: Drop an unused case
via 19071ac ctdb-tests: New install path CTDB_SCRIPT_DATA_DIR
via 15c6552 ctdb-tools: All ctdb event commands to run without ctdbd
via 2546c43 ctdb-event: Allow tool to enable/disable scripts without daemon
via 6742bf6 ctdb-event: Update event tool to handle symbolic links
via 3bebc5d ctdb-common: Add path support for datadir
via be1c340 ctdb-build: Add CTDB_DATADIR
via 7c4848a ctdb-daemon: Drop the noiphost "node flags" bitmap
via 709ef6b7 ctdb-daemon: Stop inactive/disabled nodes from reporting available IPs
via fda0591 ctdb-daemon: Drop plumbing for obsolete tunable NoIPHostOnAllDisabled
via 070469b ctdb-daemon: Mark NoIPHostOnAllDisabled tunable as obsolete
via d0739b2 ctdb-daemon: Change default for tunable NoIPHostOnAllDisabled to 1
via b20c917 ctdb-tests: Setup public addresses in 60.nfs unit tests
via 1061f48 ctdb-tests: Replace hardcoded IP address in test results
from 094c239 WHATSNEW: Add more text about work done by Catalyst developers
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 4628afa3f563924434ccae9918cf60778b8ab91f
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Dec 2 20:06:25 2017 +1100
ctdb-scripts: Provide a gstack function if gstack is not available
gstack isn't widely available, so provide a simple function that does
the same thing if it gstack can't be found.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
Autobuild-Date(master): Wed Jul 11 14:47:21 CEST 2018 on sn-devel-144
commit 451c6b668fb076eb0bb99ad70cf1546c4450cc5d
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 20:16:42 2018 +1000
ctdb-tests: Drop residual CTDB_MANAGED_<service> variables
These no longer do anything.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit e081cafc9c4fcf5c8cfc0032e3c73eb145a09a9e
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 20:06:47 2018 +1000
ctdb-scripts: Drop event script CTDB_MANAGED_<service> variables
Enable required event scripts to manage services.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit c08c95c9e5b091bf77ff6e8ced0a7bf1e0e82f74
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 19:58:38 2018 +1000
ctdb-tests: Drop event script tests where CTDB_MANAGED_<service>=no
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit a757e07600d38692c600847d8a169936a7268f4b
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 22:07:54 2018 +1000
ctdb-tests: Ensure some event scripts are enabled for cluster tests
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 8fe6a0274bdd1f40f2c38462f23ca876807f6fd9
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 15:58:06 2018 +1000
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 at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 0937ce04222ee726a2ca7d87e3b2bf176b883340
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 15:23:27 2018 +1000
ctdb-build: 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.
Only do this for a direct install. If DESTDIR is being used then
assume a package is being built and let the packager handle this case.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 06be1c8593fc84068896b428bdc39e7033bd85e2
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Jul 6 16:38:43 2018 +1000
ctdb-build: Install event scripts in CTDB_DATADIR
Signed-off-by: Martin Schwenke <martin at meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit a3610d1cbcebb0fe81505d42276604804a112d9a
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 13:46:34 2018 +1000
ctdb-tests: Clean up define_test() for event scripts
Factor out a little bit of common code. More coming.
Most of this is whitespace changes.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit f029e2a76debaf663c40537bd850918802bfd1e0
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 13:55:07 2018 +1000
ctdb-tests: Drop an unused case
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 19071ac8ad93111f50fc45be9731cd7f03a80a08
Author: Martin Schwenke <martin at meltin.net>
Date: Sat Jul 7 13:43:32 2018 +1000
ctdb-tests: New install path CTDB_SCRIPT_DATA_DIR
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 15c6552aa92c03a12de816b187b3f0fe0ca7d64c
Author: Martin Schwenke <martin at meltin.net>
Date: Sun Jul 8 09:05:11 2018 +1000
ctdb-tools: All ctdb event commands to run without ctdbd
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 2546c439599565f33e4c905d1c73858026e37439
Author: Martin Schwenke <martin at meltin.net>
Date: Sun Jul 8 09:02:44 2018 +1000
ctdb-event: Allow tool to enable/disable scripts without daemon
Only open the client socket when it is needed. Note that this only
works for enabling/disabling event scripts via symlinks.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 6742bf6cf65cf40b54910ee254a3e863be141e85
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Jul 6 17:51:27 2018 +1000
ctdb-event: Update event tool to handle symbolic links
Supports the case when scripts are installed in the data directory and
are linked to when enabled.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 3bebc5d8a034f085bd53d7169a69129851b8f140
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Jul 6 17:14:27 2018 +1000
ctdb-common: Add path support for datadir
Signed-off-by: Martin Schwenke <martin at meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit be1c3400587ccf4f04fa56f438cf815a12e04326
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Jul 6 16:37:55 2018 +1000
ctdb-build: Add CTDB_DATADIR
Signed-off-by: Martin Schwenke <martin at meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 7c4848a4b3c7b073727f633863e0a92d413c3513
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Jun 18 17:00:57 2018 +1000
ctdb-daemon: Drop the noiphost "node flags" bitmap
This is no longer needed because inactive/disabled nodes no longer
report any available public IP addresses.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 709ef6b7cc63ad272b959404d755af82c56d4ea0
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Jun 18 16:22:14 2018 +1000
ctdb-daemon: Stop inactive/disabled nodes from reporting available IPs
This can be done now that NoIPHostOnAllDisabled is gone and will allow
the public IP address failover logic to be simplified.
In the test code, still filter available IP addresses by node state.
This code can't currently read information about available IP
addresses but that will change in future
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit fda059108356bb97168f2cc61d94a18098cab0c4
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Jun 18 16:06:18 2018 +1000
ctdb-daemon: Drop plumbing for obsolete tunable NoIPHostOnAllDisabled
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 070469beb812501dd44847b7facc9dfab436616c
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Jun 18 16:05:44 2018 +1000
ctdb-daemon: Mark NoIPHostOnAllDisabled tunable as obsolete
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit d0739b2ea81140f6514a8a48dd2ce5184f6bdb54
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Jun 18 15:01:01 2018 +1000
ctdb-daemon: Change default for tunable NoIPHostOnAllDisabled to 1
Defaulting to host public IP addresses when all nodes are unhealthy
does not obey the principle of least surprise. It has caused much
confusion over the years. It often leads to problems when all nodes
are unhealthy due to something like a cluster filesystem being
unmounted.
Change the default value for this tunable as the first step of
completely removing this behaviour.
Remove tests that set NoIPHostOnAllDisabled=1 and update the expected
result for other tests where no nodes are healthy.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit b20c9173169659b948913c4e0480c50612b65e56
Author: Martin Schwenke <martin at meltin.net>
Date: Tue Jul 3 13:45:25 2018 +1000
ctdb-tests: Setup public addresses in 60.nfs unit tests
Even the monitor event runs update_tickles(), which needs public IP
addresses and FAKE_CTDB_NUMNODES to be initialised. Currently this
works by default but soon we'll need FAKE_CTDB_NUMNODES in another
context.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 1061f48d03e5f02d11ec302153fdf36209b15084
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jun 20 17:59:53 2018 +1000
ctdb-tests: Replace hardcoded IP address in test results
Parameterise them with a variable instead.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
-----------------------------------------------------------------------
Summary of changes:
ctdb/common/path.c | 24 ++++
ctdb/common/path.h | 2 +
ctdb/common/path_tool.c | 47 ++++++++
ctdb/common/tunable.c | 2 +-
ctdb/config/debug_locks.sh | 14 ++-
ctdb/config/events/README | 5 +-
ctdb/config/events/legacy/06.nfs.script | 2 -
ctdb/config/events/legacy/31.clamd.script | 2 -
ctdb/config/events/legacy/40.vsftpd.script | 2 -
ctdb/config/events/legacy/41.httpd.script | 2 -
ctdb/config/events/legacy/49.winbind.script | 4 -
ctdb/config/events/legacy/50.samba.script | 4 -
ctdb/config/events/legacy/60.nfs.script | 2 -
ctdb/config/events/legacy/70.iscsi.script | 2 -
ctdb/config/script.options | 10 +-
ctdb/doc/ctdb-script.options.5.xml | 116 ------------------
ctdb/doc/ctdb-tunables.7.xml | 20 +---
ctdb/doc/ctdb.1.xml | 1 -
ctdb/event/event_tool.c | 129 ++++++++++++++++++---
ctdb/packaging/RPM/ctdb.spec.in | 40 +++++--
ctdb/server/ctdb_takeover.c | 6 +
ctdb/server/ctdb_takeover_helper.c | 5 +-
ctdb/server/ipalloc.c | 61 ----------
ctdb/server/ipalloc.h | 4 -
ctdb/server/ipalloc_common.c | 4 -
ctdb/server/ipalloc_private.h | 2 -
ctdb/tests/complex/00_ctdb_init.sh | 24 ++++
ctdb/tests/cunit/path_tests_001.sh | 10 ++
ctdb/tests/eventd/etc-ctdb/events/data/README | 1 +
.../etc-ctdb/share/events/data/01.dummy.script | 6 +
ctdb/tests/eventd/eventd_009.sh | 38 ++++++
ctdb/tests/eventscripts/10.interface.011.sh | 4 +-
ctdb/tests/eventscripts/10.interface.012.sh | 8 +-
ctdb/tests/eventscripts/10.interface.013.sh | 22 ++--
ctdb/tests/eventscripts/31.clamd.monitor.001.sh | 15 ---
ctdb/tests/eventscripts/31.clamd.monitor.002.sh | 1 -
ctdb/tests/eventscripts/31.clamd.monitor.003.sh | 1 -
ctdb/tests/eventscripts/40.vsftpd.monitor.001.sh | 11 --
ctdb/tests/eventscripts/40.vsftpd.monitor.002.sh | 4 -
ctdb/tests/eventscripts/40.vsftpd.shutdown.001.sh | 10 --
ctdb/tests/eventscripts/40.vsftpd.shutdown.002.sh | 4 -
ctdb/tests/eventscripts/40.vsftpd.startup.001.sh | 10 --
ctdb/tests/eventscripts/40.vsftpd.startup.002.sh | 4 -
ctdb/tests/eventscripts/41.httpd.monitor.001.sh | 11 --
ctdb/tests/eventscripts/41.httpd.monitor.002.sh | 4 -
ctdb/tests/eventscripts/41.httpd.shutdown.001.sh | 10 --
ctdb/tests/eventscripts/41.httpd.shutdown.002.sh | 4 -
ctdb/tests/eventscripts/41.httpd.startup.001.sh | 10 --
ctdb/tests/eventscripts/41.httpd.startup.002.sh | 4 -
ctdb/tests/eventscripts/49.winbind.monitor.001.sh | 11 --
ctdb/tests/eventscripts/49.winbind.shutdown.001.sh | 10 --
ctdb/tests/eventscripts/49.winbind.shutdown.002.sh | 4 -
ctdb/tests/eventscripts/49.winbind.startup.001.sh | 10 --
ctdb/tests/eventscripts/49.winbind.startup.002.sh | 4 -
ctdb/tests/eventscripts/50.samba.monitor.001.sh | 11 --
ctdb/tests/eventscripts/60.nfs.monitor.001.sh | 11 --
ctdb/tests/eventscripts/scripts/06.nfs.sh | 4 +-
ctdb/tests/eventscripts/scripts/31.clamd.sh | 2 -
ctdb/tests/eventscripts/scripts/40.vsftpd.sh | 4 -
ctdb/tests/eventscripts/scripts/41.httpd.sh | 4 -
ctdb/tests/eventscripts/scripts/49.winbind.sh | 8 --
ctdb/tests/eventscripts/scripts/50.samba.sh | 8 --
ctdb/tests/eventscripts/scripts/60.nfs.sh | 9 +-
ctdb/tests/eventscripts/scripts/local.sh | 77 ++++++------
ctdb/tests/scripts/integration.bash | 20 ++++
ctdb/tests/scripts/script_install_paths.sh | 5 +-
ctdb/tests/shellcheck/event_scripts.sh | 2 +-
ctdb/tests/simple/00_ctdb_init.sh | 4 +
ctdb/tests/src/ctdb_takeover_tests.c | 22 ++--
ctdb/tests/src/fake_ctdbd.c | 4 +-
ctdb/tests/takeover/lcp2.014.sh | 18 +--
ctdb/tests/takeover/lcp2.015.sh | 18 +--
ctdb/tests/takeover/lcp2.016.sh | 18 +--
ctdb/tests/takeover/lcp2.017.sh | 32 -----
ctdb/tests/takeover/lcp2.018.sh | 32 -----
ctdb/tests/takeover/lcp2.019.sh | 32 -----
ctdb/tests/takeover/lcp2.022.sh | 36 ------
ctdb/tests/takeover/lcp2.023.sh | 97 ----------------
ctdb/tests/takeover/lcp2.026.sh | 33 ------
ctdb/tests/takeover_helper/014.sh | 12 +-
ctdb/tests/takeover_helper/015.sh | 39 -------
ctdb/tests/takeover_helper/020.sh | 36 ------
ctdb/tests/tool/ctdb.listvars.001.sh | 1 -
ctdb/tools/ctdb.c | 4 +-
ctdb/wscript | 42 ++++++-
85 files changed, 504 insertions(+), 908 deletions(-)
create mode 100755 ctdb/tests/complex/00_ctdb_init.sh
create mode 100644 ctdb/tests/eventd/etc-ctdb/events/data/README
create mode 100755 ctdb/tests/eventd/etc-ctdb/share/events/data/01.dummy.script
create mode 100755 ctdb/tests/eventd/eventd_009.sh
delete mode 100755 ctdb/tests/eventscripts/31.clamd.monitor.001.sh
delete mode 100755 ctdb/tests/eventscripts/40.vsftpd.monitor.001.sh
delete mode 100755 ctdb/tests/eventscripts/40.vsftpd.shutdown.001.sh
delete mode 100755 ctdb/tests/eventscripts/40.vsftpd.startup.001.sh
delete mode 100755 ctdb/tests/eventscripts/41.httpd.monitor.001.sh
delete mode 100755 ctdb/tests/eventscripts/41.httpd.shutdown.001.sh
delete mode 100755 ctdb/tests/eventscripts/41.httpd.startup.001.sh
delete mode 100755 ctdb/tests/eventscripts/49.winbind.monitor.001.sh
delete mode 100755 ctdb/tests/eventscripts/49.winbind.shutdown.001.sh
delete mode 100755 ctdb/tests/eventscripts/49.winbind.startup.001.sh
delete mode 100755 ctdb/tests/eventscripts/50.samba.monitor.001.sh
delete mode 100755 ctdb/tests/eventscripts/60.nfs.monitor.001.sh
delete mode 100755 ctdb/tests/takeover/lcp2.017.sh
delete mode 100755 ctdb/tests/takeover/lcp2.018.sh
delete mode 100755 ctdb/tests/takeover/lcp2.019.sh
delete mode 100755 ctdb/tests/takeover/lcp2.022.sh
delete mode 100755 ctdb/tests/takeover/lcp2.023.sh
delete mode 100755 ctdb/tests/takeover/lcp2.026.sh
delete mode 100755 ctdb/tests/takeover_helper/015.sh
delete mode 100755 ctdb/tests/takeover_helper/020.sh
Changeset truncated at 500 lines:
diff --git a/ctdb/common/path.c b/ctdb/common/path.c
index 4e69739..36706e4 100644
--- a/ctdb/common/path.c
+++ b/ctdb/common/path.c
@@ -28,15 +28,18 @@
struct {
char *basedir;
+ char datadir[PATH_MAX];
char etcdir[PATH_MAX];
char rundir[PATH_MAX];
char vardir[PATH_MAX];
bool test_mode;
bool basedir_set;
+ bool datadir_set;
bool etcdir_set;
bool rundir_set;
bool vardir_set;
} ctdb_paths = {
+ .datadir = CTDB_DATADIR,
.etcdir = CTDB_ETCDIR,
.rundir = CTDB_RUNDIR,
.vardir = CTDB_VARDIR,
@@ -94,6 +97,22 @@ static bool path_construct(char *path, const char *subdir)
return true;
}
+const char *path_datadir(void)
+{
+ bool ok;
+
+ if (! ctdb_paths.datadir_set) {
+ ok = path_construct(ctdb_paths.datadir, "share");
+ if (!ok) {
+ D_ERR("Failed to construct DATADIR\n");
+ } else {
+ ctdb_paths.datadir_set = true;
+ }
+ }
+
+ return ctdb_paths.datadir;
+}
+
const char *path_etcdir(void)
{
bool ok;
@@ -142,6 +161,11 @@ const char *path_vardir(void)
return ctdb_paths.vardir;
}
+char *path_datadir_append(TALLOC_CTX *mem_ctx, const char *path)
+{
+ return talloc_asprintf(mem_ctx, "%s/%s", path_datadir(), path);
+}
+
char *path_etcdir_append(TALLOC_CTX *mem_ctx, const char *path)
{
return talloc_asprintf(mem_ctx, "%s/%s", path_etcdir(), path);
diff --git a/ctdb/common/path.h b/ctdb/common/path.h
index 370250a..dcc6c20 100644
--- a/ctdb/common/path.h
+++ b/ctdb/common/path.h
@@ -22,10 +22,12 @@
#include <talloc.h>
+const char *path_datadir(void);
const char *path_etcdir(void);
const char *path_rundir(void);
const char *path_vardir(void);
+char *path_datadir_append(TALLOC_CTX *mem_ctx, const char *path);
char *path_etcdir_append(TALLOC_CTX *mem_ctx, const char *path);
char *path_rundir_append(TALLOC_CTX *mem_ctx, const char *path);
char *path_vardir_append(TALLOC_CTX *mem_ctx, const char *path);
diff --git a/ctdb/common/path_tool.c b/ctdb/common/path_tool.c
index 339066b..1c60b02 100644
--- a/ctdb/common/path_tool.c
+++ b/ctdb/common/path_tool.c
@@ -100,6 +100,49 @@ static int path_tool_socket(TALLOC_CTX *mem_ctx,
return 0;
}
+static int path_tool_datadir(TALLOC_CTX *mem_ctx,
+ int argc,
+ const char **argv,
+ void *private_data)
+{
+ struct path_tool_context *ctx = talloc_get_type_abort(
+ private_data, struct path_tool_context);
+
+ if (argc != 0) {
+ cmdline_usage(ctx->cmdline, "datadir");
+ return EINVAL;
+ }
+
+ printf("%s\n", path_datadir());
+
+ return 0;
+}
+
+static int path_tool_datadir_append(TALLOC_CTX *mem_ctx,
+ int argc,
+ const char **argv,
+ void *private_data)
+{
+ struct path_tool_context *ctx = talloc_get_type_abort(
+ private_data, struct path_tool_context);
+ char *p;
+
+ if (argc != 1) {
+ cmdline_usage(ctx->cmdline, "datadir append");
+ return EINVAL;
+ }
+
+ p = path_datadir_append(mem_ctx, argv[0]);
+ if (p == NULL) {
+ D_ERR("Memory allocation error\n");
+ return 1;
+ }
+
+ printf("%s\n", p);
+
+ return 0;
+}
+
static int path_tool_etcdir(TALLOC_CTX *mem_ctx,
int argc,
const char **argv,
@@ -236,6 +279,10 @@ struct cmdline_command path_commands[] = {
"Get path of CTDB daemon pidfile", "<daemon>" },
{ "socket", path_tool_socket,
"Get path of CTDB daemon socket", "<daemon>" },
+ { "datadir append", path_tool_datadir_append,
+ "Get path relative to CTDB DATADIR", "<path>" },
+ { "datadir", path_tool_datadir,
+ "Get path of CTDB DATADIR", NULL },
{ "etcdir append", path_tool_etcdir_append,
"Get path relative to CTDB ETCDIR", "<path>" },
{ "etcdir", path_tool_etcdir,
diff --git a/ctdb/common/tunable.c b/ctdb/common/tunable.c
index 14f6828..4c1714c 100644
--- a/ctdb/common/tunable.c
+++ b/ctdb/common/tunable.c
@@ -141,7 +141,7 @@ static struct {
offsetof(struct ctdb_tunable_list, db_size_warn) },
{ "PullDBPreallocation", 10*1024*1024, false,
offsetof(struct ctdb_tunable_list, pulldb_preallocation_size) },
- { "NoIPHostOnAllDisabled", 0, false,
+ { "NoIPHostOnAllDisabled", 1, true,
offsetof(struct ctdb_tunable_list, no_ip_host_on_all_disabled) },
{ "Samba3AvoidDeadlocks", 0, true,
offsetof(struct ctdb_tunable_list, samba3_hack) },
diff --git a/ctdb/config/debug_locks.sh b/ctdb/config/debug_locks.sh
index 0867685..1f89cb7 100755
--- a/ctdb/config/debug_locks.sh
+++ b/ctdb/config/debug_locks.sh
@@ -12,6 +12,19 @@
. "${CTDB_BASE}/functions"
+# type is at least mentioned in POSIX and more is portable than which(1)
+# shellcheck disable=SC2039
+if ! type gstack >/dev/null 2>&1 ; then
+ gstack ()
+ {
+ _pid="$1"
+
+ gdb -batch --quiet -nx "/proc/${_pid}/exe" "$_pid" \
+ -ex "thread apply all bt" 2>/dev/null |
+ grep '^\(#\|Thread \)'
+ }
+fi
+
# Load/cache database options from configuration file
ctdb_get_db_options
@@ -72,7 +85,6 @@ ctdb_get_db_options
cat "/proc/${pid}/stack"
else
gstack "$pid"
- # gcore -o /var/log/core-deadlock-ctdb $pid
fi
done
fi
diff --git a/ctdb/config/events/README b/ctdb/config/events/README
index 88d5da4..766cb4f 100644
--- a/ctdb/config/events/README
+++ b/ctdb/config/events/README
@@ -68,8 +68,7 @@ startup
If the "startup" event fails then CTDB will retry it until it
succeeds. There is no limit on the number of retries.
- Example: 50.samba uses this event to start the Samba daemon if
- CTDB_MANAGES_SAMBA=yes.
+ Example: 50.samba uses this event to start the Samba daemon.
shutdown
@@ -80,7 +79,7 @@ shutdown
event and use it to stop the service.
Example: 50.samba uses this event to shut down the Samba
- daemon if CTDB_MANAGES_SAMBA=yes.
+ daemon.
monitor
diff --git a/ctdb/config/events/legacy/06.nfs.script b/ctdb/config/events/legacy/06.nfs.script
index 4e02906..97086f7 100755
--- a/ctdb/config/events/legacy/06.nfs.script
+++ b/ctdb/config/events/legacy/06.nfs.script
@@ -28,8 +28,6 @@ nfs_callout_pre ()
# shellcheck disable=SC2154
nfs_callout_init "$script_state_dir"
-[ "$CTDB_MANAGES_NFS" = "yes" ] || exit 0
-
case "$1" in
takeip)
nfs_callout_pre "$@"
diff --git a/ctdb/config/events/legacy/31.clamd.script b/ctdb/config/events/legacy/31.clamd.script
index e073608..3b19923 100755
--- a/ctdb/config/events/legacy/31.clamd.script
+++ b/ctdb/config/events/legacy/31.clamd.script
@@ -19,8 +19,6 @@ esac
load_script_options
-[ "$CTDB_MANAGES_CLAMD" = "yes" ] || exit 0
-
case "$1" in
startup)
service "$service_name" stop > /dev/null 2>&1
diff --git a/ctdb/config/events/legacy/40.vsftpd.script b/ctdb/config/events/legacy/40.vsftpd.script
index c2e0eda..69876d2 100755
--- a/ctdb/config/events/legacy/40.vsftpd.script
+++ b/ctdb/config/events/legacy/40.vsftpd.script
@@ -17,8 +17,6 @@ load_script_options
ctdb_setup_state_dir "service" "$service_name"
-[ "$CTDB_MANAGES_VSFTPD" = "yes" ] || exit 0
-
case "$1" in
startup)
service "$service_name" stop > /dev/null 2>&1
diff --git a/ctdb/config/events/legacy/41.httpd.script b/ctdb/config/events/legacy/41.httpd.script
index 4030d7c..3d67aee 100755
--- a/ctdb/config/events/legacy/41.httpd.script
+++ b/ctdb/config/events/legacy/41.httpd.script
@@ -43,8 +43,6 @@ service_stop ()
killall -q -9 $service_name || true
}
-[ "$CTDB_MANAGES_HTTPD" = "yes" ] || exit 0
-
case "$1" in
startup)
service_start
diff --git a/ctdb/config/events/legacy/49.winbind.script b/ctdb/config/events/legacy/49.winbind.script
index 07d4c1c..8b1c8b8 100755
--- a/ctdb/config/events/legacy/49.winbind.script
+++ b/ctdb/config/events/legacy/49.winbind.script
@@ -34,10 +34,6 @@ service_stop ()
###########################
-[ "$CTDB_MANAGES_WINBIND" = "yes" ] || exit 0
-
-###########################
-
case "$1" in
startup)
service_start
diff --git a/ctdb/config/events/legacy/50.samba.script b/ctdb/config/events/legacy/50.samba.script
index f65f53a..ce9e05f 100755
--- a/ctdb/config/events/legacy/50.samba.script
+++ b/ctdb/config/events/legacy/50.samba.script
@@ -147,10 +147,6 @@ list_samba_ports ()
###########################
-[ "$CTDB_MANAGES_SAMBA" = "yes" ] || exit 0
-
-###########################
-
case "$1" in
startup)
service_start
diff --git a/ctdb/config/events/legacy/60.nfs.script b/ctdb/config/events/legacy/60.nfs.script
index 51d8726..2eb90b4 100755
--- a/ctdb/config/events/legacy/60.nfs.script
+++ b/ctdb/config/events/legacy/60.nfs.script
@@ -253,8 +253,6 @@ nfs_update_lock_info ()
# shellcheck disable=SC2154
nfs_callout_init "$script_state_dir"
-[ "$CTDB_MANAGES_NFS" = "yes" ] || exit 0
-
case "$1" in
startup)
nfs_callout "$@" || exit $?
diff --git a/ctdb/config/events/legacy/70.iscsi.script b/ctdb/config/events/legacy/70.iscsi.script
index 670e0d7..0828d47 100755
--- a/ctdb/config/events/legacy/70.iscsi.script
+++ b/ctdb/config/events/legacy/70.iscsi.script
@@ -13,8 +13,6 @@ service_name="iscsi"
load_script_options
-[ "$CTDB_MANAGES_ISCSI" = "yes" ] || exit 0
-
[ -z "$CTDB_START_ISCSI_SCRIPTS" ] && {
echo "No iscsi start script directory found"
exit 0
diff --git a/ctdb/config/script.options b/ctdb/config/script.options
index 0c280c5..79e82af 100644
--- a/ctdb/config/script.options
+++ b/ctdb/config/script.options
@@ -1,22 +1,16 @@
-# For now, use script.options to demonstrate these options. The
-# CTDB_MANAGES_* variables will go away soon. See other *.options
-# examples for more specific examples.
+# For now, use script.options to demonstrate these options. See
+# *.options examples for more specific examples.
#
# Samba configuration
#
# 50.samba.options
-CTDB_MANAGES_SAMBA=yes
# CTDB_SAMBA_SKIP_SHARE_CHECK=yes
-# 49.winbind.options
-CTDB_MANAGES_WINBIND=yes
-
#
# NFS configuration
#
# 60.nfs.options
-CTDB_MANAGES_NFS=yes
CTDB_RPCINFO_LOCALHOST="127.0.0.1"
diff --git a/ctdb/doc/ctdb-script.options.5.xml b/ctdb/doc/ctdb-script.options.5.xml
index 22c5aa0..be8d4f4 100644
--- a/ctdb/doc/ctdb-script.options.5.xml
+++ b/ctdb/doc/ctdb-script.options.5.xml
@@ -565,20 +565,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
<varlistentry>
<term>
- CTDB_MANAGES_CLAMD=yes|no
- </term>
- <listitem>
- <para>
- Should CTDB manage ClamAV?
- </para>
- <para>
- Default is no.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
CTDB_CLAMD_SOCKET=<parameter>FILENAME</parameter>
</term>
<listitem>
@@ -596,52 +582,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
</refsect2>
<refsect2>
- <title>40.vsftpd</title>
-
- <para>
- Provides CTDB's vsftpd FTP service management.
- </para>
-
- <variablelist>
- <varlistentry>
- <term>CTDB_MANAGES_VSFTPD=yes|no</term>
- <listitem>
- <para>
- Should CTDB manage the vsftpd FTP server?
- </para>
- <para>
- Default is no.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2>
- <title>41.httpd</title>
-
- <para>
- Provides CTDB's Apache web service management.
- </para>
-
- <variablelist>
- <varlistentry>
- <term>
- CTDB_MANAGES_HTTPD=yes|no
- </term>
- <listitem>
- <para>
- Should CTDB manage the Apache web server?
- </para>
- <para>
- Default is no.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect2>
-
- <refsect2>
<title>49.winbind</title>
<para>
@@ -652,20 +592,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
<varlistentry>
<term>
- CTDB_MANAGES_WINBIND=yes|no
- </term>
- <listitem>
- <para>
- Should CTDB manage Winbind?
- </para>
- <para>
- Default is no.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
CTDB_SERVICE_WINBIND=<parameter>SERVICE</parameter>
</term>
<listitem>
@@ -693,20 +619,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
<varlistentry>
<term>
- CTDB_MANAGES_SAMBA=yes|no
- </term>
- <listitem>
- <para>
- Should CTDB manage Samba?
- </para>
- <para>
- Default is no.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
CTDB_SAMBA_CHECK_PORTS=<parameter>PORT-LIST</parameter>
</term>
<listitem>
@@ -787,20 +699,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
<varlistentry>
<term>
- CTDB_MANAGES_NFS=yes|no
- </term>
- <listitem>
- <para>
- Should CTDB manage NFS?
- </para>
- <para>
- Default is no.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
CTDB_NFS_CALLOUT=<parameter>COMMAND</parameter>
</term>
<listitem>
@@ -938,20 +836,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
<varlistentry>
<term>
- CTDB_MANAGES_ISCSI=yes|no
- </term>
- <listitem>
- <para>
- Should CTDB manage iSCSI tgtd?
- </para>
- <para>
- Default is no.
- </para>
- </listitem>
--
Samba Shared Repository
More information about the samba-cvs
mailing list