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

302 Commits

Author SHA1 Message Date
Amitay Isaacs
f635bd8997 ctdb-tools: Addition of IPs is deferred until the next takeover run
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12152

This makes the behaviour of "ctdb addip" similar to "ctdb delip".

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-08-17 05:28:19 +02:00
Martin Schwenke
1f942ec36c ctdb-mutex: Avoid corner case where helper is already reparented to init
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12113

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +02:00
Martin Schwenke
2295f5009d ctdb-doc: Document that "ctdb tickle" can now read from stdin
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12123

Although this has been queued for a while, with changes to add stdin
support to the original ctdb tool, this came for free with the
replacement tool.

addtickle and deltickle also now have this feature.  However, they're
internal commands and we're not adding new documentation for
internal/debug commands.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-08-08 08:17:34 +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
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
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
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
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
Martin Schwenke
7303d7ba86 ctdb-tools: Simplify "ctdb getmonmode" output format
No preamble, just print keyword ENABLED or DISABLED.  Fix the
documentation to reflect this and remove the text that is simply
wrong.

Also remove output from "ctdb enablemonitor" and "ctdb disablemonitor"
on success.  This is just noise.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:46 +02:00
Martin Schwenke
2a855903de ctdb-doc: Document limitation of "ctdb reloadips"
This limitation can be removed with a reasonable amount of effort.  It
probably isn't worth doing until the public IP address configuration
is stored in a cluster-wide database.  That seems like the right time
to change the API to handle the details that
CTDB_CONTROL_GET_PUBLIC_IPS doesn't currently retrieve.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
f427fe8102 ctdb-doc: Update allowed debug levels to include "ERROR"
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
99e41e8df3 ctdb-doc: Drop documentation for "ctdb xpnn"
This command was deleted some time ago.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Martin Schwenke
a66b83d44b ctdb-doc: Drop documentation for "ctdb setmonmode"
The actual command was removed nearly 10 years ago.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-25 21:29:43 +02:00
Amitay Isaacs
70d10cea7b ctdb-tool: Remove setdbprio and getdbprio commands
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:42 +02:00
Amitay Isaacs
3c933b1436 ctdb-tool: Remove ctdb thaw command
Databases should never be thawed manually.  A database recovery will
correctly thaw all databases.  Otherwise there is a bug in the database
recovery.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-07-25 21:29:41 +02:00
Amitay Isaacs
fc7e863ce7 ctdb-scripts: Add new configuration variable CTDB_NOSETSCHED
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-06-20 16:21:19 +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
Martin Schwenke
d3da6f0eb9 ctdb-tool: Drop support for "ctdb setreclock" command
The recovery lock can not be reliably updated at run-time.  If it
fails to update on some nodes then split-brain protection is gone and
there is no reasonable way to repair the situation.  CTDB will have to
be restarted on all nodes.  So, if this feature is being used to avoid
scheduling an outage then an outage will have to be scheduled just in
case!

To update the recovery lock, shut down CTDB on all nodes, reconfigure
the recovery lock and start CTDB again.

Those that *really* want to be able to change the recovery lock at
run-time can still do so.  Set CTDB_RECOVERY_LOCK to point to a script
and this script can then be modified at run-time.  However, please
don't report bugs if bad things happen...

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-06-08 00:51:28 +02:00
Jose A. Rivera
ecbe6c669f ctdb-scripts: Add GlusterFS support to nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat May 14 03:06:05 CEST 2016 on sn-devel-144
2016-05-14 03:06:03 +02:00
Jose A. Rivera
83226d98e5 ctdb-scripts: Section off GPFS-specific functionality in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
8b59705252 ctdb-scripts: Add config options for use by clustered NFS
Add CTDB_NFS_STATE_FS_TYPE and CTDB_NFS_STATE_MNT config options, show use in
nfs-ganesha-callout. Since the callout script is only an example, we
officially don't have default values for these.

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
c7dbf720d8 ctdb-scripts: Parametize symlink checking in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
a540a0d213 ctdb-scripts: Cleanup service_check() in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
e9b507c11c ctdb-scripts: Use D-Bus messages to trigger grace in nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
d375fd80f0 ctdb-scripts: Add register action to nfs-ganesha-callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:25 +02:00
Jose A. Rivera
755f060d52 ctdb-scripts: Organize global variables in nfs_ganesha_callout
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:24 +02:00
Jose A. Rivera
a857e33deb ctdb-scripts: Various small fixes to example nfs-ganesha-callout
Comment typos and clarifications, erroneous variable names, corrected
pathnames, reorganizing variables, and squashing a few non-fatal
scripting errors.

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-13 23:37:24 +02:00
Martin Schwenke
ddfbd74607 ctdb-doc: Fix example NFS Ganesha recovery directory maintenance logic
This currently fails exactly when it is needed: when there is a
dangling link pointing into an unmounted filesystem.  This happens
because [ -e <dangling-link> ] returns false.  The solution is simply
to remove that check.

Now the first condition in the "if" statement catches the backward
compatibility case where $GANRECDIR used to be a directory.  It will
also catch other problems, such as if a file has been created in this
location.  If nothing exists then it will silently succeed (due to
-f).

The second case catches a symlink pointing to the wrong place (e.g. in
an unmounted filesystem).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-05-03 04:43: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
46684867b1 ctdb-recovery: Recovery lock setting can now include helper command
The underlying change is to allow the cluster mutex argstring to
optionally contain a helper command.  When the argument string starts
with '!' then the first word is the helper command to run.  This is
now the standard way of changing the helper from the default.

CTDB_CLUSTER_MUTEX_HELPER show now only be used to change the location
of the default helper when testing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-28 09:39:17 +02:00
Martin Schwenke
c14e0ff8e4 ctdb-tools: Simplify "ctdb getreclock" output
If the reclock is set then print it, otherwise print nothing.

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
0c373f2854 ctdb-tools: Drop onnode node specifications for recmaster/lvs/natgw
LVS and NAT gateway support had bit-rotted.  We don't use any of these
in scripts/tests and we very much doubt anyone else uses them.

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 Apr 25 10:34:47 CEST 2016 on sn-devel-144
2016-04-25 10:34:47 +02:00
Martin Schwenke
d12858aa5b ctdb-tools: Drop "ctdb natgwlist"
The new individual status options are better.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-25 07:10:15 +02:00
Martin Schwenke
515e2a2d87 ctdb-tools: Add top-level "ctdb natgw" command
This can list the different aspects of status: master, list, status.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-25 07:10:15 +02:00
Amitay Isaacs
cb3db024ef ctdb-tool: Remove commands related to server_id
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-04-23 23:55:14 +02:00
Martin Schwenke
ffd64de772 ctdb-daemon: Drop --lvs option and support for CTDB_CAP_LVS
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): Fri Apr 15 09:35:51 CEST 2016 on sn-devel-144
2016-04-15 09:35:51 +02:00
Martin Schwenke
951e8180a9 ctdb-daemon: Drop --single-public-ip option and related code
This has been replaced by scripts.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-15 05:57:18 +02:00
Martin Schwenke
dfe8de9e4a ctdb-scripts: Simplify "ctdb lvs ..." output
For "master", if there is a master then print the PNN, otherwise print
nothing.

For "list", print the PNN and IP addresses without a colon in between.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-15 05:57:18 +02:00
Martin Schwenke
e3a7178511 ctdb-tools: Change ctdb CLI to have a single "lvs" command
This simply calls out to the wrapper, so that commands are changed as
follows:

  ctdb lvsmaster -> ctdb lvs master
  ctdb lvs       -> ctdb lvs list

This provides a simple, extensible interface and means that "ctdb lvs
status" is also available.

Unit tests are streamlined so that there is a single test for each
CTDB state.  Each test does "master", "list" and "status" sub-tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-15 05:57:18 +02:00
Amitay Isaacs
798b131400 ctdb-doc: Add sample LVS configuration
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-04-15 05:57:17 +02:00
Martin Schwenke
ce33a7cb1e ctdb-scripts: Call out to ctdb_lvs helper from 91.lvs
To keep this commit comprehensible, 91.lvs and the CTDB CLI tool are
temporarily inconsistent.  The tool will be made consistent in a
subsequent commit.

LVS now uses a configuration file specified by CTDB_LVS_NODES and
supports the same slave-only syntax as CTDB_NATGW_NODES.  LVS also
uses new variable CTDB_LVS_PUBLIC_IFACE instead of
CTDB_PUBLIC_INTERFACE.

Update unit tests and documentation.

Note that the --lvs and --single-public-ip daemon options are no
longer used.  These will be removed and relevant documentation
updated in a subsequent commit.

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
efd371659f ctdb-tools: Drop "ctdb killtcp" command
It is now handled by a standalone helper.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-01 04:42:12 +02:00
Amitay Isaacs
c41808e6d2 ctdb-tunables: Add new tunable RecBufferSizeLimit
This will be used to limit the size of record buffer sent in newer
controls for recovery and existing controls for vacuuming.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:14 +01:00
Martin Schwenke
d678684695 ctdb-tools: Drop "ctdb rebalancenode"
This was a workaround for trying to ensure public IP addresses are
properly rebalanced after running "ctdb addip" on multiple nodes.
"ctdb reloadips" is a better solution.

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
aaa57fbcb3 ctdb-tools: Drop "ctdb rebalanceip"
This is undocumented and is not needed.  It was a workaround for
trying to ensure public IP addresses are properly rebalanced after
running "ctdb addip" on multiple nodes.  "ctdb reloadips" is a better
solution.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-03-10 03:34:19 +01:00
Amitay Isaacs
963d0825fc ctdb-doc: Update ctdb man page
Update ctdb statistics and ctdb dbstatistics output.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-10 03:34:19 +01:00
Amitay Isaacs
2db5e3ed71 ctdb-doc: Update ctdb man page
Do not use obsolete tunables in examples.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-10 03:34:19 +01:00
Amitay Isaacs
3680aba212 ctdb-doc: Add documentation for missing tunables
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-10 03:34:18 +01:00
Amitay Isaacs
e2539088e0 ctdb-doc: Update tunables documentation
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-10 03:34:18 +01:00