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. Change-Id: Ie3a7d6aab0d9902a6637637fbf75b2df3ec084b1 Closes-Bug: 1707618
This commit is contained in:
parent
68ec5b7ecf
commit
fbed3f3d7a
@ -207,6 +207,15 @@ options:
|
|||||||
.
|
.
|
||||||
Multiple devices can be configured by providing multi values delimited by
|
Multiple devices can be configured by providing multi values delimited by
|
||||||
spaces.
|
spaces.
|
||||||
|
worker-multiplier:
|
||||||
|
type: float
|
||||||
|
default:
|
||||||
|
description: |
|
||||||
|
The CPU core multiplier to use when configuring worker processes for
|
||||||
|
this services e.g. metadata-agent. 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.
|
||||||
# Network config (by default all access is over 'private-address')
|
# Network config (by default all access is over 'private-address')
|
||||||
os-data-network:
|
os-data-network:
|
||||||
type: string
|
type: string
|
||||||
|
@ -62,6 +62,7 @@ from charmhelpers.contrib.openstack.neutron import (
|
|||||||
from charmhelpers.contrib.openstack.context import (
|
from charmhelpers.contrib.openstack.context import (
|
||||||
ExternalPortContext,
|
ExternalPortContext,
|
||||||
DataPortContext,
|
DataPortContext,
|
||||||
|
WorkerConfigContext,
|
||||||
)
|
)
|
||||||
from charmhelpers.core.host import (
|
from charmhelpers.core.host import (
|
||||||
adduser,
|
adduser,
|
||||||
@ -184,7 +185,8 @@ METADATA_RESOURCE_MAP = OrderedDict([
|
|||||||
(NEUTRON_METADATA_AGENT_CONF, {
|
(NEUTRON_METADATA_AGENT_CONF, {
|
||||||
'services': ['neutron-metadata-agent'],
|
'services': ['neutron-metadata-agent'],
|
||||||
'contexts': [neutron_ovs_context.SharedSecretContext(),
|
'contexts': [neutron_ovs_context.SharedSecretContext(),
|
||||||
neutron_ovs_context.APIIdentityServiceContext()],
|
neutron_ovs_context.APIIdentityServiceContext(),
|
||||||
|
WorkerConfigContext()],
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
DHCP_RESOURCE_MAP = OrderedDict([
|
DHCP_RESOURCE_MAP = OrderedDict([
|
||||||
|
@ -17,3 +17,4 @@ state_path = /var/lib/neutron
|
|||||||
nova_metadata_port = 8775
|
nova_metadata_port = 8775
|
||||||
metadata_proxy_shared_secret = {{ shared_secret }}
|
metadata_proxy_shared_secret = {{ shared_secret }}
|
||||||
cache_url = memory://?default_ttl=5
|
cache_url = memory://?default_ttl=5
|
||||||
|
metadata_workers = {{ workers }}
|
||||||
|
@ -17,3 +17,4 @@ state_path = /var/lib/neutron
|
|||||||
nova_metadata_port = 8775
|
nova_metadata_port = 8775
|
||||||
metadata_proxy_shared_secret = {{ shared_secret }}
|
metadata_proxy_shared_secret = {{ shared_secret }}
|
||||||
cache_url = memory://?default_ttl=5
|
cache_url = memory://?default_ttl=5
|
||||||
|
metadata_workers = {{ workers }}
|
||||||
|
Loading…
Reference in New Issue
Block a user