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

191 Commits

Author SHA1 Message Date
Michael Adam
5137fd5673 events.d/41.httpd: fix a comment typo
Michael

(This used to be ctdb commit c9a0330989421afc138db6d195acf93f5eeda9fb)
2009-01-27 17:17:58 +01:00
Michael Adam
5e76a9bf65 events 50.samba: fix control of nmbd without separate nmb service script.
protect all potentially empty $CTDB_SERVICE_* script names

Michael

(This used to be ctdb commit df0afcbf9a0308fcd6ddcce1ac9366f785576f44)
2009-01-19 21:22:58 +01:00
Michael Adam
69ef570f0c ctdb.init: fix typo
Michael

(This used to be ctdb commit 145b85c948603cf977a5c5b53d9d9f63fbdba221)
2009-01-16 14:01:37 +01:00
Michael Adam
4c9db19c9a events 50.samba: also support suse and ubuntu/debain systems
for managing samba and winbind

This uses CTDB_INIT_STYLE as exported by ctdb.init.

suse systems usually have separate init scripts for
smb for smbd and nmb for nmbd, and the ubuntu/debian
start script for smbd and nmbd is called samba instead
of smb (on redhat).

Michael

(This used to be ctdb commit 5fe84f96f3f79baba1f44ba57ce217f501b3c1f8)
2009-01-16 13:33:13 +01:00
Michael Adam
a2d6abdb34 funcions: make (nice_)service a noop for empty service name
Michael

(This used to be ctdb commit 4cac2a16b70be772e4f1520020762f63c0bf3efe)
2009-01-16 13:31:02 +01:00
Michael Adam
7c4ce58ba6 ctdb.init: use detect_init_style() in the init script
and export CTDB_INIT_STYLE, so that event scripts
as called by ctdbd can use it.

Michael

(This used to be ctdb commit 56a10594ea9e44e3f034ac11161fd06e5ae46544)
2009-01-16 13:28:19 +01:00
Michael Adam
a6ea1b20e5 functions: add detect_init_style().
Michael

(This used to be ctdb commit ab34a9480b59c649a4fc73a466c8ca0975453ed9)
2009-01-16 13:26:57 +01:00
Michael Adam
2536a0c898 ctdb.init: add $network to RequiredStop to match RequiredStart.
This is to make rpm checks (eg.g for SuSE systems) survive.

Michael

(This used to be ctdb commit 22cafa88f59ebe50c11f5b65a414800db79405a9)
2009-01-16 20:49:52 +11:00
Michael Adam
f844ca744a skip directories containing macros (%) in ctdb_check_directories_probe
This prevents the monitor action of 50.samba from failing
on e.g. a typical [homes] service with "path = /home/%S" .

Michael

(This used to be ctdb commit 023d6c2e3017d323b5a70f987f3b4e0b8b8f0f7b)
2008-12-16 09:51:36 +11:00
Michael Adam
c50a7bbf39 ctdb.init: add Default-Start to init script to enable autostart.
Michael

(This used to be ctdb commit a1a0fa6eb37b5432cc2b176e252856d37fcc4fc8)
2008-12-16 09:51:30 +11:00
Michael Adam
9d36bcb379 ctdb.init: check availability of ctdb (with ping) before calling ctdb status
Michael

(This used to be ctdb commit 0f7444966d8147cf5a742320f51fbb9909d6d42d)
2008-12-16 09:51:24 +11:00
Michael Adam
4e91103791 ctdb.init: behave correctly when calling "service ctdb stop" on stopped service
When "service ctdb stop" is called and the ctdbd is not running,
don't print the "Failed to connect to daemon" error messages.
But print a warning and exit with status success instead.

Michael

(This used to be ctdb commit fac9ad26b2239818e6fc371fbfaa894fa64045be)
2008-12-16 09:51:00 +11:00
Michael Adam
7e0fb89710 ctdb.init: fix return code of "service ctdb stop" on non-redhat systems
Michael

(This used to be ctdb commit f3cb1386e7ea99adba78350bb50bf34d6bdcfe1d)
2008-12-16 09:50:53 +11:00
Michael Adam
759ae998a4 ctdb.init: fix status message of "service ctdb stop" on suse systems
Michael

(This used to be ctdb commit 7834d9b79bf4e4d3c6ce63dd4c3a1e40b9d909e4)
2008-12-16 09:50:47 +11:00
Michael Adam
1cf23b1bd7 Improve the monitor event test for ethernet interfaces (link detection).
On some systems, the ethtool link detection is not successful when a
cable is plugged but the interface has not been brought up previously.
This improves the test by bringing the interface up (without checking
for success here) and trying the ethtool test again afterwards.

Michael

(This used to be ctdb commit 0c2a7bf18c65452ca1c2f0539bf692507d91e3c6)
2008-12-12 09:19:23 +11:00
Michael Adam
54da843031 Use "grep -q" instead of "grep ... > /dev/null" in events.d/10.interfaces
This enhances readability.

Michael

(This used to be ctdb commit 9c6816e040d42d293eaf9ce41eff639135e8b2f5)
2008-12-12 09:18:30 +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
d265e62ee7 dont log "running periodic cleanup" ...
(This used to be ctdb commit e25ea88ea4f270ba65ed5fdacd693f1248f343c0)
2008-10-20 09:45:15 +11:00
Ronnie Sahlberg
5318ca64b6 make it possible to set the script log level in CTDB sysconfig
(This used to be ctdb commit 06097b88709ced09d1f9f869eed9a54e6d2fedbf)
2008-10-17 13:36:52 +11:00
Ronnie Sahlberg
60b98f600e add an eventscript to monitor that the multipath devices are healthy
(This used to be ctdb commit f9779d3a237db59d7fdad92185ac7e42715466e6)
2008-10-15 16:27:33 +11:00
Ronnie Sahlberg
3902855275 change ip route add to route add -net since this works more reliably
update the makefile and rpm to install 99.routing

(This used to be ctdb commit c0b3bd8a3fa580dca5afa97c8012fccb25231373)
2008-10-15 01:49:19 +11:00
Ronnie Sahlberg
bad2949b65 add a new eventscript : 99.routing that is used to add static routes to
interfaces when they are activated (an ip address is added during
takeip)

(This used to be ctdb commit d9779c310e98c9d4eab71a8d1705849ac90deb10)
2008-10-07 11:03:30 +11:00
Ronnie Sahlberg
18b10d400d From Abhijith Das <adas@redhat.com>:
Fixup the initscript sdo it passes rpm-lint

(This used to be ctdb commit f84d0a9a8c7e9589e8833f21e1f977a0adab356b)
2008-08-25 10:13:18 +10:00
Ronnie Sahlberg
b99a88f0b3 Add a "reload" option to the initscript.
(This used to be ctdb commit 2a8bf5e7dc7364a8280d96db0f9579d2582a8524)
2008-08-25 10:03:16 +10:00
Ronnie Sahlberg
ddf2de2154 Do not fail the takeip event if the "ip addr add ..." command failed.
Let the event complete successfully.   the local recovery daemon will check that we have the address and reissue takip othervise.

There are several reasons why "ip addr add "  can fail, one is a misconfiguration
anothe ris that for ipv6 the stack is a lot more picky than for ipv4.     for examplke this WILL fail in ipv6 if there is a duplicate ip address on the network.

thus  this check could cause rolling-recoveries  which is why it has to go

(This used to be ctdb commit 12bc85c90a640a72ff538c003eb81da9dd1f2e3f)
2008-08-22 09:25:47 +10:00
Ronnie Sahlberg
9ce657b044 When we harvest all tcp connections to kill off after a takeip/releaseip event we must also harvest the ipv4 connections which may be presented in ::ff:xxxx:xxxx form by netstat
(This used to be ctdb commit 293d12a40501320a21efaf592b8f20e8590a5197)
2008-08-20 12:50:50 +10:00
Ronnie Sahlberg
43536648c5 update the socketkiller in the eventscripts to be able to handle ipv6
(This used to be ctdb commit 6da7b36b7ccc4ee9b809867ea32036f09a801bb3)
2008-08-20 09:47:00 +10:00
Andrew Tridgell
8d76f55bfc we need an additional gratuitous arp before the NFS tickles
(This used to be ctdb commit f7a70a5f9043b1d7293a515abf5b5228365693da)
2008-08-01 14:23:15 +10:00
Andrew Tridgell
d47fe5f83b ensure we use killtcp on non-NFS/non-CIFS ports for faster failover of
other protocols

(This used to be ctdb commit aefcb1f817581ac8cd67712d07159fc802f96623)
2008-08-01 14:17:50 +10:00
Ronnie Sahlberg
78beb27966 From Alexander Saupp.
If we use vlan tagging and bonding we must strip the vlan part off the name
so we can check the main bonde device for status.

I.e. check bond0  instead of bond0.<VLANTAG>

(This used to be ctdb commit 795c190b004d404b84dda053593139ed51d345e5)
2008-07-28 17:07:44 +10:00
Andrew Tridgell
71f0641dda run the testparm commands in 50.samba in the background, only running
in the foreground if something fails

(This used to be ctdb commit b1fed105ad780e89a128a611ef0bd659818eeebf)
2008-07-23 15:36:23 +10:00
Andrew Tridgell
4eac51341c allow for probing of directories without raising an error
(This used to be ctdb commit 8fed021d11160b137f4140ea02947347250e2959)
2008-07-23 15:35:46 +10: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
0934f40c2a remove a debugging echo statement
(This used to be ctdb commit 495a6293c284a1e74b9c5e0c112e6ed5feead107)
2008-07-14 11:22:41 +10:00
Ronnie Sahlberg
aa0cab2aaa Update to the LVS eventscript.
Do not assume all nodes are members of LVS so always deciding the recmaster will be lvsmaster wont work.

Instead,
Create the set of active LVS nodes as those nodes that are LVS capable and
also HEALTHY.
Except if ALL LVS capable nodes are unhealthy in which case we allow the unhealthy
nodes to be part of the active set.

In the active set, pick one of the active nodes as being the lvsmaster
which will receive all incoming traffic and distribute it across
the active lvs nodes in the cluster.

(This used to be ctdb commit b2ccb891b81b041e2186e038b67bb4354b7892aa)
2008-07-10 11:42:37 +10:00
Ronnie Sahlberg
ab8535eaa5 make LVS a capability so that we can see which nodes are configured with
LVS and which are not using LVS.

"ctdb getcapabilities"

(This used to be ctdb commit 172d01fb34f032e098b1c77a7b0f17bf11301640)
2008-07-10 10:37:22 +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
3523899c2e remove the attempts to restart NFS.
nfs should never stop spontaneously so trying to restart it is
just counterproductive and at best a workaround to
hide real bugs.

(This used to be ctdb commit 90ab48bb8e17f59fcb27ddbff51de546c4447b64)
2008-07-10 08:05:34 +10:00
Ronnie Sahlberg
31967abf5c if we have enabled LVS but we dont have all the required packages
just log it to the messages
dont stop ctdb from starting

(This used to be ctdb commit 3c3d3ac5f7dec258589aaaf0633cab3b3af65cf3)
2008-07-09 15:17:27 +10:00
Ronnie Sahlberg
6bf597d061 mark /etc/ctdb/functions as a config file to keep rpmlint happy
(This used to be ctdb commit 8f6cd88e74de24af8dde2b6cabb2348c4f914b99)
2008-07-09 10:24:19 +10:00
Ronnie Sahlberg
2d644b3fbe Replace \s with [[:space:]] in our regexps we use for egrep.
Kevin Collins noticed that RHEL5 grep-2.5.1-54.2.el5 built for
x86 does not handle \s    while the exact same RHEL5 package for amd64
does!

[[:space:]] is more portable.  Even across the same package version ( different architecture ) from the same vendor :-)

(This used to be ctdb commit fd7bb21c4f9289fc34a57f9d8cb7c13a02d06096)
2008-07-09 10:03:21 +10:00
Ronnie Sahlberg
5ab7eaa553 update the monitor event for nfs to track how many times in a row it has failed
to "ping" the local nfs daemon.

Once it has failed more than 3 times in a row it will attempt to restart the nfs service.

(This used to be ctdb commit a4e89f57a8d733ea74df7b0de31eb977d6d37388)
2008-07-08 09:58:10 +10:00
Andrew Tridgell
75b8cd1096 added option to start ctdb under valgrind
Just add CTDB_VALGRIND=yes in /etc/sysconfig/ctdb, and look at the
logs in /var/log/ctdb_valgrind.*

(This used to be ctdb commit 9acd577c97059e8924582ac52e9ce5785903f120)
2008-07-04 16:58:14 +10:00
Ronnie Sahlberg
03cbb27a79 make /etc/ctdb/functions executable and add a hashbang to it so
rpmlint wont complain

(This used to be ctdb commit 9b8179ad043a80e0e18eeba427a7b7b15690d039)
2008-06-27 09:29:38 +10:00
Ronnie Sahlberg
46220fc467 read the samba sysconfig from the samba eventscript
(This used to be ctdb commit fb9870916ce0798695b09d33208a19d5de1cfd29)
2008-05-27 08:21:18 +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
Ronnie Sahlberg
f4ed8efa05 move the config optoin CTDB_MANAGES_VSFTPD from /etc/sysconfig/vsftpd to /etc/sysconfig/ctdb
(This used to be ctdb commit 1ad0295f86370979d0537f7290f5e9c7d1ff6e94)
2008-05-22 06:01:17 +10:00
Ronnie Sahlberg
e50dfb07bf When ctdb has just been installed on a node, there wont be any persistent databases
stored yet.

Fix a cosmetic and annoying warning message when running "service ctdb start" and supress printing out that "warning your ls command to find the persistent databases didnt find any" ...

(This used to be ctdb commit d32b16a4e5ecc31563c6f2767e7d483f3d980284)
2008-05-16 15:14:17 +10:00