
In Ieb69b5a6a50d37b0a49a8c9e57275673d60b5f10, the default number of workers for the metadata_workers and osapi_compute_workers was changed from $::processorcount to $::os_workers, which takes CPU count into account but caps the number of workers for machines with high numbers of CPUs. The "workers" configuration option used by Nova Conductor however was left out of this, likely because it did not previously default to $::processorcount. However Nova itself defaults all of these services to the processor count in any case, and the number of workers for Conductor is likely the most critical value to be limited, since it directly corresponds to pooled database connections which when there are too many processes results in often thousands of connections that are almost all unused. This patch limits Conductor workers in the same way as that of the other worker counts. Change-Id: I1969b555c1c8cfb686a12cad7f54ac10b1656af5
72 lines
1.9 KiB
Puppet
72 lines
1.9 KiB
Puppet
# == Class: nova::conductor
|
|
#
|
|
# Manages nova conductor package and service
|
|
#
|
|
# === Parameters:
|
|
#
|
|
# [*enabled*]
|
|
# (optional) Whether to enable the nova-conductor service
|
|
# Defaults to true
|
|
#
|
|
# [*manage_service*]
|
|
# (optional) Whether to start/stop the service
|
|
# Defaults to true
|
|
#
|
|
# [*ensure_package*]
|
|
# (optional) The state of the nova conductor package
|
|
# Defaults to 'present'
|
|
#
|
|
# [*workers*]
|
|
# (optional) Number of workers for OpenStack Conductor service
|
|
# Defaults to $::os_workers
|
|
#
|
|
# [*enable_new_services*]
|
|
# (optional) When a new service (for example "nova-compute") start up, it gets
|
|
# registered in the database as an enabled service. Setting this to false will
|
|
# cause new services to be disabled when added. This config option is only used
|
|
# by the conductor service which is responsible for creating the service entries.
|
|
# Defaults to $::os_service_default
|
|
#
|
|
# DEPRECATED PARAMETERS
|
|
#
|
|
# [*use_local*]
|
|
# (optional) Perform nova-conductor operations locally
|
|
# Defaults to undef
|
|
#
|
|
class nova::conductor(
|
|
$enabled = true,
|
|
$manage_service = true,
|
|
$ensure_package = 'present',
|
|
$workers = $::os_workers,
|
|
$enable_new_services = $::os_service_default,
|
|
# DEPREACTED PARAMETERS
|
|
$use_local = undef,
|
|
) {
|
|
|
|
if $use_local {
|
|
warning('use_local parameter is deprecated, has no effect and will be dropped in a future release.')
|
|
}
|
|
|
|
include ::nova::deps
|
|
include ::nova::db
|
|
include ::nova::params
|
|
|
|
nova::generic_service { 'conductor':
|
|
enabled => $enabled,
|
|
manage_service => $manage_service,
|
|
package_name => $::nova::params::conductor_package_name,
|
|
service_name => $::nova::params::conductor_service_name,
|
|
ensure_package => $ensure_package,
|
|
}
|
|
|
|
if $workers {
|
|
nova_config {
|
|
'conductor/workers': value => $workers;
|
|
}
|
|
}
|
|
|
|
nova_config {
|
|
'DEFAULT/enable_new_services': value => $enable_new_services
|
|
}
|
|
}
|