Neutron / Metadata: improve agent scalability

we need by default to set the metadata backlog value and the workers
value. Inspired from
19:34: https://www.youtube.com/watch?v=AF9r_VQrcJ0 and
https://review.openstack.org/#/c/95372

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2014-06-08 16:10:26 +02:00
parent 846b5cd18b
commit e730145dc2
2 changed files with 26 additions and 16 deletions

View File

@ -32,13 +32,19 @@ class cloud::network::metadata(
include 'cloud::network'
class { 'neutron::agents::metadata':
enabled => $enabled,
shared_secret => $neutron_metadata_proxy_shared_secret,
debug => $debug,
metadata_ip => $nova_metadata_server,
auth_url => "${ks_keystone_admin_proto}://${ks_keystone_admin_host}:${ks_keystone_admin_port}/v2.0",
auth_password => $ks_neutron_password,
auth_region => $auth_region
enabled => $enabled,
shared_secret => $neutron_metadata_proxy_shared_secret,
debug => $debug,
metadata_ip => $nova_metadata_server,
auth_url => "${ks_keystone_admin_proto}://${ks_keystone_admin_host}:${ks_keystone_admin_port}/v2.0",
auth_password => $ks_neutron_password,
auth_region => $auth_region,
metadata_workers => $::processorcount
}
# TODO(EmilienM) need to be deleted hen https://review.openstack.org/98633 got merged
neutron_metadata_agent_config {
'DEFAULT/metadata_backlog': value => '4096';
}
}

View File

@ -86,20 +86,23 @@ describe 'cloud::network::metadata' do
it 'configure neutron metadata' do
should contain_class('neutron::agents::metadata').with(
:debug => true,
:enabled => true,
:shared_secret => 'secrete',
:metadata_ip => '10.0.0.1',
:auth_url => 'http://10.0.0.1:35357/v2.0',
:auth_password => 'secrete',
:auth_region => 'MyRegion'
:debug => true,
:enabled => true,
:shared_secret => 'secrete',
:metadata_ip => '10.0.0.1',
:auth_url => 'http://10.0.0.1:35357/v2.0',
:auth_password => 'secrete',
:auth_region => 'MyRegion',
:metadata_workers => '8'
)
should contain_neutron_metadata_agent_config('DEFAULT/metadata_backlog').with(:value => '4096')
end
end
context 'on Debian platforms' do
let :facts do
{ :osfamily => 'Debian' }
{ :osfamily => 'Debian',
:processorcount => '8' }
end
let :platform_params do
@ -111,7 +114,8 @@ describe 'cloud::network::metadata' do
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat' }
{ :osfamily => 'RedHat',
:processorcount => '8' }
end
let :platform_params do