ctdb-scripts: Drop broken wrapper code that uses PID
authorMartin Schwenke <martin@meltin.net>
Mon, 5 Mar 2018 09:16:00 +0000 (20:16 +1100)
committerMartin Schwenke <martins@samba.org>
Fri, 9 Mar 2018 06:08:24 +0000 (07:08 +0100)
The code has been broken since commit
4b652c1527afe7eff4075c95946abfa114d74015.

If ctdbd isn't all the way up in time just make a basic attempt to
shut it down.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/ctdbd_wrapper

index a9587864f5b1a277506f4a33bf5637faa29767eb..a507f489bccaa9b7ffea7d771dc53ceb63c8789a 100755 (executable)
@@ -222,7 +222,6 @@ start()
     eval "$ctdbd" "$ctdb_options" || return 1
 
     # Wait until ctdbd has started and is ready to respond to clients.
-    _pid=""
     _timeout="${CTDB_STARTUP_TIMEOUT:-10}"
     _count=0
     while [ "$_count" -lt "$_timeout" ] ; do
@@ -234,8 +233,9 @@ start()
        sleep 1
     done
 
-    echo "Timed out waiting for initialisation - check logs - killing CTDB"
-    kill_ctdbd "$_pid"
+    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
 }