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>
# Useful if default detection doesn't work
# CTDB_INIT_STYLE=debian
-
-# If ctdbd takes a long time to start
-# CTDB_STARTUP_TIMEOUT=20
start()
{
eval "$ctdbd" || return 1
-
- # Wait until ctdbd has started and is ready to respond to clients.
- _timeout="${CTDB_STARTUP_TIMEOUT:-10}"
- _count=0
- while [ "$_count" -lt "$_timeout" ] ; do
- if $CTDB runstate first_recovery startup running >/dev/null 2>&1 ; then
- return 0
- fi
-
- _count=$((_count + 1))
- sleep 1
- done
-
- echo "Timed out waiting for initialisation - check logs"
- # Attempt a shutdown just in case things are still running
- $CTDB shutdown >/dev/null 2>&1
- drop_all_public_ips >/dev/null 2>&1
- return 1
}
stop()
</listitem>
</varlistentry>
- <varlistentry>
- <term>CTDB_STARTUP_TIMEOUT=<parameter>NUM</parameter></term>
- <listitem>
- <para>
- NUM is the number of seconds to wait for
- <citerefentry><refentrytitle>ctdbd</refentrytitle>
- <manvolnum>1</manvolnum></citerefentry> complete early
- initialisation up to a point where it is unlikely to
- abort. If <command>ctdbd</command> doesn't complete the
- "setup" event before this timeout then it is killed.
- </para>
-
- <para>
- Defaults: 10
- </para>
- </listitem>
- </varlistentry>
-
</variablelist>
</refsect1>