From 74230c59b6a8add7310c4ec39ef315cc67156b5a Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 24 Apr 2018 14:11:23 +1000 Subject: [PATCH] ctdb-docs: Document system options and resource controls The existing configuration file is disappearing so these configuration options need a new home that is not handled by ctdbd_wrapper. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/doc/ctdb.7.xml | 3 + ctdb/doc/ctdb.sysconfig.5.xml | 258 ++++++++++++++++++++++++++++++++ ctdb/doc/ctdbd.conf.5.xml | 73 --------- ctdb/doc/ctdbd_wrapper.1.xml | 3 + ctdb/packaging/RPM/ctdb.spec.in | 1 + ctdb/wscript | 1 + 6 files changed, 266 insertions(+), 73 deletions(-) create mode 100644 ctdb/doc/ctdb.sysconfig.5.xml diff --git a/ctdb/doc/ctdb.7.xml b/ctdb/doc/ctdb.7.xml index 7de9455d5e8a..9e56aa5506f3 100644 --- a/ctdb/doc/ctdb.7.xml +++ b/ctdb/doc/ctdb.7.xml @@ -1080,6 +1080,9 @@ CTDB_CAPABILITY_RECMASTER=no ctdb-script.options 5, + ctdb.sysconfig + 5, + ctdb-statistics 7, diff --git a/ctdb/doc/ctdb.sysconfig.5.xml b/ctdb/doc/ctdb.sysconfig.5.xml new file mode 100644 index 000000000000..a7e5d49e7e62 --- /dev/null +++ b/ctdb/doc/ctdb.sysconfig.5.xml @@ -0,0 +1,258 @@ + + + + + + + ctdb.sysconfig + 5 + ctdb + CTDB - clustered TDB database + + + + ctdb.sysconfig + CTDB daemon configuration file + + + + DESCRIPTION + + + This file contains configuration that affects the operation of + CTDB. This is a distribution-specific service configuration + file such as /etc/sysconfig/ctdb (Red Hat) + or /etc/default/ctdb (Debian) and is a + shell script (see + sh + 1). + + + + + + + GLOBAL CONFIGURATION + + + + + + CTDB_INIT_STYLE=debian|redhat|suse + + + This is the init style used by the Linux distribution (or + other operating system) being used. This is usually + determined dynamically by checking the system. This + variable is used by the initscript to determine which init + system primitives to use. It is also used by some + eventscripts to choose the name of initscripts for certain + services, since these can vary between distributions. + + + If using CTDB's event scripts are unable to determine an + appropriate default then this option can also be placed in + a relevant + ctdb-script.options + 5 file. + + + Default: NONE. Guessed, based on features of + distribution. + + + + + + CTDB_STARTUP_TIMEOUT=NUM + + + NUM is the number of seconds to wait for + ctdbd + 1 complete early + initialisation up to a point where it is unlikely to + abort. If ctdbd doesn't complete the + "setup" event before this timeout then it is killed. + + + + Defaults: 10 + + + + + + + + + + RESOURCE LIMITS + + + + + Maximum number of open files + + + + CTDB can use a lot of file descriptors, especially when used + with Samba. If there are thousands of smbd processes + connected to CTDB when this can mean that thousands of file + descriptors are used. For CTDB, it is often necessary to + increase limit on the maximum number of open files. + + + + The maximum number of open files should be configured using an + operating system mechanism. + + + + + + + systemd + + + + The + LimitNOFILE= + option can be used in a unit/service file increase the + maximum number of open files. See + systemd.exec + 5 for details. + + + + + + + SYSV init + + + + Use a command like ulimit -n + to increase the maximum + number of open files. This command can be put in the + relevant distribution-specific service configuration file. + + + + + + + + + + + Allowing core dumps + + + + Many distributions do not allow core dump files to be + generated by default. To assist with debugging, core files + can be enabled. This should be configured using an operating + system mechanism. + + + + + + + systemd + + + + The LimitCORE=0|unlimited option can + be used in a unit/service file. 0 + disallows core files, unlimited + allows them. maximum number of open files. See + systemd.exec + 5 for details. + + + + + + + SYSV init + + + + Use a command like ulimit -c 0|unlimited + to disable or enable core files as required. This + command can be put in the relevant distribution-specific + service configuration file. + + + + + + + + + + + + FILES + + + /etc/sysconfig/ctdb + /etc/default/ctdb + /usr/local/etc/ctdb/script.options + + + + + SEE ALSO + + ctdbd + 1, + + ctdb-script.options + 5, + + ctdb + 7, + + + + + + + + + This documentation was written by + Martin Schwenke + + + + + 2007 + Andrew Tridgell + Ronnie Sahlberg + + + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of + the License, or (at your option) any later version. + + + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + + You should have received a copy of the GNU General Public + License along with this program; if not, see + . + + + + + diff --git a/ctdb/doc/ctdbd.conf.5.xml b/ctdb/doc/ctdbd.conf.5.xml index 95a8ae7e251b..b7010ef8c8c0 100644 --- a/ctdb/doc/ctdbd.conf.5.xml +++ b/ctdb/doc/ctdbd.conf.5.xml @@ -50,49 +50,6 @@ - - - GLOBAL CONFIGURATION - - - - These options may be used in the initscripts, daemon and - scripts. If any of these options are required then they should - be set in the distribution-specific initscript configuration, - such as /etc/sysconfig/ctdb or - /etc/default/ctdb. - - - - - - CTDB_INIT_STYLE=debian|redhat|suse - - - This is the init style used by the Linux distribution (or - other operating system) being used. This is usually - determined dynamically by checking the system. This - variable is used by the initscript to determine which init - system primitives to use. It is also used by some - eventscripts to choose the name of initscripts for certain - services, since these can vary between distributions. - - - No fixed default. - - - If this option needs to be changed from the calculated - default for the initscript to function properly, then it - must be set in the distribution-specific initscript - configuration, such as - /etc/sysconfig/ctdb - - - - - - - DAEMON CONFIGURATION @@ -428,36 +385,6 @@ </variablelist> - <para> - While the following variables do not translate into daemon - options they are used by - <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle> - <manvolnum>1</manvolnum></citerefentry> when starting and - stopping <citerefentry><refentrytitle>ctdbd</refentrytitle> - <manvolnum>1</manvolnum></citerefentry>. - </para> - - <variablelist> - - <varlistentry> - <term>CTDB_STARTUP_TIMEOUT=<parameter>NUM</parameter></term> - <listitem> - <para> - NUM is the number of seconds to wait for - <citerefentry><refentrytitle>ctdbd</refentrytitle> - <manvolnum>1</manvolnum></citerefentry> complete early - initialisation up to a point where it is unlikely to - abort. If <command>ctdbd</command> doesn't complete the - "setup" event before this timeout then it is killed. - </para> - - <para> - Defaults is 10. - </para> - </listitem> - </varlistentry> - - </variablelist> </refsect1> <refsect1> diff --git a/ctdb/doc/ctdbd_wrapper.1.xml b/ctdb/doc/ctdbd_wrapper.1.xml index b119681a93a4..d717b84d2bda 100644 --- a/ctdb/doc/ctdbd_wrapper.1.xml +++ b/ctdb/doc/ctdbd_wrapper.1.xml @@ -58,6 +58,9 @@ <citerefentry><refentrytitle>ctdbd</refentrytitle> <manvolnum>1</manvolnum></citerefentry>, + <citerefentry><refentrytitle>ctdb.sysconfig</refentrytitle> + <manvolnum>5</manvolnum></citerefentry>, + <citerefentry><refentrytitle>ctdbd.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry>, diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index f2d71333b77d..c277c4a597b9 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -224,6 +224,7 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/ltdbtool.1.gz %{_mandir}/man1/ping_pong.1.gz %{_mandir}/man5/ctdb-script.options.5.gz +%{_mandir}/man5/ctdb.sysconfig.5.gz %{_mandir}/man5/ctdbd.conf.5.gz %{_mandir}/man7/ctdb.7.gz %{_mandir}/man7/ctdb-statistics.7.gz diff --git a/ctdb/wscript b/ctdb/wscript index 95091ce05646..89020c5d122d 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -49,6 +49,7 @@ manpages_misc = [ 'ctdbd_wrapper.1', 'onnode.1', 'ctdb-script.options.5', + 'ctdb.sysconfig.5', 'ctdbd.conf.5', 'ctdb.7', 'ctdb-statistics.7', -- 2.34.1