diff options
author | gord chung <gord@live.ca> | 2017-01-10 17:59:40 +0000 |
---|---|---|
committer | gordon chung <gord@live.ca> | 2017-01-23 14:31:33 +0000 |
commit | 6eab1304641e60e172d8ce7a14d9877bf836bb8a (patch) | |
tree | fa7f1aa0d3df71f84357a6528b4cdaf2cca1aa4d /devstack | |
parent | fd569a98a76e990c72d584c18ee207d3a57df6e5 (diff) | |
download | ceilometer-6eab1304641e60e172d8ce7a14d9877bf836bb8a.tar.gz |
set panko dispatcher if enabled
clear any existing on start since devstack doesn't know how to properly
iniset a single option of multiopt
Change-Id: Ie4c6329f7b3d1b4686555f7eea0525649d4b31f6
Diffstat (limited to 'devstack')
-rw-r--r-- | devstack/plugin.sh | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh index da43a263..c63c172d 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -230,21 +230,22 @@ function _ceilometer_configure_cache_backend { # Set configuration for storage backend. function _ceilometer_configure_storage_backend { - if [ "$CEILOMETER_BACKEND" = 'none' ] ; then - inidelete $CEILOMETER_CONF DEFAULT meter_dispatchers - inidelete $CEILOMETER_CONF DEFAULT event_dispatchers - if ! is_service_enabled panko-api; then - echo_summary "All Ceilometer backends seems disabled, set \$CEILOMETER_BACKEND to select one." - fi + # clear all old dispatchers since iniset/iniadd functions don't support + # multivalue options well. + inidelete $CEILOMETER_CONF DEFAULT meter_dispatchers + inidelete $CEILOMETER_CONF DEFAULT event_dispatchers + + if [ "$CEILOMETER_BACKEND" = 'none' ] && ! is_service_enabled panko-api; then + echo_summary "All Ceilometer backends seems disabled, set \$CEILOMETER_BACKEND to select one." elif [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then - iniset $CEILOMETER_CONF DEFAULT meter_dispatchers database + iniadd $CEILOMETER_CONF DEFAULT meter_dispatchers database iniset $CEILOMETER_CONF database metering_connection $(database_connection_url ceilometer) elif [ "$CEILOMETER_BACKEND" = 'mongodb' ] ; then - iniset $CEILOMETER_CONF DEFAULT meter_dispatchers database + iniadd $CEILOMETER_CONF DEFAULT meter_dispatchers database iniset $CEILOMETER_CONF database metering_connection mongodb://localhost:27017/ceilometer elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then - iniset $CEILOMETER_CONF DEFAULT meter_dispatchers gnocchi - iniset $CEILOMETER_CONF DEFAULT event_dispatchers gnocchi + iniadd $CEILOMETER_CONF DEFAULT meter_dispatchers gnocchi + iniadd $CEILOMETER_CONF DEFAULT event_dispatchers gnocchi # NOTE(gordc): set higher retry in case gnocchi is started after ceilometer on a slow machine iniset $CEILOMETER_CONF storage max_retries 20 # NOTE(gordc): set batching to better handle recording on a slow machine @@ -260,6 +261,12 @@ function _ceilometer_configure_storage_backend { else die $LINENO "Unable to configure unknown CEILOMETER_BACKEND $CEILOMETER_BACKEND" fi + + # configure panko + if is_service_enabled panko-api; then + iniadd $CEILOMETER_CONF DEFAULT event_dispatchers panko + fi + _ceilometer_drop_database } |