Merge "Deprecate event_dispatchers and meter_dispatchers options"

This commit is contained in:
Jenkins 2017-03-01 15:57:46 +00:00 committed by Gerrit Code Review
commit bb9d962868
2 changed files with 14 additions and 10 deletions

View File

@ -29,10 +29,24 @@ OPTS = [
cfg.MultiStrOpt('meter_dispatchers',
deprecated_name='dispatcher',
default=[],
deprecated_for_removal=True,
deprecated_reason='This option only be used in collector '
'service, the collector service has '
'been deprecated and will be removed '
'in the future, this should also be '
'deprecated for removal with collector '
'service.',
help='Dispatchers to process metering data.'),
cfg.MultiStrOpt('event_dispatchers',
default=[],
deprecated_name='dispatcher',
deprecated_for_removal=True,
deprecated_reason='This option only be used in collector '
'service, the collector service has '
'been deprecated and will be removed '
'in the future, this should also be '
'deprecated for removal with collector '
'service.',
help='Dispatchers to process event data.'),
]

View File

@ -232,11 +232,6 @@ function _ceilometer_configure_cache_backend {
# Set configuration for storage backend.
function _ceilometer_configure_storage_backend {
# 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' ] ; then
# It's ok for the backend to be 'none', if panko is enabled. We do not
# combine this condition with the outer if statement, so that the else
@ -245,14 +240,10 @@ function _ceilometer_configure_storage_backend {
echo_summary "All Ceilometer backends seems disabled, set \$CEILOMETER_BACKEND to select one."
fi
elif [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then
iniadd $CEILOMETER_CONF DEFAULT meter_dispatchers database
iniset $CEILOMETER_CONF database metering_connection $(database_connection_url ceilometer)
elif [ "$CEILOMETER_BACKEND" = 'mongodb' ] ; then
iniadd $CEILOMETER_CONF DEFAULT meter_dispatchers database
iniset $CEILOMETER_CONF database metering_connection mongodb://localhost:27017/ceilometer
elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then
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
@ -275,7 +266,6 @@ function _ceilometer_configure_storage_backend {
# configure panko
if is_service_enabled panko-api; then
iniadd $CEILOMETER_CONF DEFAULT event_dispatchers panko
if ! grep -q 'panko' $CEILOMETER_CONF_DIR/event_pipeline.yaml ; then
echo ' - panko://' >> $CEILOMETER_DIR/ceilometer/pipeline/data/event_pipeline.yaml
fi