Skip to content

Commit

Permalink
Set default metadata backlog to 4096
Browse files Browse the repository at this point in the history
We already optimize the metadata agent by running it in multi-workers,
we need by default to set the metadata backlog value.
Inspired from 19:34: https://www.youtube.com/watch?v=AF9r_VQrcJ0
and https://review.openstack.org/#/c/95372

Change-Id: I68f3414ef56290ca27d11f8cf26febc100741d46
Signed-off-by: Emilien Macchi <[email protected]>
(cherry picked from commit 1055a12)
  • Loading branch information
Emilien Macchi committed Jun 24, 2014
1 parent d91441f commit 346aa78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion manifests/agents/metadata.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
# The parent process manages them. Having more workers will help to improve performances.
# Defaults to: 0
#
# [*metadata_backlog*]
# (optional) Number of backlog requests to configure the metadata server socket with.
# Defaults to 4096
#

class neutron::agents::metadata (
$auth_password,
Expand All @@ -71,7 +75,8 @@
$auth_region = 'RegionOne',
$metadata_ip = '127.0.0.1',
$metadata_port = '8775',
$metadata_workers = '0'
$metadata_workers = '0',
$metadata_backlog = '4096'
) {

include neutron::params
Expand All @@ -92,6 +97,7 @@
'DEFAULT/nova_metadata_port': value => $metadata_port;
'DEFAULT/metadata_proxy_shared_secret': value => $shared_secret;
'DEFAULT/metadata_workers': value => $metadata_workers;
'DEFAULT/metadata_backlog': value => $metadata_backlog;
}

if $auth_ca_cert {
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/neutron_agents_metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
:metadata_ip => '127.0.0.1',
:metadata_port => '8775',
:metadata_workers => '2',
:metadata_backlog => '4096',
:shared_secret => 'metadata-secret'
}
end
Expand Down Expand Up @@ -57,6 +58,7 @@
should contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_ip').with(:value => params[:metadata_ip])
should contain_neutron_metadata_agent_config('DEFAULT/nova_metadata_port').with(:value => params[:metadata_port])
should contain_neutron_metadata_agent_config('DEFAULT/metadata_workers').with(:value => params[:metadata_workers])
should contain_neutron_metadata_agent_config('DEFAULT/metadata_backlog').with(:value => params[:metadata_backlog])
should contain_neutron_metadata_agent_config('DEFAULT/metadata_proxy_shared_secret').with(:value => params[:shared_secret])
end
end
Expand Down

0 comments on commit 346aa78

Please sign in to comment.