From 33843c49ff0a2babd560022fe5f8a0c45095af47 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 12 Feb 2020 10:46:26 +0000 Subject: [PATCH] [OVN] Split NeutronWorkers and NeutronMetadataWorkers for OVN Prior to this patch, the OVN metadata reused the NeutronWorkers configuration to set the number workers it should spawn. This is not ideal for OVN metadata because it works differently than the OVS metadata agent, for example: 1) The OVN metadata workers are deployed onto the compute nodes and not on the controllers/gateways as the OVS ones are. This means it's better distributed. 2) Even tho we could have multiple workers, the OVN SB IDL in the OVN metadata agents acquires a lock while listening to OVSDB events. Therefore, even tho we could have dozens of agents only one of them is listening to the events. 3) Instantiating IDLs means maintaining in-memory replicas of the OVSDB (or, the tables of that DB that is being watched). This puts a burden on OVSDBs to maintain all these replicas updated, reducing this number workers also reduces the burden on the OVSDBs. With this patch, we are adding a new configuration called NeutronMetadataWorkers so that we can set different values for the API workers and the metadata workers in a OVN deployment. Change-Id: I5f0151d70977b3fdbf04c41ffb224f364a027e5c Signed-off-by: Lucas Alvares Gomes --- deployment/ovn/ovn-metadata-container-puppet.yaml | 12 ++++++------ environments/low-memory-usage.yaml | 1 + ...vn-neutron-metadata-workers-7623588cca0a6948.yaml | 9 +++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/ovn-neutron-metadata-workers-7623588cca0a6948.yaml diff --git a/deployment/ovn/ovn-metadata-container-puppet.yaml b/deployment/ovn/ovn-metadata-container-puppet.yaml index bccaba9edf..909b19c2e4 100644 --- a/deployment/ovn/ovn-metadata-container-puppet.yaml +++ b/deployment/ovn/ovn-metadata-container-puppet.yaml @@ -69,11 +69,11 @@ parameters: description: Shared secret to prevent spoofing type: string hidden: true - NeutronWorkers: + NeutronMetadataWorkers: default: '' description: | - Sets the number of worker processes for the neutron metadata agent. The - default value results in the configuration being left unset and a + Sets the number of worker processes for the neutron OVN metadata agent. + 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 @@ -128,7 +128,7 @@ conditions: docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']} service_debug_unset: {equals : [{get_param: OVNWrapperDebug}, false]} internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]} - neutron_workers_unset: {equals : [{get_param: NeutronWorkers}, '']} + neutron_metadata_workers_unset: {equals : [{get_param: NeutronMetadataWorkers}, '']} resources: @@ -189,9 +189,9 @@ outputs: - 'http' - if: - - neutron_workers_unset + - neutron_metadata_workers_unset - {} - - neutron::agents::ovn_metadata::metadata_workers: {get_param: NeutronWorkers} + - neutron::agents::ovn_metadata::metadata_workers: {get_param: NeutronMetadataWorkers} - if: - internal_tls_enabled - tripleo::profile::base::neutron::ovn_metadata::ovn_sb_ca_cert: {get_param: InternalTLSCAFile} diff --git a/environments/low-memory-usage.yaml b/environments/low-memory-usage.yaml index 5cb9608a1d..84b8769140 100644 --- a/environments/low-memory-usage.yaml +++ b/environments/low-memory-usage.yaml @@ -5,6 +5,7 @@ parameter_defaults: HeatWorkers: 1 KeystoneWorkers: 1 NeutronWorkers: 1 + NeutronMetadataWorkers: 1 NovaWorkers: 1 NovaSchedulerWorkers: 1 SaharaWorkers: 1 diff --git a/releasenotes/notes/ovn-neutron-metadata-workers-7623588cca0a6948.yaml b/releasenotes/notes/ovn-neutron-metadata-workers-7623588cca0a6948.yaml new file mode 100644 index 0000000000..9296e85283 --- /dev/null +++ b/releasenotes/notes/ovn-neutron-metadata-workers-7623588cca0a6948.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + Adds a new parameter ``NeutronMetadataWorkers`` for OVN. This + parameters allows users to configure the number of OVN metadata + workers separately from the value of ``NeutronWorkers``. The OVN + metadata workers are deployed onto the compute nodes and not on the + controllers/gateways as the OVS ones. +