From: Martin Schwenke Date: Mon, 16 Apr 2018 04:23:00 +0000 (+1000) Subject: ctdb-daemon: Drop most ctdbd command-line options X-Git-Tag: ldb-1.4.0~175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78fbbfa4d3892d66c4dc2f02bb2b3200cfcd5159;p=thirdparty%2Fsamba.git 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 Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/doc/ctdbd.1.xml b/ctdb/doc/ctdbd.1.xml index abab2a4121f..09803e4e240 100644 --- a/ctdb/doc/ctdbd.1.xml +++ b/ctdb/doc/ctdbd.1.xml @@ -46,66 +46,6 @@ GENERAL OPTIONS - - -d, --debug=DEBUGLEVEL - - - This option sets the debug level to DEBUGLEVEL, which - controls what will be written by the logging - subsystem. The default is 2. - - - See the DEBUG LEVELS section in - ctdb - 7 for more - information. - - - - - - --dbdir=DIRECTORY - - - 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. - - - Defaults to /usr/local/var/lib/ctdb/volatile. - - - - - - --dbdir-persistent=DIRECTORY - - - 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. - - - Defaults to /usr/local/var/lib/ctdb/persistent. - - - - - - --dbdir-state=DIRECTORY - - - 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. - - - Defaults to /usr/local/var/lib/ctdb/state. - - - - -i, --interactive @@ -118,273 +58,6 @@ - - --listen=IPADDR - - - IPADDR is the private IP address that ctdbd will bind to. - - - By default ctdbd will select the first address from the - nodes list that in can bind to. See also the - Private address section in - ctdb - 7. - - - 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. - - - - - - --logging=STRING - - - STRING specifies where ctdbd will write its log. The - default is - file:/usr/local/var/log/log.ctdb. - - - Valid values are: - - - - file:FILENAME - - - FILENAME where ctdbd will write its log. This is usually - /usr/local/var/log/log.ctdb. - - - - - syslog:METHOD - - - CTDB will log to syslog. By default this will use - the syslog(3) API. - - - Under heavy loads syslog(3) can block if the syslog - daemon processes messages too slowly. This can - cause CTDB to block when logging. - - - If METHOD is specified then it specifies an - extension that causes logging to be done in a - non-blocking mode. Note that this may - cause messages to be dropped. METHOD - must be one of: - - - - nonblocking - - - CTDB will log to syslog via - /dev/log in non-blocking - mode. - - - - - udp - - - 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. - - - - - udp-rfc5424 - - - 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. - - - - - - - - - - - - --max-persistent-check-errors=NUM - - - NUM specifies the maximum number of health check failures - allowed for persistent databases during startup. - - - 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. - - - - - - --no-lmaster - - - 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. - - - Please see the REMOTE CLUSTER NODES - section in ctdb - 7 for more - information. - - - - - - --no-recmaster - - - 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. - - - Please see the REMOTE CLUSTER NODES - section in ctdb - 7 for more - information. - - - - - - --nosetsched - - - 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. - - - This option is used to tell ctdbd to - not 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. - - - 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.) - - - - - - --reclock=LOCK - - - LOCK specifies the cluster-wide mutex used to detect and - prevent a partitioned cluster (or "split brain"). - - - For information about the recovery lock please see the - RECOVERY LOCK section in - ctdb - 7. - - - - - - --script-log-level=DEBUGLEVEL - - - This option sets the debug level of event script output to - DEBUGLEVEL. The default is ERR. - - - See the DEBUG LEVELS section in - ctdb - 7 for more - information. - - - - - - --start-as-disabled - - - This makes ctdbd start in the DISABLED state. - - - To allow the node to host public IP addresses and - services, it must be manually enabled using the - ctdb enable command. - - - Please see the NODE STATES section - in ctdb - 7 for more - information about the DISABLED state. - - - - - - --start-as-stopped - - - This makes ctdbd start in the STOPPED state. - - - To allow the node to take part in the cluster it must be - manually continued with the the ctdb - enable command. - - - Please see the NODE STATES section - in ctdb - 7 for more - information about the STOPPED state. - - - - - - --transport=tcp|infiniband - - - This option specifies which transport to use for ctdbd - internode communications. The default is "tcp". - - - The "infiniband" support is not regularly tested. - - - - -?, --help diff --git a/ctdb/doc/ctdbd.conf.5.xml b/ctdb/doc/ctdbd.conf.5.xml index 6b56159aab7..624a84f48ad 100644 --- a/ctdb/doc/ctdbd.conf.5.xml +++ b/ctdb/doc/ctdbd.conf.5.xml @@ -61,11 +61,7 @@ 1 and are converted into command-line arguments to ctdbd - 1. Correspondence with - ctdbd - 1 options is shown for - each variable. The the documentation for the relevant options - for more details. + 1. @@ -78,7 +74,7 @@ CTDB_CAPABILITY_LMASTER=yes|no - Defaults to yes. Corresponds to . + Defaults to yes. @@ -87,8 +83,7 @@ CTDB_CAPABILITY_RECMASTER=yes|no - Defaults to yes. Corresponds to - . + Defaults to yes. @@ -99,9 +94,6 @@ Defaults to /usr/local/var/lib/ctdb/volatile. - - Corresponds to . - @@ -111,9 +103,6 @@ Defaults to /usr/local/var/lib/ctdb/persistent. - - Corresponds to . - @@ -123,9 +112,6 @@ Defaults to /usr/local/var/lib/ctdb/state. - - Corresponds to . - @@ -160,8 +146,7 @@ CTDB_DEBUGLEVEL=DEBUGLEVEL - Default is NOTICE. Corresponds to or - . + Default is NOTICE. @@ -173,7 +158,6 @@ STRING specifies where ctdbd will write its log. The default is file:/usr/local/var/log/log.ctdb. - Corresponds to . Valid values are: @@ -252,7 +236,7 @@ CTDB_NOSETSCHED=yes|no - Defaults to no. Corresponds to . + Defaults to no. Usually CTDB runs with real-time priority. If you are running @@ -267,7 +251,6 @@ IPADDR is the private IP address that ctdbd will bind to. - Corresponds to . By default ctdbd will select the first address from the @@ -297,8 +280,7 @@ No default, but the default configuration file specifies /some/place/on/shared/storage, which - should be change to a useful value. Corresponds to - . + should be change to a useful value. For information about the recovery lock please see the @@ -313,8 +295,7 @@ CTDB_SCRIPT_LOG_LEVEL=DEBUGLEVEL - Defaults to ERR. Corresponds to - . + Defaults to ERR. @@ -323,8 +304,7 @@ CTDB_START_AS_DISABLED=yes|no - Default is no. Corresponds to - . + Default is no. @@ -333,8 +313,7 @@ CTDB_START_AS_STOPPED=yes|no - Default is no. Corresponds to - . + Default is no. @@ -343,8 +322,7 @@ CTDB_TRANSPORT=tcp|infiniband - Defaults to tcp. Corresponds to - . + Defaults to tcp. diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c index e242a3e224e..252309cceab 100644 --- a/ctdb/server/ctdbd.c +++ b/ctdb/server/ctdbd.c @@ -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;