From 420133dd0e485694c189c9cf44c46223304bbc62 Mon Sep 17 00:00:00 2001 From: Pradeep Kilambi Date: Thu, 17 Aug 2017 12:59:12 -0400 Subject: [PATCH] Disable ceilometer middleware by default ceilometer in swift proxy can generate lot of data and put extreme load. Lets disable this by default. We did the same in tripleo in this patch I40f47d46fdb06f31a739b590bf653bca71e33f61 Change-Id: I800dba738e4511824b509170f06d1da0f1e6cbe2 --- docs/packstack.rst | 3 +++ packstack/plugins/ceilometer_800.py | 11 +++++++++++ .../puppet/modules/packstack/manifests/swift/proxy.pp | 3 ++- packstack/puppet/templates/controller.pp | 3 ++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/packstack.rst b/docs/packstack.rst index 05739d711..0b417a8f4 100755 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -1055,6 +1055,9 @@ Ceilometer Config parameters **CONFIG_CEILOMETER_METERING_BACKEND** Backend driver for Telemetry's metering backend configuration. ['database', 'gnocchi'] +**CONFIG_ENABLE_CEILOMETER_MIDDLEWARE** + Whether to enable ceilometer middleware in swift proxy. By default this should be false to avoid unnecessary load. + MONGODB Config parameters ------------------------- diff --git a/packstack/plugins/ceilometer_800.py b/packstack/plugins/ceilometer_800.py index ba46a5295..28e634f7b 100644 --- a/packstack/plugins/ceilometer_800.py +++ b/packstack/plugins/ceilometer_800.py @@ -104,6 +104,17 @@ def initConfig(controller): "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, + + {"CONF_NAME": "CONFIG_ENABLE_CEILOMETER_MIDDLEWARE", + "CMD_OPTION": "enable-ceilometer-middleware", + "PROMPT": ("Enable ceilometer middleware in swift proxy"), + "OPTION_LIST": ["y", "n"], + "VALIDATORS": [validators.validate_options], + "DEFAULT_VALUE": "n", + "MASK_INPUT": False, + "USE_DEFAULT": True, + "NEED_CONFIRM": False, + "CONDITION": False}, ], "MONGODB": [ diff --git a/packstack/puppet/modules/packstack/manifests/swift/proxy.pp b/packstack/puppet/modules/packstack/manifests/swift/proxy.pp index 64d379134..ec24f7f2e 100644 --- a/packstack/puppet/modules/packstack/manifests/swift/proxy.pp +++ b/packstack/puppet/modules/packstack/manifests/swift/proxy.pp @@ -11,7 +11,8 @@ class packstack::swift::proxy () include '::packstack::memcached' - if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' { + if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' and + hiera('CONFIG_ENABLE_CEILOMETER_MIDDLEWARE') == 'y' { $swift_pipeline = [ 'catch_errors', 'bulk', diff --git a/packstack/puppet/templates/controller.pp b/packstack/puppet/templates/controller.pp index 9ebf8da1a..c972501d7 100644 --- a/packstack/puppet/templates/controller.pp +++ b/packstack/puppet/templates/controller.pp @@ -128,7 +128,8 @@ if hiera('CONFIG_SWIFT_INSTALL') == 'y' { include '::packstack::swift::ringbuilder' include '::packstack::swift::proxy' include '::packstack::swift::storage' - if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' { + if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' and + hiera('CONFIG_ENABLE_CEILOMETER_MIDDLEWARE') == 'y' { include '::packstack::swift::ceilometer' } }