mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
eventscripts: "setup" event doesn't need to wait for SETUP runstate
The "setup" event isn't called until ctdbd is in CTDB_RUNSTATE_SETUP anyway... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9ea57af557028b1d2e5c560e7bcf4d014b9a8b1e)
This commit is contained in:
parent
3b2f7330cc
commit
01d879806b
@ -136,19 +136,6 @@ set_ctdb_variables () {
|
||||
done
|
||||
}
|
||||
|
||||
wait_until_ready () {
|
||||
_timeout="${1:-10}" # default is 10 seconds
|
||||
|
||||
_count=0
|
||||
while ! ctdb runstate setup >/dev/null 2>&1 ; do
|
||||
if [ $_count -ge $_timeout ] ; then
|
||||
return 1
|
||||
fi
|
||||
sleep 1
|
||||
_count=$(($_count + 1))
|
||||
done
|
||||
}
|
||||
|
||||
############################################################
|
||||
|
||||
ctdb_check_args "$@"
|
||||
@ -176,8 +163,6 @@ case "$1" in
|
||||
;;
|
||||
|
||||
setup)
|
||||
# Make sure CTDB daemon is ready to process requests
|
||||
wait_until_ready || die "CTDB did not become ready for setup"
|
||||
# Set any tunables from the config file
|
||||
set_ctdb_variables || die "Failed to set CTDB tunables"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user