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

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)
This commit is contained in:
Martin Schwenke 2011-08-08 13:13:59 +10:00
parent 54402cdff4
commit 9257b57f2c
2 changed files with 7 additions and 0 deletions

View File

@ -295,6 +295,10 @@ CTDB_DEBUGLEVEL=ERR
# above 90%
# CTDB_CHECK_FS_USE="/:90 /var:90"
# Should CTDB automatically start and stop services when it is told to
# newly manage or no longer manage them?
CTDB_SERVICE_AUTOSTARTSTOP=yes
#
#
# set any default tuning options for ctdb

View File

@ -1072,6 +1072,9 @@ is_ctdb_managed_service ()
ctdb_start_stop_service ()
{
# Do nothing unless configured to...
[ "$CTDB_SERVICE_AUTOSTARTSTOP" = "yes" ] || return 0
_service_name="${1:-${service_name}}"
[ "$event_name" = "monitor" ] || return 0