Allow L3 agent setting changes without setting l3_ha to true.
We should allow L3 agent settings to be changed without setting l3_ha to true. l3_ha is the default router ha setting, but customers could migrate a legacy router to HA router even when l3_ha is set to false. Change-Id: Ic399fdac366d34e6d4486e2750a6435691141bc7
This commit is contained in:
parent
1ead3cfa3d
commit
fc243b5c0d
@ -407,21 +407,15 @@ class neutron::server (
|
||||
Class['neutron::policy'] ~> Service['neutron-server']
|
||||
Neutron_config<||> -> Neutron_network<||>
|
||||
|
||||
if $l3_ha {
|
||||
if $min_l3_agents_per_router <= $max_l3_agents_per_router or $max_l3_agents_per_router == 0 {
|
||||
neutron_config {
|
||||
'DEFAULT/l3_ha': value => true;
|
||||
'DEFAULT/max_l3_agents_per_router': value => $max_l3_agents_per_router;
|
||||
'DEFAULT/min_l3_agents_per_router': value => $min_l3_agents_per_router;
|
||||
'DEFAULT/l3_ha_net_cidr': value => $l3_ha_net_cidr;
|
||||
}
|
||||
} else {
|
||||
fail('min_l3_agents_per_router should be less than or equal to max_l3_agents_per_router.')
|
||||
if $min_l3_agents_per_router <= $max_l3_agents_per_router or $max_l3_agents_per_router == 0 {
|
||||
neutron_config {
|
||||
'DEFAULT/l3_ha': value => $l3_ha;
|
||||
'DEFAULT/max_l3_agents_per_router': value => $max_l3_agents_per_router;
|
||||
'DEFAULT/min_l3_agents_per_router': value => $min_l3_agents_per_router;
|
||||
'DEFAULT/l3_ha_net_cidr': value => $l3_ha_net_cidr;
|
||||
}
|
||||
} else {
|
||||
neutron_config {
|
||||
'DEFAULT/l3_ha': value => false;
|
||||
}
|
||||
fail('min_l3_agents_per_router should be less than or equal to max_l3_agents_per_router.')
|
||||
}
|
||||
|
||||
|
||||
|
@ -133,6 +133,9 @@ describe 'neutron::server' do
|
||||
end
|
||||
it 'should disable HA routers' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/l3_ha').with_value(false)
|
||||
is_expected.to contain_neutron_config('DEFAULT/max_l3_agents_per_router').with_value(3)
|
||||
is_expected.to contain_neutron_config('DEFAULT/min_l3_agents_per_router').with_value(2)
|
||||
is_expected.to contain_neutron_config('DEFAULT/l3_ha_net_cidr').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user