1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
Commit Graph

69 Commits

Author SHA1 Message Date
Martin Schwenke
3caddaafa0 ctdb-config: Drop CTDB_STARTUP_TIMEOUT
This was added to be able to notice startup failures when unknown
tunables were present in the configuration.  Tunables are now set by
the daemon, so this is no longer necessary.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-04-06 06:34:37 +00:00
Martin Schwenke
7e31a1382f ctdb-config: Add default ctdb.sysconfig file, update ctdb.service
Install ctdb.sysconfig in RPM.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-12 06:11:17 +02:00
Amitay Isaacs
3fafe48027 ctdb-packaging: Move ctdb configuration to ctdbd.conf
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:18 +02:00
Amitay Isaacs
83f3a35645 ctdb-scripts: Add new configuration variable CTDB_MAX_OPEN_FILES
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-04-30 06:45:26 +02:00
Martin Schwenke
664d62b611 ctdb: Change default debug level to NOTICE (2)
This was true for the daemon until commit
b4589b954e.

Defaulting to ERR in the ctdb CLI tool encourages logging notices at
ERR level, so default to NOTICE instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-02-18 05:34:06 +01:00
Martin Schwenke
1d1cd04cb9 ctdb-logging: New option CTDB_LOGGING, remove CTDB_LOGFILE, CTDB_SYSLOG
Remove --logfile and --syslog daemon options and replace with
--logging.

Modularise and clean up logging initialisation code.  The
initialisation API includes an app_name argument that is currently
unused - this will be used in extensions to the syslog backend.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-10-28 05:42:04 +01:00
Amitay Isaacs
21ef3b1cc0 ctdb-config: Simplify the default CTDB configuration file
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-programmed-with: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:17 +01:00
Amitay Isaacs
7eb680a95f build: Move the default CTDB socket from /tmp to /var/run/ctdb
Use /var/run/ctdb/ctdbd.socket because there might be other daemons
that need sockets in the future.

The local daemons test code to create a link for the default
convenience socket has to be removed because the link can't be created
as a regular user in the new location.  This should be OK since all
calls to the ctdb tool in the test code should be wrapped in onnode.
When debugging tests, a developer will have to set CTDB_SOCKET by
hand.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-programmed-with: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit dc67a4e24af9d07aead2a1710eeaf5d6cc409201)
2013-10-25 12:06:07 +11:00
Martin Schwenke
4526fdbbca scripts: Remove support for CTDB_OPTIONS configuration variable
Allowing people to put random options in CTDB_OPTIONS complicates some
logic (particularly around use of syslog).  If we're going to have
variables for options then let's make sure we have a variable for each
option and make people use them.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit e55f3a1577eff0182802b0341d865d961aeae1c7)
2013-10-22 14:34:04 +11:00
Martin Schwenke
b1f7337d2b eventscripts: New configuration variable $CTDB_RPCINFO_LOCALHOST
Passing "localhost" to the rpcinfo command causes overheads, like
reading /etc/services multiple times.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 1d61988af9e4fa3621a3e2d06a859bcb53df2d67)
2013-08-14 15:57:04 +10:00
Martin Schwenke
45878d4363 eventscripts: New configuration varable $CTDB_NFS_DUMP_STUCK_THREADS
If some nfsd threads are still alive after a shutdown during a restart
then this indicates the maximum number of threads for which a stack
trace should be dumped.  This can be useful for trying to determine
why nfsd is stuck.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 2503245db10d567af708a04edd3a3b488c24f401)
2013-06-14 15:15:06 +10:00
Martin Schwenke
f408caea2a eventscripts: Add new option $CTDB_MONITOR_NFS_THREAD_COUNT
Consider the following example:

1. There are 256 nfsd threads configured.
2. 200 threads are "stuck" in system calls, perhaps waiting for the
   underlying filesystem when an attempt is made to restart NFS.
3. 56 threads exit when NFS is stopped.
4. 56 new threads are started when NFS is started.
5. 200 "stuck" threads exit leaving only 56 threads running.

Setting this option to "yes" makes the 60.nfs monitor event look for
this situation and try to correct it.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 99b0d8b8ecc36dfc493775b9ebced54539c182d2)
2013-06-13 20:01:22 +10:00
Mathieu Parent
69afd9abc5 doc: allows to -> allows one to
Signed-off-by: Mathieu Parent <math.parent@gmail.com>

(This used to be ctdb commit 95fc493a7d4145f976cb3fe928d9e92faec4dd71)
2013-01-22 18:03:35 +11:00
Ronnie Sahlberg
dce5969d12 Debug: When scripts hang, we may need to collect additional data in order to debug why the script hung.
Break this debug and datacollection out into an external script to make it easier to modify what data we need to collect.
For now we only collect a pstree so we can see what part of the script we hung in.

S1037271

(This used to be ctdb commit 6e68797af67bee36f2bad045f94806e7e98f27e9)
2012-05-17 10:29:03 +10:00
Martin Schwenke
9257b57f2c Eventscripts: New configuration variable CTDB_SERVICE_AUTOSTARTSTOP.
Some of the current auto-start/stop logic is broken, particularly for
Samba.  Fixing it is non-trivial.

If $CTDB_SERVICE_AUTOSTARTSTOP is "yes" then auto-start/stop services
when told to newly manage or no longer manage them.  This defaults to
"yes".

However, if using a canned configuration file that doesn't set
$CTDB_SERVICE_AUTOSTARTSTOP then this stops the auto-start-stop logic
from working.  Therefore, this works around CQ S1026685 - on the
system in question another daemon controls service auto-start/stop and
CTDB just gets in the way.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ef71b8290ae49117d7bcc7166598b77cb64cc8a0)
2011-08-30 09:33:47 +10:00
Ronnie Sahlberg
21226ee738 Add documentation for the new filesystem use monitoring
(This used to be ctdb commit 9f10c5d48a08ffb3417f880c801aed2aa2dc1355)
2011-08-11 10:07:50 +10:00
Ronnie Sahlberg
f5c0539dc6 Change how NATGW is configured to allow special nodes that do not have
network connectivity outside of the cluster to still be able to
participate in a natgw group.
These nodes can not become natgw master since they lack external network
connectivity.

These nodes are configured just the same way as for any other node with
NATGW, with the following two exceptions :
* we do NOT set CTDB_NATGW_PUBLIC_IFACE at all on these nodes.
  since these ndoes lack external network we should not check the interface
  for link.
* we must set CTDB_NATGW_SLAVE_ONLY=yes to flag that this is a node that
  can not become natgw master.

(This used to be ctdb commit ab7b00a37e55beffc074be95b55d8a5c7cb9eef2)
2010-09-08 09:20:16 +10:00
Ronnie Sahlberg
2d9fee4f85 Add a setting where CTDB will monitor and warn for low memory conditions.
CTDB_MONITOR_FREE_MEMORY_WARN

BZ 59747

(This used to be ctdb commit 83446b2e7e28e3ed6627c1950053018b8799984a)
2010-04-23 09:08:38 +10:00
Stefan Metzmacher
50bff8c886 config: add CTDB_PARTIALLY_ONLINE_INTERFACES to ctdb.sysconfig
With this option set to "yes", we don't become unhealthy
as long as at least one interface is still available.

metze

(This used to be ctdb commit d054eb33c6ae92560cddb40732e5dcf622591a3c)
2010-01-20 11:11:01 +01:00
Stefan Metzmacher
628ac65709 config: add 13.per_ip_routing event script
With this script it's possible to generate routing tables
per public ip address.

metze

(This used to be ctdb commit ff5678fbec2daef461143acf00cef3f94d7655fc)
2010-01-20 11:10:57 +01:00
Ronnie Sahlberg
a1d60b1511 Make the size of the in memory ringbuffer for keeping the recent log messages
configureable using --log-ringbuf-size=<num-entries>.

Add an entry in the sysconfig file to set this persistently.

(This used to be ctdb commit c79c2da69bc352f509e7fca4b9172a4b7f23c0f8)
2010-01-15 15:38:56 +11:00
Stefan Metzmacher
96977cc5c4 config: add CTDB_MAX_PERSISTENT_CHECK_ERRORS option
metze

(This used to be ctdb commit fc5f556d488488040303438aefecb5ae2a8e54bc)
2009-12-16 08:08:33 +01:00
Michael Adam
85a4d9a943 ctdb.sysconfig: add a comment section about CTDB_RUN_TIMEOUT_MONITOR
Michael

(This used to be ctdb commit b7dc1e0720991cc65353e07cf87608acea21ba27)
2009-11-05 11:13:53 +01:00
Ronnie Sahlberg
0d3bff5fa6 From Rusty
It's much nicer for post-mortem debugging to have a body to examine.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 058e21d96c3c02759833fd5ddfe7b43e6a5f5740)
2009-11-05 15:57:46 +11:00
Ronnie Sahlberg
029fd6b00f Revert "try to restart statd everytime it fails, not just the first time"
This reverts commit 4f7b39a4871af28df1c4545ec37db179fa47a7da.

(This used to be ctdb commit db7b96304e4725f29b12398b7582e385daed63ed)
2009-09-15 19:33:35 +10:00
Ronnie Sahlberg
59cacded72 try to restart statd everytime it fails, not just the first time
(This used to be ctdb commit 4f7b39a4871af28df1c4545ec37db179fa47a7da)
2009-09-15 13:35:58 +10:00
Michael Adam
e80a7001ff Introduce sysconfig variable CTDB_SYSLOG=yes/no (default "no").
This allows for controlling start of ctdbd with or without the option "--syslog"
from the sysconfig/ctdb file.

Michael

(This used to be ctdb commit 7bf9fff9139a4270496bddb97f9433bab87824bf)
2009-09-09 09:52:14 +02:00
Michael Adam
d8f9dad26b Rename the CTDB_INIT_STYLE "ubuntu" to "debian" - this is where it comes from.
Micheal

(This used to be ctdb commit b060911683d8ac201806d35a505867fe3ba9519f)
2009-09-09 09:52:13 +02:00
Ronnie Sahlberg
3c1351eabd update the sysconfig to show setting the debuglevel using a string literal instead of a numeric value
(This used to be ctdb commit 964530d70ba2ca949380d30a0e3d622963a6206c)
2009-07-01 09:23:52 +10:00
Ronnie Sahlberg
4a1a3652fe Document that you can run ctdb without a reclock file in the sysconfig file
(This used to be ctdb commit 33895d217ee096b356f02b5292ba27a840c4f559)
2009-06-25 11:59:21 +10:00
Ronnie Sahlberg
caf0e863a4 remove the obsolete ipmux component.
this is replaced by LVS since a long time

(This used to be ctdb commit dca41ec04788922ce5f4c52d346872b3e35f8cbb)
2009-05-25 12:33:52 +10:00
Ronnie Sahlberg
016b37f1e2 change the prefix NATGW_ to CTDB_NATGW_
(This used to be ctdb commit b7ed7fd4a5fbd344d41caa1afa100b1f24506173)
2009-05-14 08:12:48 +10:00
Ronnie Sahlberg
12400298c1 assign the natgw address to loopback and not the private network so that natgw will still work even when public and private networks are one and the same
(This used to be ctdb commit 2bd796b8a098074502fe20e3ab69098b2109c133)
2009-05-12 18:42:13 +10:00
Ronnie Sahlberg
ad40ee25f9 add a mechanism where the ctdb daemon will run a usercontrolled script when the node status changes to/from UNHEALTHY state.
This would allow a sysadmin to set up ctdb to send an email/snmptrap/... when the status of the node changes.

(This used to be ctdb commit ce534a83a05dbd40238e4eee0669d60ff396f935)
2009-03-31 14:23:31 +11:00
Ronnie Sahlberg
d7ff332896 update how the NATGW configuration works.
allow the cluster to be partitioned into multiple disjoint natgw subsets

(This used to be ctdb commit 1046885cd22b5001e0251de2e536b5f6793459be)
2009-03-25 13:37:57 +11:00
Michael Adam
a83ed1d743 Merge commit 'ctdb-ronnie/master'
(This used to be ctdb commit 39a972b0d6d0d70282c25c54a124b67431467e77)
2009-03-23 10:07:44 +01:00
root
9bf792d704 redo how the natgw is done. just use a default route with a high metric instead of fancy policyrouting
(This used to be ctdb commit f03bd2b3d906dac9fb876dca54535d22e9cf1b9e)
2009-03-18 19:19:49 +11:00
root
f037e881a2 change the NATGW_ example in sysconfig to make it more realistic
(This used to be ctdb commit 742283a8f8da7c614ee3a30d48c430e3a3bceeb9)
2009-03-18 09:33:58 +11:00
root
32391ec844 NAT-GW updates. Describe the functionality in the sysconfig file
(This used to be ctdb commit 4c598ab6f8e9b826d437b9ab869c4490f7c4faba)
2009-03-17 07:35:53 +11:00
Michael Adam
fd71213717 ctdb.sysconfig: add CTDB_MANAGES_HTTPD comment section
Michael

(This used to be ctdb commit ccaf9ebe062127124cf23e69dcd2ac2edda40020)
2009-03-10 00:21:04 +01:00
Michael Adam
eac9425820 events.d/50.samba: allow CTDB_SERVICE_{SMB,NMB,WINBIND} to be overriden from sysconfig
Michael

(This used to be ctdb commit b1aba6651143ae1c85b24d78b67c760795ff5bff)
2009-03-09 00:20:30 +01:00
Michael Adam
78294c4f3e ctdb.sysconfig: add CTDB_INIT_STYLE with explanation
Michael

(This used to be ctdb commit 8518c9e0ffec44677d45f60e63936a831d62ab20)
2009-03-09 00:08:26 +01:00
root
798553a9dc Add a variable CTDB_NFS_SKIP_SHARE_CHECK to sysconfig that can disable the check that all shares are accessable.
This can take very long if there are very many shares and is in that case better to implement in a separate cronjob than in ctdb eventscript

(This used to be ctdb commit 432604a1435cd2b5a7178fb5aedf1d4b61bffeb9)
2009-03-04 07:21:55 +11:00
root
c72c15c19a make it possible to disable checking all samba shares.
this is a timeconsuming process and might not be feasible to perform if there are very many thousand shares

(This used to be ctdb commit 051ae5f3c13892b860818eac803d348f09845dc6)
2009-02-20 10:58:34 +11:00
Ronnie Sahlberg
69932283ac remove two variables no longer used from the example sysconfig file
(This used to be ctdb commit dab594caf0bfc23c75c8cd2aa75479c7d2e79f1c)
2008-11-21 11:30:32 +11:00
Ronnie Sahlberg
090e5fdf5e new version 1.0.65
update the example sysconfig file. the default log level is 2, not 0

(This used to be ctdb commit 1f25958dc739677a487fa496fbeffcda7a0f2204)
2008-11-13 10:55:20 +11:00
Ronnie Sahlberg
9a9b506d23 Add two new options
CTDB_SAMBA_SKIP_CONF_CHECK and CTDB_SAMBA_CHECK_PORTS.
The first is used to tell ctdb to no longer monitoring if the smb.conf file is consistent or not.

The second specifies which ports to check that smb is listening on
instead of using testparm to figure this out.

Since the net, testparm and smbstatus may block indefinitely in some configurations
we must have a way to configure ctdb to NOT use any of these three commands
in the scripts. These commands should thus never be used in scripts.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 2fe52c7979ecd28250ec4ac195d3c3999916e573)
2008-07-15 11:03:35 +10:00
Ronnie Sahlberg
3c0d725e0b add an option to skip checking that all the samba shares are ok
when monitoring the node health.
this might be useful to skip for environments with thousands of shares

(This used to be ctdb commit dd900d4ed8f07003c4f1db2d441cfc2ef2c89ef5)
2008-07-10 08:56:33 +10:00
Ronnie Sahlberg
5836576237 move CTDB_MANAGES_NFS from /etc/sysconfig/nfs to /etc/sysconfig/ctdb
(This used to be ctdb commit 92be23dbd6a5bf32d4d1af4a41437fbcd7d8eaf2)
2008-05-22 06:08:38 +10:00
Ronnie Sahlberg
e9664e5a4c move the CTDB_MANAGES_ISCSI setting from /etc/sysconfig/iscsi to /etc/sysconfig/ctdb
(This used to be ctdb commit a953a0fb450955b62d747bdc82c5b968fe0ed378)
2008-05-22 06:04:36 +10:00