summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-12-18 17:08:55 +1100
committerAmitay Isaacs <amitay@samba.org>2014-01-17 09:58:26 +0100
commitb7bfe46636d07c71f83daff884ec339c9b4aee72 (patch)
treea3034a3b59121ed837f04acbe8658752becb2240
parente6304d1e1adc86fc9c1199feb7b4802614fbc70f (diff)
downloadsamba-b7bfe46636d07c71f83daff884ec339c9b4aee72.tar.gz
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Jan 17 09:58:26 CET 2014 on sn-devel-104
-rwxr-xr-xctdb/config/functions8
1 files 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 ()
{