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' } }