Add attributes for workers

Allow the workers for ironic to be configured.

Change-Id: Id730fcb9abfd35ec7eecdcf6d90d4cea31dd2ebc
Closes-Bug: #1452854
This commit is contained in:
Mark Vanderwiel 2015-05-07 13:51:55 -05:00
parent 25b19192a6
commit a661d7729e
3 changed files with 19 additions and 2 deletions

View File

@ -28,6 +28,14 @@ default['openstack']['bare-metal']['custom_template_banner'] = "
default['openstack']['bare-metal']['verbose'] = 'false'
default['openstack']['bare-metal']['debug'] = 'false'
# Maximum number of worker threads that can be started
# simultaneously by a periodic task. Should be less than RPC
# thread pool size. (integer value)
default['openstack']['bare-metal']['conductor']['periodic_max_workers'] = 8
# The size of the workers greenthread pool. (integer value)
default['openstack']['bare-metal']['conductor']['workers_pool_size'] = 100
# Common rpc definitions
default['openstack']['bare-metal']['rpc_thread_pool_size'] = 64
default['openstack']['bare-metal']['rpc_conn_pool_size'] = 30

View File

@ -70,6 +70,15 @@ describe 'openstack-bare-metal::ironic-common' do
end
end
it 'has the default conductor attributes' do
[
/^periodic_max_workers=8$/,
/^workers_pool_size=100$/
].each do |line|
expect(chef_run).to render_config_file(file.name).with_section_content('conductor', line)
end
end
context 'template contents' do
it 'has the default rpc_backend attribute' do
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', /^rpc_backend=rabbit$/)

View File

@ -576,10 +576,10 @@ log_dir=<%= node['openstack']['bare-metal']['log_dir'] %>
# Maximum number of worker threads that can be started
# simultaneously by a periodic task. Should be less than RPC
# thread pool size. (integer value)
#periodic_max_workers=8
periodic_max_workers=<%= node['openstack']['bare-metal']['conductor']['periodic_max_workers'] %>
# The size of the workers greenthread pool. (integer value)
#workers_pool_size=100
workers_pool_size=<%= node['openstack']['bare-metal']['conductor']['workers_pool_size'] %>
# Number of attempts to grab a node lock. (integer value)
#node_locked_retry_attempts=3