From 322ccb0f4324246ac4d6d61c93c33a62f3075486 Mon Sep 17 00:00:00 2001 From: Hanxi Liu Date: Thu, 29 Dec 2016 16:40:18 +0800 Subject: [PATCH] devstack: check for ceilometer+panko service Make sure panko is enabled before ceilometer in case potential issues occur. Change-Id: I7d27f6188557249789193cbb3a1928a2d7ee84b4 Partial-Bug: #1633592 --- devstack/settings | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/devstack/settings b/devstack/settings index 0b7710dc54..de76bf9706 100644 --- a/devstack/settings +++ b/devstack/settings @@ -50,11 +50,12 @@ GITBRANCH["python-ceilometerclient"]=${CEILOMETERCLIENT_BRANCH:-master} GITDIR["python-ceilometerclient"]=$DEST/python-ceilometerclient GITDIR["ceilometermiddleware"]=$DEST/ceilometermiddleware -# Make sure gnocchi is enabled before ceilometer -function _ceilometer_check_for_gnocchi { +# Make sure gnocchi and panko plugin is enabled before ceilometer +function _ceilometer_check_for_storage { + local plugins="${DEVSTACK_PLUGINS}" + local plugin + if [ "$CEILOMETER_BACKEND" == 'gnocchi' ]; then - local plugins="${DEVSTACK_PLUGINS}" - local plugin local seen_gnocchi=False for plugin in ${plugins//,/ }; do @@ -65,9 +66,20 @@ function _ceilometer_check_for_gnocchi { fi done fi + + local seen_ceilometer=False + + for plugin in ${plugins//,/ }; do + if [ "$plugin" == 'ceilometer' ]; then + seen_ceilometer=True + elif [ "$plugin" == 'panko' ] && [[ "$seen_ceilometer" == 'True' ]]; then + die $LINENO "Panko must be enabled before ceilometer!" + fi + done } -_ceilometer_check_for_gnocchi +_ceilometer_check_for_storage + # Get rid of this before done. # Tell emacs to use shell-script-mode ## Local variables: