Use oslo::coordination to manage tooz backend package

Change-Id: I01404d4341c19294a3de230323ca3ddfd7a72ec2
This commit is contained in:
Takashi Kajinami 2021-11-25 10:54:15 +09:00
parent 60ba5c8029
commit 52935b3e69
3 changed files with 17 additions and 1 deletions

View File

@ -93,6 +93,10 @@ class neutron::deps {
# before service startup
Oslo::Cache<||> -> Anchor['neutron::service::begin']
# all coordination settings should be applied and all packages should be
# installed before service startup
Oslo::Coordination<||> -> Anchor['neutron::service::begin']
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['neutron::dbsync::begin']

View File

@ -54,5 +54,12 @@ class neutron::plugins::ml2::networking_ansible(
)
create_resources(neutron::plugins::ml2::networking_ansible_host, $host_configs)
neutron_plugin_ml2 {'ml2_ansible/coordination_uri': value => $coordination_uri; }
oslo::coordination { 'neutron_plugin_ml2':
backend_url => $coordination_uri,
manage_config => false,
}
neutron_plugin_ml2 {
'ml2_ansible/coordination_uri': value => $coordination_uri;
}
}

View File

@ -41,6 +41,11 @@ describe 'neutron::plugins::ml2::networking_ansible' do
end
it 'should configure non-host config' do
should contain_oslo__coordination('neutron_plugin_ml2').with(
:backend_url => 'etcd://127.0.0.1:2379',
:manage_config => false,
)
should contain_neutron_plugin_ml2('ml2_ansible/coordination_uri').with_value('etcd://127.0.0.1:2379')
end