eventscripts: Attach to persistent ctdb.tdb in "startup" event
authorMartin Schwenke <martin@meltin.net>
Sun, 2 Mar 2014 18:50:14 +0000 (05:50 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 26 Mar 2014 02:58:29 +0000 (13:58 +1100)
"statd-callout notify" currently complains until an add-client or
del-client is done.

Given that we might use ctdb.tdb for something else in the future it
makes sense attach to it in the "startup" event.  This could be done
in the background but it should be so lightweight that a timeout will
indicate serious problems.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(Imported from commit 87d58fd07b1294688b8fc6dbdf3dbb6cb12d3a80)

config/events.d/00.ctdb

index 719bee8b2c25a8352b7a1b626819684292226fbc..a0f4102ed9b15fe3fd8b968659351edaea80198b 100755 (executable)
@@ -196,12 +196,13 @@ case "$1" in
        fi
        ;;
 
-     setup)
+    setup)
        # Set any tunables from the config file
        set_ctdb_variables || die "Failed to set CTDB tunables"
        ;;
 
     startup)
+       ctdb attach ctdb.tdb persistent
        update_config_from_tdb &
        ;;
     monitor)