Merge "Set allow_automatic_l3agent_failover in neutron.conf instead of l3_agent.ini"
This commit is contained in:
commit
8946a0e99b
@ -100,11 +100,7 @@
|
||||
# Defaults to 'legacy'
|
||||
#
|
||||
# [*allow_automatic_l3agent_failover*]
|
||||
# (optional) Automatically reschedule routers from offline L3 agents to online
|
||||
# L3 agents.
|
||||
# This is another way to run virtual routers in highly available way but with slow
|
||||
# failover performances compared to Keepalived feature in Neutron L3 Agent.
|
||||
# Defaults to 'False'
|
||||
# DEPRECATED: Has no effect in this class. Use the same parameter in neutron::server instead.
|
||||
#
|
||||
class neutron::agents::l3 (
|
||||
$package_ensure = 'present',
|
||||
@ -129,6 +125,7 @@ class neutron::agents::l3 (
|
||||
$ha_vrrp_auth_password = undef,
|
||||
$ha_vrrp_advert_int = '3',
|
||||
$agent_mode = 'legacy',
|
||||
# DEPRECATED PARAMETERS
|
||||
$allow_automatic_l3agent_failover = false,
|
||||
) {
|
||||
|
||||
@ -137,6 +134,10 @@ class neutron::agents::l3 (
|
||||
Neutron_config<||> ~> Service['neutron-l3']
|
||||
Neutron_l3_agent_config<||> ~> Service['neutron-l3']
|
||||
|
||||
if $allow_automatic_l3agent_failover {
|
||||
notice('parameter allow_automatic_l3agent_failover is deprecated, use parameter in neutron::server instead')
|
||||
}
|
||||
|
||||
if $ha_enabled {
|
||||
neutron_l3_agent_config {
|
||||
'DEFAULT/ha_vrrp_auth_type': value => $ha_vrrp_auth_type;
|
||||
@ -160,7 +161,6 @@ class neutron::agents::l3 (
|
||||
'DEFAULT/enable_metadata_proxy': value => $enable_metadata_proxy;
|
||||
'DEFAULT/router_delete_namespaces': value => $router_delete_namespaces;
|
||||
'DEFAULT/agent_mode': value => $agent_mode;
|
||||
'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover;
|
||||
}
|
||||
|
||||
if $network_device_mtu {
|
||||
|
@ -169,6 +169,11 @@
|
||||
# Also can be the type of the router on the create request (admin-only attribute).
|
||||
# Defaults to false
|
||||
#
|
||||
# [*allow_automatic_l3agent_failover*]
|
||||
# (optional) Allow automatic rescheduling of routers from dead L3 agents with
|
||||
# admin_state_up set to True to alive agents.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*l3_ha*]
|
||||
# (optional) Enable high availability for virtual routers.
|
||||
# Defaults to false
|
||||
@ -209,6 +214,7 @@ class neutron::server (
|
||||
$agent_down_time = '75',
|
||||
$router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
|
||||
$router_distributed = false,
|
||||
$allow_automatic_l3agent_failover = false,
|
||||
$l3_ha = false,
|
||||
$max_l3_agents_per_router = 3,
|
||||
$min_l3_agents_per_router = 2,
|
||||
@ -294,6 +300,7 @@ class neutron::server (
|
||||
'DEFAULT/agent_down_time': value => $agent_down_time;
|
||||
'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver;
|
||||
'DEFAULT/router_distributed': value => $router_distributed;
|
||||
'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover;
|
||||
'database/connection': value => $database_connection, secret => true;
|
||||
'database/idle_timeout': value => $database_idle_timeout;
|
||||
'database/retry_interval': value => $database_retry_interval;
|
||||
|
@ -27,8 +27,7 @@ describe 'neutron::agents::l3' do
|
||||
:ha_vrrp_auth_type => 'PASS',
|
||||
:ha_vrrp_auth_password => nil,
|
||||
:ha_vrrp_advert_int => '3',
|
||||
:agent_mode => 'legacy',
|
||||
:allow_automatic_l3agent_failover => false }
|
||||
:agent_mode => 'legacy' }
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -57,7 +56,6 @@ describe 'neutron::agents::l3' do
|
||||
should contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').with_value(p[:enable_metadata_proxy])
|
||||
should contain_neutron_l3_agent_config('DEFAULT/network_device_mtu').with_ensure('absent')
|
||||
should contain_neutron_l3_agent_config('DEFAULT/router_delete_namespaces').with_value(p[:router_delete_namespaces])
|
||||
should contain_neutron_l3_agent_config('DEFAULT/allow_automatic_l3agent_failover').with_value(p[:allow_automatic_l3agent_failover])
|
||||
end
|
||||
|
||||
it 'installs neutron l3 agent package' do
|
||||
|
@ -33,7 +33,8 @@ describe 'neutron::server' do
|
||||
:l3_ha => false,
|
||||
:max_l3_agents_per_router => '3',
|
||||
:min_l3_agents_per_router => '2',
|
||||
:l3_ha_net_cidr => '169.254.192.0/18'
|
||||
:l3_ha_net_cidr => '169.254.192.0/18',
|
||||
:allow_automatic_l3agent_failover => false
|
||||
}
|
||||
end
|
||||
|
||||
@ -169,6 +170,12 @@ describe 'neutron::server' do
|
||||
should contain_neutron_config('DEFAULT/lock_path').with_value(p[:lock_path])
|
||||
end
|
||||
end
|
||||
|
||||
context 'with allow_automatic_l3agent_failover in neutron.conf' do
|
||||
it 'should configure allow_automatic_l3agent_failover' do
|
||||
should contain_neutron_config('DEFAULT/allow_automatic_l3agent_failover').with_value(p[:allow_automatic_l3agent_failover])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'a neutron server with auth_admin_prefix set' do
|
||||
|
Loading…
Reference in New Issue
Block a user