Add an ability to configure root_helper_daemon
To increase performance and don't call everytime sudo it's possible to enable rootwrap demon to 'proxy' sudo calls. Change-Id: Ie7765cd4aa41f95eb498a4132c38937b2817f8e8
This commit is contained in:
parent
d591774c54
commit
62fbfc48ec
@ -110,6 +110,10 @@
|
||||
# directly
|
||||
# Defaults to 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf'.
|
||||
#
|
||||
# [*root_helper_daemon*]
|
||||
# (optional) Root helper daemon application to use when possible.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*report_interval*]
|
||||
# (optional) Seconds between nodes reporting state to server; should be less than
|
||||
# agent_down_time, best if it is half or less than agent_down_time.
|
||||
@ -395,6 +399,7 @@ class neutron (
|
||||
$allow_overlapping_ips = $::os_service_default,
|
||||
$api_extensions_path = $::os_service_default,
|
||||
$root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
|
||||
$root_helper_daemon = $::os_service_default,
|
||||
$report_interval = $::os_service_default,
|
||||
$memcache_servers = false,
|
||||
$control_exchange = 'neutron',
|
||||
@ -528,6 +533,7 @@ class neutron (
|
||||
'DEFAULT/state_path': value => $state_path;
|
||||
'DEFAULT/global_physnet_mtu': value => pick($network_device_mtu, $global_physnet_mtu);
|
||||
'agent/root_helper': value => $root_helper;
|
||||
'agent/root_helper_daemon': value => $root_helper_daemon;
|
||||
'agent/report_interval': value => $report_interval;
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,7 @@ describe 'neutron' do
|
||||
it_configures 'with host defined'
|
||||
it_configures 'with dns_domain defined'
|
||||
it_configures 'with transport_url defined'
|
||||
it_configures 'with rootwrap daemon'
|
||||
|
||||
context 'with amqp rpc_backend value' do
|
||||
it_configures 'amqp support'
|
||||
@ -154,6 +155,7 @@ describe 'neutron' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/rpc_response_timeout').with_value( '<SERVICE DEFAULT>' )
|
||||
is_expected.to contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf')
|
||||
is_expected.to contain_neutron_config('agent/root_helper_daemon').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('agent/report_interval').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
@ -500,6 +502,18 @@ describe 'neutron' do
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'with rootwrap daemon' do
|
||||
before do
|
||||
params.merge!(
|
||||
:root_helper_daemon => 'sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf'
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_neutron_config('agent/root_helper_daemon').with_value(params[:root_helper_daemon])
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'amqp support' do
|
||||
context 'with default parameters' do
|
||||
before { params.merge!( :rpc_backend => 'amqp' ) }
|
||||
|
Loading…
Reference in New Issue
Block a user