Save stackenv values more often
Having these for debugging can be handy Change-Id: I18c2658eec83a0f20f697a3c4c36aa1cf46b7a92
This commit is contained in:
parent
a79de45497
commit
6816234dc8
@ -43,6 +43,25 @@ declare -A GITDIR
|
|||||||
|
|
||||||
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
||||||
|
|
||||||
|
# Save these variables to .stackenv
|
||||||
|
STACK_ENV_VARS="BASE_SQL_CONN DATA_DIR DEST ENABLED_SERVICES HOST_IP \
|
||||||
|
KEYSTONE_AUTH_PROTOCOL KEYSTONE_AUTH_URI KEYSTONE_SERVICE_URI \
|
||||||
|
LOGFILE OS_CACERT SERVICE_HOST SERVICE_PROTOCOL STACK_USER TLS_IP"
|
||||||
|
|
||||||
|
|
||||||
|
# Saves significant environment variables to .stackenv for later use
|
||||||
|
# Refers to a lot of globals, only TOP_DIR and STACK_ENV_VARS are required to
|
||||||
|
# function, the rest are simply saved and do not cause problems if they are undefined.
|
||||||
|
# save_stackenv [tag]
|
||||||
|
function save_stackenv {
|
||||||
|
local tag=${1:-""}
|
||||||
|
# Save some values we generated for later use
|
||||||
|
time_stamp=$(date "+$TIMESTAMP_FORMAT")
|
||||||
|
echo "# $time_stamp $tag" >$TOP_DIR/.stackenv
|
||||||
|
for i in $STACK_ENV_VARS; do
|
||||||
|
echo $i=${!i} >>$TOP_DIR/.stackenv
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Normalize config values to True or False
|
# Normalize config values to True or False
|
||||||
# Accepts as False: 0 no No NO false False FALSE
|
# Accepts as False: 0 no No NO false False FALSE
|
||||||
@ -68,6 +87,7 @@ function isset {
|
|||||||
[[ -v "$1" ]]
|
[[ -v "$1" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Control Functions
|
# Control Functions
|
||||||
# =================
|
# =================
|
||||||
|
|
||||||
|
13
stack.sh
13
stack.sh
@ -669,6 +669,9 @@ if is_service_enabled s-proxy; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Save configuration values
|
||||||
|
save_stackenv $LINENO
|
||||||
|
|
||||||
|
|
||||||
# Install Packages
|
# Install Packages
|
||||||
# ================
|
# ================
|
||||||
@ -950,6 +953,9 @@ fi
|
|||||||
# Initialize the directory for service status check
|
# Initialize the directory for service status check
|
||||||
init_service_check
|
init_service_check
|
||||||
|
|
||||||
|
# Save configuration values
|
||||||
|
save_stackenv $LINENO
|
||||||
|
|
||||||
|
|
||||||
# Start Services
|
# Start Services
|
||||||
# ==============
|
# ==============
|
||||||
@ -1294,12 +1300,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Save some values we generated for later use
|
# Save some values we generated for later use
|
||||||
CURRENT_RUN_TIME=$(date "+$TIMESTAMP_FORMAT")
|
save_stackenv
|
||||||
echo "# $CURRENT_RUN_TIME" >$TOP_DIR/.stackenv
|
|
||||||
for i in BASE_SQL_CONN ENABLED_SERVICES HOST_IP LOGFILE \
|
|
||||||
SERVICE_HOST SERVICE_PROTOCOL STACK_USER TLS_IP KEYSTONE_AUTH_PROTOCOL OS_CACERT; do
|
|
||||||
echo $i=${!i} >>$TOP_DIR/.stackenv
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
# Wrapup configuration
|
# Wrapup configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user