From ec84ac9c958a44c15d3511a31effc423c8d61470 Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Thu, 10 Sep 2015 21:41:54 -0600 Subject: [PATCH] Fix *_workers config settings. Admin_ and public_workers were in the wrong section. They belong to the evenlet_server section and only impact the eventlet configuration. In addition, they are deprecated and anyone setting them will get warnings in their logs. For now we should mark them deprecated and get them in the right section, but once eventlet is removed, they will also be removed. Change-Id: Ide4b80f0b7794ecd81599c28f65326488c8d6ed6 --- manifests/init.pp | 16 ++++++++++------ spec/classes/keystone_spec.rb | 8 ++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 8d36b18ef..b703e48e5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -355,11 +355,15 @@ # Defaults to undef # # [*admin_workers*] -# (optional) The number of worker processes to serve the admin WSGI application. +# (optional) The number of worker processes to serve the admin eventlet application. +# This option is deprecated along with eventlet and will be removed in M. +# This setting has no affect when using WSGI. # Defaults to max($::processorcount, 2) # # [*public_workers*] -# (optional) The number of worker processes to serve the public WSGI application. +# (optional) The number of worker processes to serve the public eventlet application. +# This option is deprecated along with eventlet and will be removed in M. +# This setting has no affect when using WSGI. # Defaults to max($::processorcount, 2) # # [*sync_db*] @@ -491,14 +495,14 @@ class keystone( $service_provider = $::keystone::params::service_provider, $service_name = $::keystone::params::service_name, $max_token_size = undef, - $admin_workers = max($::processorcount, 2), - $public_workers = max($::processorcount, 2), $sync_db = true, $enable_fernet_setup = false, $fernet_key_repository = '/etc/keystone/fernet-keys', $fernet_max_active_keys = undef, $default_domain = undef, # DEPRECATED PARAMETERS + $admin_workers = max($::processorcount, 2), + $public_workers = max($::processorcount, 2), $mysql_module = undef, $compute_port = undef, ) inherits keystone::params { @@ -823,8 +827,8 @@ class keystone( } keystone_config { - 'DEFAULT/admin_workers': value => $admin_workers; - 'DEFAULT/public_workers': value => $public_workers; + 'eventlet_server/admin_workers': value => $admin_workers; + 'eventlet_server/public_workers': value => $public_workers; } if $manage_service { diff --git a/spec/classes/keystone_spec.rb b/spec/classes/keystone_spec.rb index 1ad965a46..c0417a209 100644 --- a/spec/classes/keystone_spec.rb +++ b/spec/classes/keystone_spec.rb @@ -212,14 +212,14 @@ describe 'keystone' do it 'should ensure proper setting of admin_workers and public_workers' do if param_hash['admin_workers'] - is_expected.to contain_keystone_config('DEFAULT/admin_workers').with_value(param_hash['admin_workers']) + is_expected.to contain_keystone_config('eventlet_server/admin_workers').with_value(param_hash['admin_workers']) else - is_expected.to contain_keystone_config('DEFAULT/admin_workers').with_value('2') + is_expected.to contain_keystone_config('eventlet_server/admin_workers').with_value('2') end if param_hash['public_workers'] - is_expected.to contain_keystone_config('DEFAULT/public_workers').with_value(param_hash['public_workers']) + is_expected.to contain_keystone_config('eventlet_server/public_workers').with_value(param_hash['public_workers']) else - is_expected.to contain_keystone_config('DEFAULT/public_workers').with_value('2') + is_expected.to contain_keystone_config('eventlet_server/public_workers').with_value('2') end end