Support configurable metadata_workers

Adds config option worker-multiplier to allow configuring
the number of workers used for the metadata api when
using local dhcp or dvr.

Change-Id: I505963165f8a4fade0123c2825af00189285f168
Closes-Bug: 1707618
This commit is contained in:
Edward Hope-Morley 2017-08-14 10:09:03 +01:00
parent 9336549e0e
commit 7a45db6274
7 changed files with 16 additions and 1 deletions

View File

@ -193,6 +193,15 @@ options:
Sets vcpu_pin_set option in nova.conf which defines which pcpus that
instance vcpus can or cannot use. For example '^0,^2' to reserve two
cpus for the host.
worker-multiplier:
type: float
default:
description: |
The CPU core multiplier to use when configuring worker processes for
this services e.g. metadata-api. By default, the number of workers for
each daemon is set to twice the number of CPU cores a service unit has.
When deployed in a LXD container, this default value will be capped to 4
workers unless this configuration option is set.
# Required if using FlatManager (nova-network)
bridge-interface:
type: string

View File

@ -231,7 +231,8 @@ BASE_RESOURCE_MAP = {
context.LogLevelContext(),
context.InternalEndpointContext(),
SerialConsoleContext(),
NovaComputeAvailabilityZoneContext()],
NovaComputeAvailabilityZoneContext(),
context.WorkerConfigContext()],
},
NOVA_API_AA_PROFILE_PATH: {
'services': ['nova-api'],

View File

@ -43,6 +43,7 @@ glance_api_servers = {{ glance_api_servers }}
neutron_metadata_proxy_shared_secret = {{ metadata_shared_secret }}
service_neutron_metadata_proxy=True
{% endif -%}
metadata_workers = {{ workers }}
{% if console_vnc_type -%}
vnc_enabled = True

View File

@ -145,6 +145,7 @@ metadata_proxy_shared_secret = {{ metadata_shared_secret }}
service_metadata_proxy=True
{% endif -%}
{% endif -%}
metadata_workers = {{ workers }}
{% endif -%}
{% if glance_api_servers -%}

View File

@ -153,6 +153,7 @@ metadata_proxy_shared_secret = {{ metadata_shared_secret }}
service_metadata_proxy=True
{% endif -%}
{% endif -%}
metadata_workers = {{ workers }}
{% endif -%}
{% include "section-keystone-authtoken" %}

View File

@ -160,6 +160,7 @@ metadata_proxy_shared_secret = {{ metadata_shared_secret }}
service_metadata_proxy=True
{% endif -%}
{% endif -%}
metadata_workers = {{ workers }}
{% endif -%}
{% include "section-keystone-authtoken-mitaka" %}

View File

@ -160,6 +160,7 @@ metadata_proxy_shared_secret = {{ metadata_shared_secret }}
service_metadata_proxy=True
{% endif -%}
{% endif -%}
metadata_workers = {{ workers }}
{% endif -%}
{% include "section-keystone-authtoken-mitaka" %}