1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

107 Commits

Author SHA1 Message Date
Martin Schwenke
a4a048b5cd Now vaguely tested initscript updates.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f1e350f9edb74cc44b6c5be4c062fd93e98ba8c4)
2009-11-19 16:48:19 +11: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
Martin Schwenke
b20d680070 Merge commit 'origin/master'
(This used to be ctdb commit 5ad283458e59ea8232e01f34be007901c10c8a2e)
2009-10-16 16:36:48 +11:00
Martin Schwenke
0bff3b4289 initscript: when stopping on Red Hat use the success/failure functions.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit bf5402b41282da94fee1ab3e4546ec089ff12f37)
2009-10-16 16:35:56 +11:00
Ronnie Sahlberg
30d9fbfbec move the logging of the warning "No reclock file used" to the startup case so we only print this warning on "service ctdb start" and not for "service ctdb *"
(This used to be ctdb commit eb854f65f978f24583e221138eb4f9b917b89285)
2009-10-14 12:12:04 +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
e893393ef2 remove a check for the reclock file we dont need
(This used to be ctdb commit 54c047c48902a15e5d2925bfa86e012a11188796)
2009-08-28 05:19:44 +10:00
Ronnie Sahlberg
66c8d4fb3d make it possible to start the daemon in STOPPED mode
(This used to be ctdb commit 866aa995dc029db6e510060e9e95a8ca149094ac)
2009-07-09 11:57:20 +10:00
Ronnie Sahlberg
2708b305ca Initscript cleanups.
* Move building of CTDB_OPTIONS to new function build_ctdb_options()
  and have it use a helper function for readability.

* New functions check_persistent_databases() and set_ctdb_variables().

* Remove valgrind-specific stop code, since the general pkill should
  kill ctdbd when running under valgrind.

* Remove some bash-isms (e.g. >& /dev/null) since the script is /bin/sh.

* Make indentation consistent.

* Minor clean-ups.

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

Conflicts:

	config/ctdb.init

(This used to be ctdb commit bebb21f18e3026cb78a306104e92ee005d1077b2)
2009-07-07 13:45:19 +10:00
Ronnie Sahlberg
77ef745394 Allow setting the recovery lock file as "", which means that we do not use a file and that we implicitely also disable the recovery lock checking.
Update the init script to allow starting without a reclock file.

(This used to be ctdb commit 07855ff5eba71e7d607d52e234a42553d9b93605)
2009-06-25 11:50:45 +10:00
Martin Schwenke
566314ca97 Fix minor problem in previous initscript commit.
The valgrind start case should not use daemon, since this is specific
to Red Hat.

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

(This used to be ctdb commit 867f57d166395c92949e480ca725249b0ca8950b)
2009-06-19 18:08:54 +10:00
Martin Schwenke
3dad79b88e Initscript fixes, mostly for "stop" action.
Use a local variable $ctdbd so that we always run ctdbd from the the
same place and so that we know what to kill.  This variable respects
the $CTDBD environment variable, which may be used to specify an
alternative location for the daemon.

In the important cases use "pkill -0 -f" to check if ctdbd is
running.  Also, remove the special case for killing ctdbd when running
under valgrind.  The regular case will handle this just fine.

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

(This used to be ctdb commit 070305adfe636c2580776e6bf24bb8be06622b86)
2009-06-19 18:08:31 +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
2e3542b5e5 dont unconditionally kill/restart ctdb when given "service ctdb start" only start ctdb if it is not already running, and print an error message othervise
(This used to be ctdb commit 94343309992929a592348c936e09a7b4f8b512c1)
2009-04-30 17:38:30 +10:00
Andrew Tridgell
37e2417c59 change shutdown level for ctdb to be 01
We want ctdb to shutdown first, as it manages many other
services. With the old level of 32 the NFS service would shutdown
first, and that would trigger ctdb to do a recovery. Then ctdb itself
would be shutdown a few seconds later, which causes a lot of error
messages in the other nodes logs

(This used to be ctdb commit 2f952af1a12e81a652ec9a4794db96f9593f2676)
2009-04-23 11:35:42 +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
686adea3fe set --single-public-ip when lvs is used
(This used to be ctdb commit 292fff6eace39141591871e12f9a64e3441237be)
2009-03-24 13:51:32 +11: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
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
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
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
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
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
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
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
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
Ronnie Sahlberg
d3e24f744a When we run the init script to start the ctdb service
Use tdbdump to verify that all persistent database files are good
before we start the daemon.

(This used to be ctdb commit 13d3eb9a8bc7fad14fcd3e7e023c1336657424d6)
2008-05-12 16:44:33 +10:00
Ronnie Sahlberg
2c23959616 make sure we lose all elections for recmaster role if we do not have the recmaster capability.
(unless there are no other node at all available with this capability)

(This used to be ctdb commit 8556e9dc897c6b9b9be0b52f391effb1f72fbd80)
2008-05-06 13:56:56 +10:00
Ronnie Sahlberg
d86e48d5ff Add ability to disable recmaster and lmaster roles through sysconfig file and
command line arguments

(This used to be ctdb commit 34b952e4adc53ee82345275a0e28231fa1b2533e)
2008-05-06 10:41:22 +10:00
Ronnie Sahlberg
39539f6044 Add a new parameter to /etc/sysconfig/ctdb
CTDB_START_AS_DISABLED="yes"

and command line argument
--start-as-disabled

When set, this makes the ctdb node to always start in DISABLED mode and will thus not host any public ip addresses.
The administrator must manually "ctdb enable" the node after it has started when the administrator wants the node to start hosting public ip addresses.

Using this option it is possible to start ctdb on a node without causing any reallocation of ip addresses when it is starting. The node will still merge with the cluster and there will still be a recovery phase but the ip address allocations will not change in the cluster.

(This used to be ctdb commit b93d29f43f5306c244c887b54a77bca8a061daf2)
2008-02-22 09:42:52 +11:00
Andrew Tridgell
b4a5c5e988 make sure vars are set at startup before recovery
(This used to be ctdb commit 2c789f19b069c975c133dd8488b566a6715a8e76)
2008-01-04 12:41:53 +11:00
Ronnie Sahlberg
bdd67bba1e add a --single-public-ip argument to ctdbd to specify the ip address
used in single public ip address mode.
when using this argument, --public-interface must also be used.

add a vnn structure to the ctdb context to describe the single public ip 
address


update the killtcp control in the daemon that if a socketpair that is to 
be killed does not match a normal public address it checks if the 
destination address maches the single public ip address and if so uses 
that vnn structure from the ctdb context


this allows killtcp to kill also connections to the single public ip 
instead of only normal public addresses

(This used to be ctdb commit 5661ba17b91f62821dec1c76056c78b99752a90b)
2007-10-10 09:42:32 +10:00
Andrew Tridgell
416c0cec6e make the persistent dbdir configurable
(This used to be ctdb commit 2587b887dcfce26b12c66fcb5d34e92da42a1776)
2007-09-21 16:12:04 +10:00
Andrew Tridgell
c62490569b cope with non-standard install dirs in event scripts
(This used to be ctdb commit 52fff5345873690a9cc86495f414343eaa3bd540)
2007-09-14 14:14:03 +10:00
Andrew Tridgell
305f432e50 fix pkill args
(This used to be ctdb commit 9690de97b4746f4a79830465e3a1679e9fbda671)
2007-09-14 11:59:04 +10:00
Andrew Tridgell
3b159e4e60 wait for ctdbd to finish cleanup before considering "service ctdb stop" to be done
(This used to be ctdb commit 216eb4be7ec481cfe9aaeeada257b77cb394d2e4)
2007-09-14 09:25:11 +10:00
Andrew Tridgell
2f86c3f827 ensure smbd and winbindd do die in 50.samba
(This used to be ctdb commit 6f23affedb626fc7a5ca86c4763f3045a5586231)
2007-09-13 14:36:23 +10:00
Andrew Tridgell
96c54c6188 handle hung or slow ctdb daemons on shutdown
(This used to be ctdb commit a3089211782ab12387c1b04efa28914c94d89b30)
2007-09-12 13:26:24 +10:00
Andrew Tridgell
57d8102cf8 added back --public-interface to startup script
(This used to be ctdb commit 9e9cb3c0da7251f522c655366ef0868037577a9c)
2007-09-10 15:09:28 +10:00
Ronnie Sahlberg
12ebb74838 change how we do public addresses and takeover so that we can have
multiple public addresses spread across multiple interfaces on each 
node.

this is a massive patch since we have previously made the assumtion that 
we only have one public address per node.

get rid of the public_interface argument.  the public addresses file 
now explicitely lists which interface the address belongs to

(This used to be ctdb commit 462ebbc791e906a6b874c862defea43235597ca8)
2007-09-04 09:50:07 +10:00
Ronnie Sahlberg
3b9d50f3ee change the now rather small /etc/ctdb/events script into a service
specific script /etc/ctdb/events.d/00.ctdb

get rid of CTDB_EVENTS_SCRIPT and --event-script

(This used to be ctdb commit 81ccfaf838e5772d4a58eb6a70224b7b39aba9f3)
2007-08-15 15:01:31 +10:00
Andrew Tridgell
0becf46deb allow extra option override in /etc/sysconfig/ctdb
(This used to be ctdb commit f46fae64263ea4776e4bbf9cf14dff17b5b68ddb)
2007-07-13 09:14:15 +10:00
Andrew Tridgell
62b30e478d make sure we don't have any namespace collision problems with config variables
(This used to be ctdb commit dde9024b25fe12cf25c059e5accb3ca21838b130)
2007-06-04 15:44:52 +10:00
Andrew Tridgell
837fb236b9 handle NETWORKING var not existing
(This used to be ctdb commit f8cf9f81e8f81818dc141eda5419c2749a0652a4)
2007-06-03 22:11:48 +10:00
Andrew Tridgell
e763874872 make the init scripts more portable about location of system config files
(This used to be ctdb commit 65f3e2bc722e314b2c51c3bfdc544b408a8a64cf)
2007-06-03 22:07:07 +10:00
Ronnie Sahlberg
dac3f7d23c ubuntu uses a different style of init scripts than redhat and suse
(This used to be ctdb commit 6d3bee5d1a7dd6718045c673cfd150e3207ea970)
2007-06-03 19:24:52 +10:00
Andrew Tridgell
b9973e1d3e more portability tweaks in the init script
(This used to be ctdb commit 83a1c79e95af93a9ccfe78556ac5692c0315a3e4)
2007-06-03 17:53:26 +10:00
Andrew Tridgell
ee3ce951ce do a full restart in init cron call
(This used to be ctdb commit ed181dce8f307bd8f36de42351d04f39b2396836)
2007-06-03 10:29:57 +10:00
Andrew Tridgell
794d6dd59d move config files to config/ directory
(This used to be ctdb commit f95de519b885c8e1f40df0cda70fd796e479a22a)
2007-06-02 19:40:07 +10:00