Reduce number of workers in systemcontroller
This commit reduces the number of works in a system controller for keystone, horizon, barbican, sysinv and fm on a DC system. The work is currently on going. Test plan: 1 Bring up a DC system with this change. 2 Patch this change to a large DC system. Story: 2008960 Task: 44057 Signed-off-by: BoYuan Chang <boyuan.chang@windriver.com> Change-Id: I8e2d200eef1affe1a3261e116ec39e43d2cc426f
This commit is contained in:
parent
1d28967e81
commit
12aa858591
|
@ -29,7 +29,11 @@ class openstack::barbican
|
|||
group => 'barbican',
|
||||
}
|
||||
|
||||
$api_workers = $::platform::params::eng_workers_by_4
|
||||
if $::platform::params::distributed_cloud_role =='systemcontroller' {
|
||||
$api_workers = min($::platform::params::eng_workers_by_4, 3)
|
||||
} else {
|
||||
$api_workers = $::platform::params::eng_workers_by_4
|
||||
}
|
||||
|
||||
file_line { 'Modify workers in gunicorn-config.py':
|
||||
path => '/etc/barbican/gunicorn-config.py',
|
||||
|
|
|
@ -86,8 +86,11 @@ class openstack::horizon
|
|||
content => template('openstack/lighttpd-inc.conf.erb')
|
||||
}
|
||||
|
||||
$workers = $::platform::params::eng_workers_by_2
|
||||
|
||||
if $::platform::params::distributed_cloud_role =='systemcontroller' {
|
||||
$workers = min($::platform::params::eng_workers_by_2, 3)
|
||||
} else {
|
||||
$workers = $::platform::params::eng_workers_by_2
|
||||
}
|
||||
if str2bool($::is_initial_config) {
|
||||
exec { 'Stop lighttpd':
|
||||
command => 'systemctl stop lighttpd; systemctl disable lighttpd',
|
||||
|
|
|
@ -39,7 +39,11 @@ class openstack::keystone (
|
|||
include ::platform::drbd::platform::params
|
||||
|
||||
$keystone_key_repo_path = "${::platform::drbd::platform::params::mountpoint}/keystone"
|
||||
$eng_workers = $::platform::params::eng_workers
|
||||
if $::platform::params::distributed_cloud_role =='systemcontroller' {
|
||||
$eng_workers = min($::platform::params::eng_workers, 10)
|
||||
} else {
|
||||
$eng_workers = $::platform::params::eng_workers
|
||||
}
|
||||
$enabled = false
|
||||
$bind_host = $::platform::network::mgmt::params::controller_address_url
|
||||
|
||||
|
@ -235,7 +239,11 @@ class openstack::keystone::bootstrap(
|
|||
include ::platform::client::params
|
||||
|
||||
$keystone_key_repo_path = "${::platform::drbd::platform::params::mountpoint}/keystone"
|
||||
$eng_workers = $::platform::params::eng_workers
|
||||
if $::platform::params::distributed_cloud_role =='systemcontroller' {
|
||||
$eng_workers = min($::platform::params::eng_workers, 10)
|
||||
} else {
|
||||
$eng_workers = $::platform::params::eng_workers
|
||||
}
|
||||
$bind_host = '[::]'
|
||||
|
||||
# In the case of a classical Multi-Region deployment, apply the Keystone
|
||||
|
@ -483,8 +491,11 @@ class openstack::keystone::upgrade (
|
|||
|
||||
# the unit address is actually the configured default of the loopback address.
|
||||
$bind_host = $::platform::network::mgmt::params::controller0_address
|
||||
$eng_workers = $::platform::params::eng_workers
|
||||
|
||||
if $::platform::params::distributed_cloud_role =='systemcontroller' {
|
||||
$eng_workers = min($::platform::params::eng_workers, 10)
|
||||
} else {
|
||||
$eng_workers = $::platform::params::eng_workers
|
||||
}
|
||||
$keystone_key_repo = "${::platform::drbd::platform::params::mountpoint}/keystone"
|
||||
|
||||
# Need to create the parent directory for fernet keys repository
|
||||
|
|
Binary file not shown.
|
@ -75,6 +75,13 @@ class platform::fm::api
|
|||
|
||||
include ::platform::params
|
||||
|
||||
# Assign up to 6 workers for system controllers
|
||||
if $::platform::params::distributed_cloud_role =='systemcontroller' {
|
||||
$assigned_workers = min($::platform::params::eng_workers, 6)
|
||||
} else {
|
||||
$assigned_workers = $::platform::params::eng_workers
|
||||
}
|
||||
|
||||
if $service_enabled {
|
||||
if ($::platform::fm::service_create and
|
||||
$::platform::params::init_keystone) {
|
||||
|
@ -85,7 +92,7 @@ class platform::fm::api
|
|||
|
||||
class { '::fm::api':
|
||||
host => $api_host,
|
||||
workers => $::platform::params::eng_workers,
|
||||
workers => $assigned_workers,
|
||||
sync_db => $::platform::params::init_database,
|
||||
}
|
||||
|
||||
|
|
|
@ -86,6 +86,15 @@ class platform::params (
|
|||
$eng_workers_by_6 = $eng_min_workers
|
||||
}
|
||||
|
||||
# Limit the number of workers for system controller to 10
|
||||
if ($distributed_cloud_role == 'systemcontroller') {
|
||||
$eng_workers = min($eng_workers, 10)
|
||||
$eng_workers_by_2 = min($eng_workers_by_2, 10)
|
||||
$eng_workers_by_4 = min($eng_workers_by_4, 10)
|
||||
# Variable called in sysinv.pp
|
||||
$eng_workers_by_5 = min($eng_workers_by_5, 6)
|
||||
$eng_workers_by_6 = min($eng_workers_by_6, 10)
|
||||
}
|
||||
$init_database = $controller_upgrade
|
||||
$init_keystone = $controller_upgrade
|
||||
}
|
||||
|
|
|
@ -131,11 +131,16 @@ class platform::sysinv::api
|
|||
}
|
||||
}
|
||||
|
||||
if (if $::platform::params::distributed_cloud_role =='systemcontroller' {
|
||||
sysinv_config{
|
||||
'DEFAULT/sysinv_api_workers': value => min($::platform::params::eng_workers_by_5, 6);
|
||||
}
|
||||
} else {
|
||||
# TODO(mpeters): move to sysinv puppet module parameters
|
||||
sysinv_config {
|
||||
'DEFAULT/sysinv_api_workers': value => $::platform::params::eng_workers_by_5;
|
||||
sysinv_config {
|
||||
'DEFAULT/sysinv_api_workers': value => $::platform::params::eng_workers_by_5;
|
||||
}
|
||||
}
|
||||
|
||||
include ::platform::sysinv::haproxy
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue