Add --debug-logging parameter to devtest
We support passing a Debug parameter to our heat templates to set app log levels to debug. Allow users of devtest to turn this on by passing --debug-logging to devtest scripts. Change-Id: I3f267f3d6290fddb40d80b1c889bade8980ddb43
This commit is contained in:
parent
c204ddffe9
commit
2f32490b56
|
@ -37,6 +37,7 @@ function show_options () {
|
|||
echo " --no-undercloud -- Use the seed as the baremetal cloud to deploy the"
|
||||
echo " overcloud from."
|
||||
echo " --build-only -- Builds images but doesn't attempt to run them."
|
||||
echo " --debug-logging -- Enable debug logging in the undercloud and overcloud."
|
||||
echo " --heat-env-undercloud ENVFILE"
|
||||
echo " -- heat environment file for the undercloud."
|
||||
echo " --heat-env-overcloud ENVFILE"
|
||||
|
@ -52,6 +53,7 @@ function show_options () {
|
|||
}
|
||||
|
||||
BUILD_ONLY=
|
||||
DEBUG_LOGGING=
|
||||
NODES_ARG=
|
||||
NO_UNDERCLOUD=
|
||||
NETS_ARG=
|
||||
|
@ -62,7 +64,7 @@ USE_CACHE=0
|
|||
export TRIPLEO_CLEANUP=1
|
||||
DEVTEST_START=$(date +%s) #nodocs
|
||||
|
||||
TEMP=$(getopt -o h,c -l build-only,existing-environment,help,trash-my-machine,nodes:,bm-networks:,no-undercloud,heat-env-overcloud:,heat-env-undercloud: -n $SCRIPT_NAME -- "$@")
|
||||
TEMP=$(getopt -o h,c -l build-only,debug-logging,existing-environment,help,trash-my-machine,nodes:,bm-networks:,no-undercloud,heat-env-overcloud:,heat-env-undercloud: -n $SCRIPT_NAME -- "$@")
|
||||
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
||||
|
||||
# Note the quotes around `$TEMP': they are essential!
|
||||
|
@ -71,6 +73,7 @@ eval set -- "$TEMP"
|
|||
while true ; do
|
||||
case "$1" in
|
||||
--build-only) BUILD_ONLY=--build-only; shift 1;;
|
||||
--debug-logging) DEBUG_LOGGING=--debug-logging; shift 1;;
|
||||
--trash-my-machine) CONTINUE=--trash-my-machine; shift 1;;
|
||||
--existing-environment) TRIPLEO_CLEANUP=0; shift 1;;
|
||||
--nodes) NODES_ARG="--nodes $2"; shift 2;;
|
||||
|
@ -322,7 +325,7 @@ fi
|
|||
### --end
|
||||
DEVTEST_UC_START=$(date +%s)
|
||||
if [ -z "$NO_UNDERCLOUD" ]; then
|
||||
devtest_undercloud.sh $TE_DATAFILE $BUILD_ONLY $HEAT_ENV_UNDERCLOUD
|
||||
devtest_undercloud.sh $TE_DATAFILE $BUILD_ONLY $DEBUG_LOGGING $HEAT_ENV_UNDERCLOUD
|
||||
if [ -z "$BUILD_ONLY" ]; then
|
||||
export no_proxy=$no_proxy,$(os-apply-config --type raw -m $TE_DATAFILE --key undercloud.endpointhost)
|
||||
source $TRIPLEO_ROOT/tripleo-incubator/undercloudrc
|
||||
|
@ -340,7 +343,7 @@ DEVTEST_UC_END=$(date +%s)
|
|||
## devtest_overcloud.sh
|
||||
### --end
|
||||
DEVTEST_OC_START=$(date +%s)
|
||||
devtest_overcloud.sh $BUILD_ONLY $HEAT_ENV_OVERCLOUD
|
||||
devtest_overcloud.sh $BUILD_ONLY $DEBUG_LOGGING $HEAT_ENV_OVERCLOUD
|
||||
DEVTEST_OC_END=$(date +%s)
|
||||
if [ -z "$BUILD_ONLY" ]; then
|
||||
### --include
|
||||
|
|
|
@ -7,6 +7,7 @@ SCRIPT_NAME=$(basename $0)
|
|||
SCRIPT_HOME=$(dirname $0)
|
||||
|
||||
BUILD_ONLY=
|
||||
DEBUG_LOGGING=
|
||||
HEAT_ENV=
|
||||
|
||||
function show_options () {
|
||||
|
@ -17,13 +18,14 @@ function show_options () {
|
|||
echo "Options:"
|
||||
echo " -h -- this help"
|
||||
echo " --build-only -- build the needed images but don't deploy them."
|
||||
echo " --debug-loggig -- Turn on debug logging in the built overcloud."
|
||||
echo " --heat-env -- path to a JSON heat environment file."
|
||||
echo " Defaults to \$TRIPLEO_ROOT/overcloud-env.json."
|
||||
echo
|
||||
exit $1
|
||||
}
|
||||
|
||||
TEMP=$(getopt -o h -l build-only,heat-env:,help -n $SCRIPT_NAME -- "$@")
|
||||
TEMP=$(getopt -o h -l build-only,debug-logging,heat-env:,help -n $SCRIPT_NAME -- "$@")
|
||||
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
||||
|
||||
# Note the quotes around `$TEMP': they are essential!
|
||||
|
@ -32,6 +34,7 @@ eval set -- "$TEMP"
|
|||
while true ; do
|
||||
case "$1" in
|
||||
--build-only) BUILD_ONLY="1"; shift 1;;
|
||||
--debug-logging) DEBUG_LOGGING="1"; shift 1;;
|
||||
--heat-env) HEAT_ENV="$2"; shift 2;;
|
||||
-h | --help) show_options 0;;
|
||||
--) shift ; break ;;
|
||||
|
@ -320,6 +323,14 @@ ENV_JSON=$(jq '.parameters = {
|
|||
"SSLKey": "'"${OVERCLOUD_SSL_KEY}"'"
|
||||
}' <<< $ENV_JSON)
|
||||
|
||||
### --end
|
||||
if [ "$DEBUG_LOGGING" = "1" ]; then
|
||||
ENV_JSON=$(jq '.parameters = .parameters + {
|
||||
"Debug": "True",
|
||||
}' <<< $ENV_JSON)
|
||||
fi
|
||||
### --include
|
||||
|
||||
if [ $OVERCLOUD_BLOCKSTORAGESCALE -gt 0 ]; then
|
||||
ENV_JSON=$(jq '.parameters = {} + .parameters + {
|
||||
"BlockStorageImage": "'"${OVERCLOUD_BLOCKSTORAGE_ID}"'",
|
||||
|
|
|
@ -7,6 +7,7 @@ SCRIPT_NAME=$(basename $0)
|
|||
SCRIPT_HOME=$(dirname $0)
|
||||
|
||||
BUILD_ONLY=
|
||||
DEBUG_LOGGING=
|
||||
HEAT_ENV=
|
||||
|
||||
function show_options () {
|
||||
|
@ -18,13 +19,14 @@ function show_options () {
|
|||
echo " -h -- this help"
|
||||
echo " -c -- re-use existing source/images if they exist."
|
||||
echo " --build-only -- build the needed images but don't deploy them."
|
||||
echo " --debug-logging -- Turn on debug logging in the undercloud."
|
||||
echo " --heat-env -- path to a JSON heat environment file."
|
||||
echo " Defaults to \$TRIPLEO_ROOT/undercloud-env.json."
|
||||
echo
|
||||
exit $1
|
||||
}
|
||||
|
||||
TEMP=$(getopt -o c,h -l build-only,heat-env:,help -n $SCRIPT_NAME -- "$@")
|
||||
TEMP=$(getopt -o c,h -l build-only,debug-logging,heat-env:,help -n $SCRIPT_NAME -- "$@")
|
||||
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
|
||||
|
||||
# Note the quotes around `$TEMP': they are essential!
|
||||
|
@ -34,6 +36,7 @@ while true ; do
|
|||
case "$1" in
|
||||
-c) USE_CACHE=1; shift 1;;
|
||||
--build-only) BUILD_ONLY="1"; shift 1;;
|
||||
--debug-logging) DEBUG_LOGGING="1"; shift 1;;
|
||||
--heat-env) HEAT_ENV="$2"; shift 2;;
|
||||
-h | --help) show_options 0;;
|
||||
--) shift ; break ;;
|
||||
|
@ -246,6 +249,15 @@ ENV_JSON=$(jq '.parameters = {
|
|||
"NtpServer": "'"${UNDERCLOUD_NTP_SERVER}"'"
|
||||
}' <<< $ENV_JSON)
|
||||
|
||||
|
||||
### --end
|
||||
if [ "$DEBUG_LOGGING" = "1" ]; then
|
||||
ENV_JSON=$(jq '.parameters = .parameters + {
|
||||
"Debug": "True",
|
||||
}' <<< $ENV_JSON)
|
||||
fi
|
||||
### --include
|
||||
|
||||
#Add Ceilometer to env only if USE_UNDERCLOUD_UI is specified
|
||||
|
||||
if [ "$USE_UNDERCLOUD_UI" -ne 0 ] ; then
|
||||
|
|
Loading…
Reference in New Issue