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 <dalvarez@redhat.com>
This commit is contained in:
Daniel Alvarez 2018-08-14 16:08:03 +02:00
parent b8aeabdcb0
commit 0afe46b6f2
2 changed files with 26 additions and 2 deletions

View File

@ -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

View File

@ -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.