l3: Ensure ha_* parameters are unset when ha is disabled

... instead of leaving these parameters unmanaged.

Change-Id: Ie007e59dda05729d684c65be6e6e30ad6a060316
This commit is contained in:
Takashi Kajinami 2021-09-23 22:20:45 +09:00
parent 8baf515b16
commit 56f0dfa739
2 changed files with 9 additions and 0 deletions

View File

@ -174,6 +174,12 @@ class neutron::agents::l3 (
'DEFAULT/ha_vrrp_auth_password': value => $ha_vrrp_auth_password, secret => true; 'DEFAULT/ha_vrrp_auth_password': value => $ha_vrrp_auth_password, secret => true;
'DEFAULT/ha_vrrp_advert_int': value => $ha_vrrp_advert_int; 'DEFAULT/ha_vrrp_advert_int': value => $ha_vrrp_advert_int;
} }
} else {
neutron_l3_agent_config {
'DEFAULT/ha_vrrp_auth_type': ensure => absent;
'DEFAULT/ha_vrrp_auth_password': ensure => absent;
'DEFAULT/ha_vrrp_advert_int': ensure => absent;
}
} }
neutron_l3_agent_config { neutron_l3_agent_config {

View File

@ -30,6 +30,9 @@ describe 'neutron::agents::l3' do
it { should contain_class('neutron::params') } it { should contain_class('neutron::params') }
it 'configures l3_agent.ini' do it 'configures l3_agent.ini' do
should contain_neutron_l3_agent_config('DEFAULT/ha_vrrp_auth_type').with_ensure('absent')
should contain_neutron_l3_agent_config('DEFAULT/ha_vrrp_auth_password').with_ensure('absent')
should contain_neutron_l3_agent_config('DEFAULT/ha_vrrp_advert_int').with_ensure('absent')
should contain_neutron_l3_agent_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>') should contain_neutron_l3_agent_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]) should contain_neutron_l3_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver])
should contain_neutron_l3_agent_config('DEFAULT/handle_internal_only_routers').with_value('<SERVICE DEFAULT>') should contain_neutron_l3_agent_config('DEFAULT/handle_internal_only_routers').with_value('<SERVICE DEFAULT>')