From b7bfe46636d07c71f83daff884ec339c9b4aee72 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 18 Dec 2013 17:08:55 +1100 Subject: [PATCH] ctdb/eventscripts: Move all eventscript state under $CTDB_VARDIR/state Services can be flagged for reconfigure when they release IPs at shutdown. The flag is never removed and the service is prematurely reconfigured during the first "ipreallocated" event, before any IPs are hosted and before the "startup" event has actually started the services. $CTDB_VARDIR/state directly contained the service state subdirectories and is already removed in the "init" event. Just push the service state subdirectories down a level and put everything else in a subdirectory. This way all the eventscript state gets cleaned up every time CTDB starts up. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Jan 17 09:58:26 CET 2014 on sn-devel-104 --- ctdb/config/functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ctdb/config/functions b/ctdb/config/functions index ec9979967ef..1aad3ae79b3 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -986,12 +986,12 @@ ctdb_check_counter () { ######################################################## -ctdb_status_dir="$CTDB_VARDIR/status" -ctdb_fail_dir="$CTDB_VARDIR/failcount" +ctdb_status_dir="$CTDB_VARDIR/state/service_status" +ctdb_fail_dir="$CTDB_VARDIR/state/failcount" ctdb_setup_service_state_dir () { - service_state_dir="$CTDB_VARDIR/state/${1:-${service_name}}" + service_state_dir="$CTDB_VARDIR/state/service_state/${1:-${service_name}}" mkdir -p "$service_state_dir" || { echo "Error creating state dir \"$service_state_dir\"" exit 1 @@ -1001,7 +1001,7 @@ ctdb_setup_service_state_dir () ######################################################## # Managed status history, for auto-start/stop -ctdb_managed_dir="$CTDB_VARDIR/managed_history" +ctdb_managed_dir="$CTDB_VARDIR/state/managed_history" _ctdb_managed_common () { -- 2.11.4.GIT