From 715781fe10fdfbd5e60e4468edcbeb18593e2e89 Mon Sep 17 00:00:00 2001 From: Daniel Alvarez Date: Tue, 14 Aug 2018 16:08:03 +0200 Subject: [PATCH] Decoupling number of API and RPC workers for neutron-api On certain Neutron backends such as OVN where no agents are used, it's unnecessary to have (so many)RPC workers running. This patch is decoupling the number of API and RPC workers for neutron server. In the case that the new NeutronRpcWorkers parameter is not defined, it'll take the value of NeutronWorkers so that we don't introduce any regression if some environments don't define it. Change-Id: I0a3b78947fdeda638d0756f08b577d4351f371e0 Partial-Bug: #1786952 Signed-off-by: Daniel Alvarez (cherry picked from commit 0afe46b6f2df4f3b950798a66f170c23ff43dd66) --- puppet/services/neutron-api.yaml | 22 +++++++++++++++++-- ..._workers_neutron_api-eb5820d6bcedb53b.yaml | 6 +++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/decoupling_api_rpc_workers_neutron_api-eb5820d6bcedb53b.yaml diff --git a/puppet/services/neutron-api.yaml b/puppet/services/neutron-api.yaml index 95d13c902b..d7fb4138f7 100644 --- a/puppet/services/neutron-api.yaml +++ b/puppet/services/neutron-api.yaml @@ -33,7 +33,7 @@ parameters: NeutronWorkers: default: '' description: | - Sets the number of API and RPC workers for the Neutron service. + Sets the number of API 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 @@ -41,6 +41,15 @@ parameters: count. On such systems it is recommended that a non-default value be selected that matches the load requirements. type: string + NeutronRpcWorkers: + default: '' + description: | + Sets the number of RPC workers for the Neutron service. + If not specified, it'll take the value of NeutronWorkers and if this is + not specified either, the default value results in the configuration + being left unset and a system-dependent default will be chosen + (usually 1). + type: string NeutronPassword: description: The password for the neutron service and db account, used by neutron agents. type: string @@ -112,6 +121,7 @@ parameter_groups: conditions: use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]} neutron_workers_unset: {equals : [{get_param: NeutronWorkers}, '']} + neutron_rpc_workers_unset: {equals : [{get_param: NeutronRpcWorkers}, '']} neutron_ovs_int_br_unset: {equals : [{get_param: NeutronOvsIntegrationBridge}, '']} resources: @@ -217,7 +227,15 @@ outputs: - neutron_workers_unset - {} - neutron::server::api_workers: {get_param: NeutronWorkers} - neutron::server::rpc_workers: {get_param: NeutronWorkers} + - + if: + - neutron_rpc_workers_unset + - + if: + - neutron_workers_unset + - {} + - neutron::server::rpc_workers: {get_param: NeutronWorkers} + - neutron::server::rpc_workers: {get_param: NeutronRpcWorkers} - if: - neutron_ovs_int_br_unset diff --git a/releasenotes/notes/decoupling_api_rpc_workers_neutron_api-eb5820d6bcedb53b.yaml b/releasenotes/notes/decoupling_api_rpc_workers_neutron_api-eb5820d6bcedb53b.yaml new file mode 100644 index 0000000000..9f2d3fcc3f --- /dev/null +++ b/releasenotes/notes/decoupling_api_rpc_workers_neutron_api-eb5820d6bcedb53b.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Now it's possible to define the number of API and RPC workers separately + for neutron-api service. This is good for certain network backends such + as OVN that don't require RPC communication.