Fix inconsistent <service>Workers
Currently the <service>Workers parameters are implemented in different ways according to services. Because of this, these parameters enforce different type(number vs string) and behave differently for a specific value such as 0. These are quite confusing for users. This change introduces the standard implementation for all Workers parameters so that the parameters behave consistently in all services. This also introduces the following changes as side-effects. - Outdated description of some workers parameter is removed. Currently workers are limited to a certain number(such as 12) even in a system with many CPU cores - Default value of BarbicanWorkers is effectively lowered down to $::os_workers from $::processorcount, to use the consistent default workers for all services. Change-Id: Ie7a12a297e00efebca017d51afb9bf9e8c56ee50
This commit is contained in:
parent
09e8ccac77
commit
190420f1bb
@ -123,8 +123,8 @@ parameters:
|
||||
hidden: true
|
||||
BarbicanWorkers:
|
||||
description: Set the number of workers for barbican::wsgi::apache
|
||||
default: '%{::processorcount}'
|
||||
type: string
|
||||
default: 0
|
||||
type: number
|
||||
Debug:
|
||||
default: false
|
||||
description: Set to True to enable debugging on all services.
|
||||
@ -163,6 +163,8 @@ parameters:
|
||||
default: true
|
||||
|
||||
conditions:
|
||||
barbican_workers_set:
|
||||
not: {equals : [{get_param: BarbicanWorkers}, 0]}
|
||||
hsm_enabled:
|
||||
or:
|
||||
- {get_param: BarbicanPkcs11CryptoThalesEnabled}
|
||||
@ -291,7 +293,10 @@ outputs:
|
||||
params:
|
||||
$NETWORK: {get_param: [ServiceNetMap, BarbicanApiNetwork]}
|
||||
barbican::wsgi::apache::ssl: {get_param: EnableInternalTLS}
|
||||
barbican::wsgi::apache::workers: {get_param: BarbicanWorkers}
|
||||
barbican::wsgi::apache::workers:
|
||||
if:
|
||||
- barbican_workers_set
|
||||
- {get_param: BarbicanWorkers}
|
||||
barbican::wsgi::apache::servername:
|
||||
str_replace:
|
||||
template:
|
||||
|
@ -76,9 +76,9 @@ parameters:
|
||||
default: 'overcloud-cinder-api'
|
||||
type: string
|
||||
CinderWorkers:
|
||||
type: string
|
||||
type: number
|
||||
description: Set the number of workers for cinder::wsgi::apache
|
||||
default: '%{::os_workers}'
|
||||
default: 0
|
||||
CinderApiPolicies:
|
||||
description: |
|
||||
A hash of policies to configure for Cinder API.
|
||||
@ -109,6 +109,8 @@ parameters:
|
||||
conditions:
|
||||
auth_cloud_name_set:
|
||||
not: {equals: [{get_param: AuthCloudName}, ""]}
|
||||
cinder_workers_set:
|
||||
not: {equals : [{get_param: CinderWorkers}, 0]}
|
||||
|
||||
resources:
|
||||
ContainersCommon:
|
||||
@ -244,7 +246,10 @@ outputs:
|
||||
"Timeout TIMEOUT"
|
||||
params:
|
||||
TIMEOUT: {get_param: CinderApiWsgiTimeout}
|
||||
cinder::wsgi::apache::workers: {get_param: CinderWorkers}
|
||||
cinder::wsgi::apache::workers:
|
||||
if:
|
||||
- cinder_workers_set
|
||||
- {get_param: CinderWorkers}
|
||||
cinder::api::sync_db: false
|
||||
service_config_settings:
|
||||
rsyslog:
|
||||
|
@ -51,16 +51,12 @@ parameters:
|
||||
type: string
|
||||
hidden: true
|
||||
GlanceWorkers:
|
||||
default: ''
|
||||
default: 0
|
||||
description: |
|
||||
Number of API worker processes for Glance. If left unset (empty string), the
|
||||
default value will result in the configuration being left unset and a
|
||||
system-dependent default value will be chosen (e.g.: number of
|
||||
processors). Please note that this will create a large number of
|
||||
processes on systems with a large number of CPUs resulting in excess
|
||||
memory consumption. It is recommended that a suitable non-default value
|
||||
be selected on such systems.
|
||||
type: string
|
||||
Number of API worker processes for Glance. The default value will result
|
||||
in the configuration being left unset and a system-dependent default
|
||||
value will be chosen.
|
||||
type: number
|
||||
MonitoringSubscriptionGlanceApi:
|
||||
default: 'overcloud-glance-api'
|
||||
type: string
|
||||
@ -401,7 +397,7 @@ conditions:
|
||||
- {get_param: NovaEnableRbdBackend}
|
||||
- {get_param: GlanceSparseUploadEnabled}
|
||||
glance_workers_set:
|
||||
not: {equals : [{get_param: GlanceWorkers}, '']}
|
||||
not: {equals : [{get_param: GlanceWorkers}, 0]}
|
||||
glance_multiple_locations:
|
||||
or:
|
||||
- {get_param: GlanceShowMultipleLocations}
|
||||
|
@ -68,9 +68,9 @@ parameters:
|
||||
default: 'overcloud-gnocchi-metricd'
|
||||
type: string
|
||||
GnocchiMetricdWorkers:
|
||||
default: '%{::os_workers}'
|
||||
default: 0
|
||||
description: Number of workers for Gnocchi MetricD
|
||||
type: string
|
||||
type: number
|
||||
MetricProcessingDelay:
|
||||
default: 30
|
||||
description: Delay between processing metrics.
|
||||
@ -83,6 +83,8 @@ parameters:
|
||||
|
||||
conditions:
|
||||
nfs_backend_enabled: {equals: [{get_param: GnocchiNfsEnabled}, true]}
|
||||
gnocchi_metricd_workers_set:
|
||||
not: {equals: [{get_param: GnocchiMetricdWorkers}, 0]}
|
||||
|
||||
resources:
|
||||
|
||||
@ -123,7 +125,10 @@ outputs:
|
||||
config_settings:
|
||||
map_merge:
|
||||
- get_attr: [GnocchiServiceBase, role_data, config_settings]
|
||||
- gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers}
|
||||
- gnocchi::metricd::workers:
|
||||
if:
|
||||
- gnocchi_metricd_workers_set
|
||||
- {get_param: GnocchiMetricdWorkers}
|
||||
gnocchi::metricd::metric_processing_delay: {get_param: MetricProcessingDelay}
|
||||
monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiMetricd}
|
||||
service_config_settings:
|
||||
|
@ -139,9 +139,9 @@ parameters:
|
||||
description: Set a token expiration time in seconds.
|
||||
type: number
|
||||
KeystoneWorkers:
|
||||
type: string
|
||||
type: number
|
||||
description: Set the number of workers for keystone::wsgi::apache
|
||||
default: '%{::os_workers_keystone}'
|
||||
default: 0
|
||||
MonitoringSubscriptionKeystone:
|
||||
default: 'overcloud-keystone'
|
||||
type: string
|
||||
@ -463,6 +463,8 @@ resources:
|
||||
ContainerKeystoneConfigImage: {get_param: ContainerKeystoneConfigImage}
|
||||
|
||||
conditions:
|
||||
keystone_workers_set:
|
||||
not: {equals : [{get_param: KeystoneWorkers}, 0]}
|
||||
public_tls_enabled:
|
||||
and:
|
||||
- {get_param: EnablePublicTLS}
|
||||
@ -593,7 +595,10 @@ outputs:
|
||||
"%{lookup('fqdn_$NETWORK')}"
|
||||
params:
|
||||
$NETWORK: {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}
|
||||
keystone::wsgi::apache::workers: {get_param: KeystoneWorkers}
|
||||
keystone::wsgi::apache::workers:
|
||||
if:
|
||||
- keystone_workers_set
|
||||
- {get_param: KeystoneWorkers}
|
||||
# override via extraconfig:
|
||||
keystone::wsgi::apache::threads: 1
|
||||
keystone::db::database_db_max_retries: -1
|
||||
|
@ -41,9 +41,9 @@ parameters:
|
||||
type: boolean
|
||||
default: false
|
||||
ManilaWorkers:
|
||||
type: string
|
||||
type: number
|
||||
description: Set the number of workers for manila::wsgi::apache
|
||||
default: '%{::os_workers}'
|
||||
default: 0
|
||||
ManilaPassword:
|
||||
description: The password for the manila service account.
|
||||
type: string
|
||||
@ -118,6 +118,10 @@ parameters:
|
||||
Use the advanced (eventlet safe) memcached client pool.
|
||||
default: true
|
||||
|
||||
conditions:
|
||||
manila_workers_set:
|
||||
not: {equals : [{get_param: ManilaWorkers}, 0]}
|
||||
|
||||
resources:
|
||||
ContainersCommon:
|
||||
type: ../containers-common.yaml
|
||||
@ -257,7 +261,10 @@ outputs:
|
||||
"%{lookup('fqdn_$NETWORK')}"
|
||||
params:
|
||||
$NETWORK: {get_param: [ServiceNetMap, ManilaApiNetwork]}
|
||||
manila::wsgi::apache::workers: {get_param: ManilaWorkers}
|
||||
manila::wsgi::apache::workers:
|
||||
if:
|
||||
- manila_workers_set
|
||||
- {get_param: ManilaWorkers}
|
||||
service_config_settings:
|
||||
map_merge:
|
||||
- {get_attr: [ManilaBase, role_data, service_config_settings]}
|
||||
|
@ -60,25 +60,21 @@ parameters:
|
||||
description: hash of optional environment variables
|
||||
type: json
|
||||
NeutronWorkers:
|
||||
default: ''
|
||||
default: 0
|
||||
description: |
|
||||
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
|
||||
of processes and memory consumption on systems with a large core
|
||||
count. On such systems it is recommended that a non-default value
|
||||
be selected that matches the load requirements.
|
||||
type: string
|
||||
and a system-dependent default will be chosen.
|
||||
type: number
|
||||
NeutronRpcWorkers:
|
||||
default: ''
|
||||
default: 0
|
||||
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
|
||||
type: number
|
||||
NeutronPassword:
|
||||
description: The password for the neutron service and db account, used by neutron agents.
|
||||
type: string
|
||||
@ -233,9 +229,9 @@ parameter_groups:
|
||||
|
||||
conditions:
|
||||
neutron_workers_set:
|
||||
not: {equals : [{get_param: NeutronWorkers}, '']}
|
||||
not: {equals : [{get_param: NeutronWorkers}, 0]}
|
||||
neutron_rpc_workers_set:
|
||||
not: {equals : [{get_param: NeutronRpcWorkers}, '']}
|
||||
not: {equals : [{get_param: NeutronRpcWorkers}, 0]}
|
||||
neutron_ovs_int_br_set:
|
||||
not: {equals : [{get_param: NeutronOvsIntegrationBridge}, '']}
|
||||
az_set:
|
||||
|
@ -47,16 +47,12 @@ parameters:
|
||||
type: string
|
||||
hidden: true
|
||||
NeutronWorkers:
|
||||
default: ''
|
||||
default: 0
|
||||
description: |
|
||||
Sets the number of worker processes for the neutron 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
|
||||
such systems it is recommended that a non-default value be selected that
|
||||
matches the load requirements.
|
||||
type: string
|
||||
system-dependent default will be chosen.
|
||||
type: number
|
||||
MonitoringSubscriptionNeutronMetadata:
|
||||
default: 'overcloud-neutron-metadata'
|
||||
type: string
|
||||
@ -74,7 +70,7 @@ parameters:
|
||||
|
||||
conditions:
|
||||
neutron_workers_set:
|
||||
not: {equals : [{get_param: NeutronWorkers}, '']}
|
||||
not: {equals : [{get_param: NeutronWorkers}, 0]}
|
||||
neutron_shared_metadata_set:
|
||||
not: {equals: [{get_param: NeutronMetadataProxySharedSecret}, '']}
|
||||
|
||||
|
@ -71,16 +71,12 @@ parameters:
|
||||
type: string
|
||||
hidden: true
|
||||
NeutronMetadataWorkers:
|
||||
default: ''
|
||||
default: 0
|
||||
description: |
|
||||
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
|
||||
such systems it is recommended that a non-default value be selected that
|
||||
matches the load requirements.
|
||||
type: string
|
||||
system-dependent default will be chosen.
|
||||
type: number
|
||||
OVNSouthboundServerPort:
|
||||
description: Port of the OVN Southbound DB server
|
||||
type: number
|
||||
@ -121,7 +117,7 @@ parameters:
|
||||
|
||||
conditions:
|
||||
neutron_metadata_workers_set:
|
||||
not: {equals : [{get_param: NeutronMetadataWorkers}, '']}
|
||||
not: {equals : [{get_param: NeutronMetadataWorkers}, 0]}
|
||||
key_size_override_set:
|
||||
not: {equals: [{get_param: OvnMetadataCertificateKeySize}, '']}
|
||||
|
||||
|
@ -62,7 +62,7 @@ parameters:
|
||||
SwiftWorkers:
|
||||
default: 0
|
||||
description: Number of workers for Swift service.
|
||||
type: string
|
||||
type: number
|
||||
KeystoneRegion:
|
||||
type: string
|
||||
default: 'regionOne'
|
||||
@ -110,7 +110,7 @@ conditions:
|
||||
cors_allowed_origin_set:
|
||||
not: {equals : [{get_param: SwiftCorsAllowedOrigin}, '']}
|
||||
swift_workers_set:
|
||||
not: {equals : [{get_param: SwiftWorkers}, '0']}
|
||||
not: {equals : [{get_param: SwiftWorkers}, 0]}
|
||||
|
||||
resources:
|
||||
ContainersCommon:
|
||||
|
@ -79,15 +79,15 @@ parameters:
|
||||
SwiftAccountWorkers:
|
||||
default: 0
|
||||
description: Number of workers for Swift account service.
|
||||
type: string
|
||||
type: number
|
||||
SwiftContainerWorkers:
|
||||
default: 0
|
||||
description: Number of workers for Swift account service.
|
||||
type: string
|
||||
type: number
|
||||
SwiftObjectWorkers:
|
||||
default: 0
|
||||
description: Number of workers for Swift account service.
|
||||
type: string
|
||||
type: number
|
||||
SwiftReconCronMinute:
|
||||
type: string
|
||||
description: >
|
||||
@ -138,11 +138,11 @@ conditions:
|
||||
- get_param: SwiftRawDisks
|
||||
- {}
|
||||
account_workers_set:
|
||||
not: {equals : [{get_param: SwiftAccountWorkers}, '0']}
|
||||
not: {equals : [{get_param: SwiftAccountWorkers}, 0]}
|
||||
container_workers_set:
|
||||
not: {equals : [{get_param: SwiftContainerWorkers}, '0']}
|
||||
not: {equals : [{get_param: SwiftContainerWorkers}, 0]}
|
||||
object_workers_set:
|
||||
not: {equals : [{get_param: SwiftObjectWorkers}, '0']}
|
||||
not: {equals : [{get_param: SwiftObjectWorkers}, 0]}
|
||||
use_node_data_lookup: {equals : [{get_param: SwiftUseNodeDataLookup}, true]}
|
||||
|
||||
resources:
|
||||
|
Loading…
x
Reference in New Issue
Block a user