1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

ctdb-daemon: Drop most ctdbd command-line options

All except -i/--interactive.  This remaining popt option is now neatly
wrapped to fit in 80 columns.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-04-16 14:23:00 +10:00 committed by Amitay Isaacs
parent 4e06610f8c
commit 78fbbfa4d3
3 changed files with 12 additions and 399 deletions

View File

@ -46,66 +46,6 @@
<title>GENERAL OPTIONS</title>
<variablelist>
<varlistentry>
<term>-d, --debug=<parameter>DEBUGLEVEL</parameter></term>
<listitem>
<para>
This option sets the debug level to DEBUGLEVEL, which
controls what will be written by the logging
subsystem. The default is 2.
</para>
<para>
See the <citetitle>DEBUG LEVELS</citetitle> section in
<citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> for more
information.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--dbdir=<parameter>DIRECTORY</parameter></term>
<listitem>
<para>
DIRECTORY on local storage where ctdbd keeps a local copy of
TDB databases. This directory is local for each node and
should not be stored on the shared cluster filesystem.
</para>
<para>
Defaults to <filename>/usr/local/var/lib/ctdb/volatile</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--dbdir-persistent=<parameter>DIRECTORY</parameter></term>
<listitem>
<para>
DIRECTORY on local storage where ctdbd keeps a local copy of
persistent TDB databases. This directory is local for each
node and should not be stored on the shared cluster
filesystem.
</para>
<para>
Defaults to <filename>/usr/local/var/lib/ctdb/persistent</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--dbdir-state=<parameter>DIRECTORY</parameter></term>
<listitem>
<para>
DIRECTORY on local storage where ctdbd keep internal state
TDB files. This directory is local for each node and
should not be stored on the shared cluster filesystem.
</para>
<para>
Defaults to <filename>/usr/local/var/lib/ctdb/state</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-i, --interactive</term>
<listitem>
@ -118,273 +58,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>--listen=<parameter>IPADDR</parameter></term>
<listitem>
<para>
IPADDR is the private IP address that ctdbd will bind to.
</para>
<para>
By default ctdbd will select the first address from the
nodes list that in can bind to. See also the
<citetitle>Private address</citetitle> section in
<citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry>.
</para>
<para>
This option is only required when automatic address
detection can not be used. This can be the case when
running multiple ctdbd daemons/nodes on the same physical
host (usually for testing), using InfiniBand for the
private network or on Linux when sysctl
net.ipv4.ip_nonlocal_bind=1.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--logging=<parameter>STRING</parameter></term>
<listitem>
<para>
STRING specifies where ctdbd will write its log. The
default is
file:<filename>/usr/local/var/log/log.ctdb</filename>.
</para>
<para>
Valid values are:
</para>
<variablelist>
<varlistentry>
<term>file:<parameter>FILENAME</parameter></term>
<listitem>
<para>
FILENAME where ctdbd will write its log. This is usually
<filename>/usr/local/var/log/log.ctdb</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
<listitem>
<para>
CTDB will log to syslog. By default this will use
the syslog(3) API.
</para>
<para>
Under heavy loads syslog(3) can block if the syslog
daemon processes messages too slowly. This can
cause CTDB to block when logging.
</para>
<para>
If METHOD is specified then it specifies an
extension that causes logging to be done in a
non-blocking mode. Note that <emphasis>this may
cause messages to be dropped</emphasis>. METHOD
must be one of:
</para>
<variablelist>
<varlistentry>
<term>nonblocking</term>
<listitem>
<para>
CTDB will log to syslog via
<filename>/dev/log</filename> in non-blocking
mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>udp</term>
<listitem>
<para>
CTDB will log to syslog via UDP to
localhost:514. The syslog daemon must be
configured to listen on (at least)
localhost:514. Most syslog daemons will log
the messages with hostname "localhost" - this
is a limitation of the implementation, for
compatibility with more syslog daemons.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>udp-rfc5424</term>
<listitem>
<para>
As with "udp" but messages are sent in RFC5424
format. This method will log the correct
hostname but is not as widely implemented in
syslog daemons.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
<listitem>
<para>
NUM specifies the maximum number of health check failures
allowed for persistent databases during startup.
</para>
<para>
The default value is 0. Setting this to non-zero allows a
node with unhealthy persistent databases to startup and
join the cluster as long as there is another node with
healthy persistent databases.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--no-lmaster</term>
<listitem>
<para>
This argument specifies that this node can NOT become an lmaster
for records in the database. This means that it will never show up
in the vnnmap. This feature is primarily used for making a cluster
span across a WAN link and use CTDB as a WAN-accelerator.
</para>
<para>
Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
section in <citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> for more
information.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--no-recmaster</term>
<listitem>
<para>
This argument specifies that this node can NOT become a recmaster
for the database. This feature is primarily used for making a cluster
span across a WAN link and use CTDB as a WAN-accelerator.
</para>
<para>
Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
section in <citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> for more
information.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--nosetsched</term>
<listitem>
<para>
Normally ctdbd will change its scheduler to run as a
real-time process. This is the default mode for a normal
ctdbd operation to gurarantee that ctdbd always gets the CPU
cycles that it needs.
</para>
<para>
This option is used to tell ctdbd to
<emphasis>not</emphasis> run as a real-time process and
instead run ctdbd as a normal userspace process. This can
be used on a platform where real-time scheduling is not
supported.
</para>
<para>
This is also useful for debugging and when you want to run
ctdbd under valgrind or gdb. (You don't want to attach
valgrind or gdb to a real-time process.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--reclock=<parameter>LOCK</parameter></term>
<listitem>
<para>
LOCK specifies the cluster-wide mutex used to detect and
prevent a partitioned cluster (or "split brain").
</para>
<para>
For information about the recovery lock please see the
<citetitle>RECOVERY LOCK</citetitle> section in
<citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
<listitem>
<para>
This option sets the debug level of event script output to
DEBUGLEVEL. The default is ERR.
</para>
<para>
See the <citetitle>DEBUG LEVELS</citetitle> section in
<citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> for more
information.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--start-as-disabled</term>
<listitem>
<para>
This makes ctdbd start in the DISABLED state.
</para>
<para>
To allow the node to host public IP addresses and
services, it must be manually enabled using the
<command>ctdb enable</command> command.
</para>
<para>
Please see the <citetitle>NODE STATES</citetitle> section
in <citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> for more
information about the DISABLED state.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--start-as-stopped</term>
<listitem>
<para>
This makes ctdbd start in the STOPPED state.
</para>
<para>
To allow the node to take part in the cluster it must be
manually continued with the the <command>ctdb
enable</command> command.
</para>
<para>
Please see the <citetitle>NODE STATES</citetitle> section
in <citerefentry><refentrytitle>ctdb</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> for more
information about the STOPPED state.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>--transport=tcp|infiniband</term>
<listitem>
<para>
This option specifies which transport to use for ctdbd
internode communications. The default is "tcp".
</para>
<para>
The "infiniband" support is not regularly tested.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-?, --help</term>
<listitem>

View File

@ -61,11 +61,7 @@
<manvolnum>1</manvolnum></citerefentry> and are converted into
command-line arguments to
<citerefentry><refentrytitle>ctdbd</refentrytitle>
<manvolnum>1</manvolnum></citerefentry>. Correspondence with
<citerefentry><refentrytitle>ctdbd</refentrytitle>
<manvolnum>1</manvolnum></citerefentry> options is shown for
each variable. The the documentation for the relevant options
for more details.
<manvolnum>1</manvolnum></citerefentry>.
</para>
<para>
@ -78,7 +74,7 @@
<term>CTDB_CAPABILITY_LMASTER=yes|no</term>
<listitem>
<para>
Defaults to yes. Corresponds to <option>--no-lmaster</option>.
Defaults to yes.
</para>
</listitem>
</varlistentry>
@ -87,8 +83,7 @@
<term>CTDB_CAPABILITY_RECMASTER=yes|no</term>
<listitem>
<para>
Defaults to yes. Corresponds to
<option>--no-recmaster</option>.
Defaults to yes.
</para>
</listitem>
</varlistentry>
@ -99,9 +94,6 @@
<para>
Defaults to <filename>/usr/local/var/lib/ctdb/volatile</filename>.
</para>
<para>
Corresponds to <option>--dbdir</option>.
</para>
</listitem>
</varlistentry>
@ -111,9 +103,6 @@
<para>
Defaults to <filename>/usr/local/var/lib/ctdb/persistent</filename>.
</para>
<para>
Corresponds to <option>--dbdir-persistent</option>.
</para>
</listitem>
</varlistentry>
@ -123,9 +112,6 @@
<para>
Defaults to <filename>/usr/local/var/lib/ctdb/state</filename>.
</para>
<para>
Corresponds to <option>--dbdir-state</option>.
</para>
</listitem>
</varlistentry>
@ -160,8 +146,7 @@
<term>CTDB_DEBUGLEVEL=<parameter>DEBUGLEVEL</parameter></term>
<listitem>
<para>
Default is NOTICE. Corresponds to <option>-d</option> or
<option>--debug</option>.
Default is NOTICE.
</para>
</listitem>
</varlistentry>
@ -173,7 +158,6 @@
STRING specifies where ctdbd will write its log. The
default is
file:<filename>/usr/local/var/log/log.ctdb</filename>.
Corresponds to <option>--logging</option>.
</para>
<para>
Valid values are:
@ -252,7 +236,7 @@
<term>CTDB_NOSETSCHED=yes|no</term>
<listitem>
<para>
Defaults to no. Corresponds to <option>--nosetsched</option>.
Defaults to no.
</para>
<para>
Usually CTDB runs with real-time priority. If you are running
@ -267,7 +251,6 @@
<listitem>
<para>
IPADDR is the private IP address that ctdbd will bind to.
Corresponds to <option>--listen</option>.
</para>
<para>
By default ctdbd will select the first address from the
@ -297,8 +280,7 @@
<para>
No default, but the default configuration file specifies
<filename>/some/place/on/shared/storage</filename>, which
should be change to a useful value. Corresponds to
<option>--reclock</option>.
should be change to a useful value.
</para>
<para>
For information about the recovery lock please see the
@ -313,8 +295,7 @@
<term>CTDB_SCRIPT_LOG_LEVEL=<parameter>DEBUGLEVEL</parameter></term>
<listitem>
<para>
Defaults to ERR. Corresponds to
<option>--script-log-level</option>.
Defaults to ERR.
</para>
</listitem>
</varlistentry>
@ -323,8 +304,7 @@
<term>CTDB_START_AS_DISABLED=yes|no</term>
<listitem>
<para>
Default is no. Corresponds to
<option>--start-as-disabled</option>.
Default is no.
</para>
</listitem>
</varlistentry>
@ -333,8 +313,7 @@
<term>CTDB_START_AS_STOPPED=yes|no</term>
<listitem>
<para>
Default is no. Corresponds to
<option>--start-as-stopped</option>.
Default is no.
</para>
</listitem>
</varlistentry>
@ -343,8 +322,7 @@
<term>CTDB_TRANSPORT=tcp|infiniband</term>
<listitem>
<para>
Defaults to tcp. Corresponds to
<option>--transport</option>.
Defaults to tcp.
</para>
</listitem>
</varlistentry>

View File

@ -43,31 +43,6 @@
#include "ctdb_config.h"
static struct {
const char *debuglevel;
const char *transport;
const char *myaddress;
const char *logging;
const char *recovery_lock;
const char *db_dir;
const char *db_dir_persistent;
const char *db_dir_state;
int nosetsched;
int start_as_disabled;
int start_as_stopped;
int no_lmaster;
int no_recmaster;
int script_log_level;
} options = {
.debuglevel = "NOTICE",
.transport = "tcp",
.logging = "file:" LOGDIR "/log.ctdb",
.db_dir = CTDB_VARDIR "/volatile",
.db_dir_persistent = CTDB_VARDIR "/persistent",
.db_dir_state = CTDB_VARDIR "/state",
.script_log_level = DEBUG_ERR,
};
int script_log_level;
bool fast_start;
@ -174,21 +149,8 @@ int main(int argc, const char *argv[])
struct poptOption popt_options[] = {
POPT_AUTOHELP
{ "debug", 'd', POPT_ARG_STRING, &options.debuglevel, 0, "debug level", NULL },
{ "interactive", 'i', POPT_ARG_NONE, &interactive, 0, "don't fork", NULL },
{ "logging", 0, POPT_ARG_STRING, &options.logging, 0, "logging method to be used", NULL },
{ "listen", 0, POPT_ARG_STRING, &options.myaddress, 0, "address to listen on", "address" },
{ "transport", 0, POPT_ARG_STRING, &options.transport, 0, "protocol transport", NULL },
{ "dbdir", 0, POPT_ARG_STRING, &options.db_dir, 0, "directory for the tdb files", NULL },
{ "dbdir-persistent", 0, POPT_ARG_STRING, &options.db_dir_persistent, 0, "directory for persistent tdb files", NULL },
{ "dbdir-state", 0, POPT_ARG_STRING, &options.db_dir_state, 0, "directory for internal state tdb files", NULL },
{ "reclock", 0, POPT_ARG_STRING, &options.recovery_lock, 0, "recovery lock", "lock" },
{ "nosetsched", 0, POPT_ARG_NONE, &options.nosetsched, 0, "disable setscheduler SCHED_FIFO call, use mmap for tdbs", NULL },
{ "start-as-disabled", 0, POPT_ARG_NONE, &options.start_as_disabled, 0, "Node starts in disabled state", NULL },
{ "start-as-stopped", 0, POPT_ARG_NONE, &options.start_as_stopped, 0, "Node starts in stopped state", NULL },
{ "no-lmaster", 0, POPT_ARG_NONE, &options.no_lmaster, 0, "disable lmaster role on this node", NULL },
{ "no-recmaster", 0, POPT_ARG_NONE, &options.no_recmaster, 0, "disable recmaster role on this node", NULL },
{ "script-log-level", 0, POPT_ARG_INT, &options.script_log_level, 0, "log level of event script output", NULL },
{ "interactive", 'i', POPT_ARG_NONE, &interactive, 0,
"don't fork", NULL },
POPT_TABLEEND
};
int opt, ret;