ctdb-config: Drop CTDB_STARTUP_TIMEOUT
authorMartin Schwenke <martin@meltin.net>
Mon, 31 Jan 2022 08:43:11 +0000 (19:43 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 6 Apr 2022 06:34:37 +0000 (06:34 +0000)
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>
ctdb/config/ctdb.sysconfig
ctdb/config/ctdbd_wrapper
ctdb/doc/ctdb.sysconfig.5.xml

index 2ec0e9d373e15401b6668acb2be9421c27c58ae3..fc57929fc6840498729cf42c11224b3c582ae264 100644 (file)
@@ -9,6 +9,3 @@ ulimit -c unlimited
 
 # Useful if default detection doesn't work
 # CTDB_INIT_STYLE=debian
-
-# If ctdbd takes a long time to start
-# CTDB_STARTUP_TIMEOUT=20
index 34827eaaa29c6c7379e01eea8353523fa31c93eb..842ab4f406f96830e3d7cca725df85e098b66c57 100755 (executable)
@@ -29,24 +29,6 @@ ctdbd="${CTDBD:-/usr/local/sbin/ctdbd}"
 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()
index a7e5d49e7e62cf3db36d43247f04c20e10b25312..26189348360d70a29fd4b7b1d0f49692cd13fd12 100644 (file)
        </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>