From 9d97427a4f933da3697010738fdf9413f4fb4eec Mon Sep 17 00:00:00 2001 From: Jenkins Date: Fri, 21 Apr 2017 03:16:30 +0000 Subject: [PATCH] Use conditionals for neutron and glance worker defaults Using an empty string to signal that the default value in the puppet module is to be used no longer seems to work, resulting in the puppet specified defaults being overridden by empty string values. The impact on configuration will differ depending on the actual configuration item, the puppet code and the service, so it is just safer to omit the hieradata if the user has not explicitly set a value. Change-Id: Ic8b55941b05c4888c06e0e57b8994f71c2966034 Closes-Bug: #1669452 (cherry picked from commit Iefbc8f8669680e4f9d01db6b49543bfbe9b7661b) --- puppet/services/glance-api.yaml | 7 ++++++- puppet/services/neutron-api.yaml | 21 ++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/puppet/services/glance-api.yaml b/puppet/services/glance-api.yaml index ce389dc148..65e6923511 100644 --- a/puppet/services/glance-api.yaml +++ b/puppet/services/glance-api.yaml @@ -51,6 +51,7 @@ parameters: conditions: use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]} + glance_workers_unset: {equals : [{get_param: GlanceWorkers}, '']} resources: @@ -100,7 +101,6 @@ outputs: glance::api::authtoken::password: {get_param: GlancePassword} glance::api::enable_proxy_headers_parsing: true glance::api::debug: {get_param: Debug} - glance::api::workers: {get_param: GlanceWorkers} tripleo.glance_api.firewall_rules: '112 glance_api': dport: @@ -132,6 +132,11 @@ outputs: - use_tls_proxy - 'localhost' - {get_param: [ServiceNetMap, GlanceApiNetwork]} + - + if: + - glance_workers_unset + - {} + - glance::api::workers: {get_param: GlanceWorkers} step_config: | include ::tripleo::profile::base::glance::api service_config_settings: diff --git a/puppet/services/neutron-api.yaml b/puppet/services/neutron-api.yaml index bb191ff05b..62349b7837 100644 --- a/puppet/services/neutron-api.yaml +++ b/puppet/services/neutron-api.yaml @@ -21,13 +21,13 @@ parameters: NeutronWorkers: default: '' description: | - Sets the number of API and RPC workers for the Neutron service. The - default value results in the configuration being left unset and a - system-dependent default will be chosen (usually the number of - processors). Please note that this can result in a large number of - processes and memory consumption on systems with a large core count. On - such systems it is recommended that a non-default value be selected that - matches the load requirements. + Sets the number of API and RPC workers for the Neutron service. + The default value results in the configuration being left unset + and a system-dependent default will be chosen (usually the number + of processors). Please note that this can result in a large number + of processes and memory consumption on systems with a large core + count. On such systems it is recommended that a non-default value + be selected that matches the load requirements. type: string NeutronPassword: description: The password for the neutron service and db account, used by neutron agents. @@ -87,6 +87,7 @@ parameter_groups: conditions: use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]} + neutron_workers_unset: {equals : [{get_param: NeutronWorkers}, '']} resources: @@ -170,6 +171,12 @@ outputs: - 'localhost' - {get_param: [ServiceNetMap, NeutronApiNetwork]} tripleo::profile::base::neutron::server::l3_ha_override: {get_param: NeutronL3HA} + - + if: + - neutron_workers_unset + - {} + - neutron::server::api_workers: {get_param: NeutronWorkers} + neutron::server::rpc_workers: {get_param: NeutronWorkers} step_config: | include tripleo::profile::base::neutron::server service_config_settings: