Add namespace cleanup options

Adds a configuration option to tell the network agents to delete
namespaces when they are no longer in use. The option defaults to
False so that the agent will not attempt to delete namespaces in
environments where this is not safe.

It affects only L3 & DHCP agents for now.

Change-Id: Ie9e27ae55b796ec12601dbfbeda45184188864f5
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi
2013-12-24 17:26:37 +01:00
parent dcec6d6084
commit e1d44c2aee
4 changed files with 45 additions and 30 deletions

View File

@@ -11,16 +11,17 @@ describe 'neutron::agents::dhcp' do
end
let :default_params do
{ :package_ensure => 'present',
:enabled => true,
:debug => false,
:state_path => '/var/lib/neutron',
:resync_interval => 30,
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:dhcp_driver => 'neutron.agent.linux.dhcp.Dnsmasq',
:root_helper => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
:use_namespaces => true,
:dnsmasq_config_file => nil }
{ :package_ensure => 'present',
:enabled => true,
:debug => false,
:state_path => '/var/lib/neutron',
:resync_interval => 30,
:interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver',
:dhcp_driver => 'neutron.agent.linux.dhcp.Dnsmasq',
:root_helper => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
:use_namespaces => true,
:dnsmasq_config_file => nil,
:dhcp_delete_namespaces => false }
end
@@ -41,6 +42,7 @@ describe 'neutron::agents::dhcp' do
should contain_neutron_dhcp_agent_config('DEFAULT/dhcp_driver').with_value(p[:dhcp_driver]);
should contain_neutron_dhcp_agent_config('DEFAULT/root_helper').with_value(p[:root_helper]);
should contain_neutron_dhcp_agent_config('DEFAULT/use_namespaces').with_value(p[:use_namespaces]);
should contain_neutron_dhcp_agent_config('DEFAULT/dhcp_delete_namespaces').with_value(p[:dhcp_delete_namespaces]);
end
it 'installs neutron dhcp agent package' do