From 8adb596e33de96422ab9858aa5d4984378dce601 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Fri, 13 Apr 2018 08:06:58 -0600 Subject: [PATCH] Switch heat-engine workers to use os_workers_heat_engine Previously the default value for the heat-engine workers setting was set to $::os_service_default. We usually use our specific facts for the worker settings so this change switches it to use the $::os_worker_heat_engine fact. Change-Id: I6a8d745b76afca1b1958816fa10a3f1dd30face6 Related-Bug: #1763671 --- manifests/engine.pp | 4 ++-- .../notes/heat-engine-workers-8ef3960a29c21a57.yaml | 11 +++++++++++ spec/classes/heat_engine_spec.rb | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/heat-engine-workers-8ef3960a29c21a57.yaml diff --git a/manifests/engine.pp b/manifests/engine.pp index 0e71a33c..0b78e9f1 100644 --- a/manifests/engine.pp +++ b/manifests/engine.pp @@ -103,7 +103,7 @@ # # [*num_engine_workers*] # (Optional) The number of workers to spawn. -# Defaults to $::os_service_default. +# Defaults to $::os_workers_heat_engine # # [*convergence_engine*] # (Optional) Enables engine with convergence architecture. @@ -147,7 +147,7 @@ class heat::engine ( $instance_connection_is_secure = $::os_service_default, $instance_connection_https_validate_certificates = $::os_service_default, $max_resources_per_stack = $::os_service_default, - $num_engine_workers = $::os_service_default, + $num_engine_workers = $::os_workers_heat_engine, $convergence_engine = $::os_service_default, $reauthentication_auth_method = $::os_service_default, $environment_dir = $::os_service_default, diff --git a/releasenotes/notes/heat-engine-workers-8ef3960a29c21a57.yaml b/releasenotes/notes/heat-engine-workers-8ef3960a29c21a57.yaml new file mode 100644 index 00000000..e2dc595f --- /dev/null +++ b/releasenotes/notes/heat-engine-workers-8ef3960a29c21a57.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + Previously the number of heat engine workers was set to $::os_service_default + which would use the default from python. Usually this means it will use + the number of processors in the system. We have found that this is not an + ideal default for large number of cpu systems. We have a provided fact + specific to heat engine named $::os_workers_heat_engine. We have changed + the default value for the heat engine works to use this fact. This + fact will cap the value at 24 but usually is the larger of + (number of procs / 2) or 4. diff --git a/spec/classes/heat_engine_spec.rb b/spec/classes/heat_engine_spec.rb index b4ad0909..4fb21117 100644 --- a/spec/classes/heat_engine_spec.rb +++ b/spec/classes/heat_engine_spec.rb @@ -139,7 +139,7 @@ describe 'heat::engine' do }).each do |os,facts| context "on #{os}" do let (:facts) do - facts.merge!(OSDefaults.get_facts()) + facts.merge!(OSDefaults.get_facts({:os_workers_heat_engine => 2})) end let :platform_params do