Merge "ovn: Do not expect the separate plugin package"

This commit is contained in:
Zuul 2021-10-17 22:57:59 +00:00 committed by Gerrit Code Review
commit dc2bdfd72c
8 changed files with 35 additions and 39 deletions

View File

@ -4,7 +4,7 @@ Puppet::Type.type(:ovn_metadata_agent_config).provide(
) do
def self.file_path
'/etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini'
'/etc/neutron/neutron_ovn_metadata_agent.ini'
end
# added for backwards compatibility with older versions of inifile

View File

@ -3,7 +3,7 @@ Puppet::Type.newtype(:ovn_metadata_agent_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from networking-ovn-metadata-agent.ini'
desc 'Section/setting name to manage from neutron_ovn_metadata_agent.ini'
newvalues(/\S+\/\S+/)
end

View File

@ -1,6 +1,6 @@
# == Class: neutron::agents::ovn_metadata
#
# Setup and configure networking-ovn metadata agent.
# Setup and configure neutron ovn metadata agent.
#
# === Parameters
#

View File

@ -11,7 +11,6 @@ class neutron::params {
$linuxbridge_agent_service = 'neutron-linuxbridge-agent'
$opencontrail_plugin_package = 'neutron-plugin-contrail'
$opencontrail_config_file = '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini'
$ovn_plugin_package = 'python3-networking-ovn'
$vpp_plugin_package = 'python3-networking-vpp'
$vpp_agent_service = 'neutron-vpp-agent'
$nuage_config_file = '/etc/neutron/plugins/nuage/plugin.ini'
@ -20,7 +19,7 @@ class neutron::params {
$metering_agent_service = 'neutron-metering-agent'
$l3_agent_service = 'neutron-l3-agent'
$metadata_agent_service = 'neutron-metadata-agent'
$ovn_metadata_agent_service = 'networking-ovn-metadata-agent'
$ovn_metadata_agent_service = 'neutron-ovn-metadata-agent'
$bgp_dragent_service = 'neutron-bgp-dragent'
$bagpipe_bgp_package = 'openstack-bagpipe-bgp'
$bgpvpn_bagpipe_package = 'python3-networking-bagpipe'
@ -63,7 +62,7 @@ class neutron::params {
$vpnaas_agent_package = 'openstack-neutron-vpnaas'
$l2gw_agent_package = 'openstack-neutron-l2gw-agent'
$l2gw_package = 'python3-networking-l2gw'
$ovn_metadata_agent_package = 'python3-networking-ovn-metadata-agent'
$ovn_metadata_agent_package = 'openstack-neutron-ovn-metadata-agent'
$dynamic_routing_package = false
$bgp_dragent_package = 'openstack-neutron-bgp-dragent'
$openswan_package = 'libreswan'
@ -119,6 +118,7 @@ class neutron::params {
$l3_agent_package = 'neutron-l3-agent'
$l2gw_agent_package = 'neutron-l2gateway-agent'
$l2gw_package = 'python3-networking-l2gw'
$ovn_metadata_agent_package = 'neutron-ovn-metadata-agent'
$neutron_wsgi_script_path = '/usr/lib/cgi-bin/neutron'
$neutron_wsgi_script_source = '/usr/bin/neutron-api'
$mlnx_agent_service = 'neutron-plugin-mlnx-agent'

View File

@ -161,13 +161,6 @@ class neutron::plugins::ml2::ovn(
fail( 'Invalid value for neutron_sync_mode parameter' )
}
ensure_resource('package', $::neutron::params::ovn_plugin_package,
{
ensure => $package_ensure,
tag => ['openstack', 'neutron-plugin-ml2-package']
}
)
neutron_plugin_ml2 {
'ovn/ovn_nb_connection' : value => $ovn_nb_connection;
'ovn/ovn_sb_connection' : value => $ovn_sb_connection;

View File

@ -0,0 +1,10 @@
---
fixes:
- |
The independent ovn plugin package(``pythonN-networking-ovn``) is no longer
required. The package is no longer available since Ussuri, and all codes
are now included in the base neutron package.
- |
The ``neutron-ovn-metadata-agent`` package is now installed in Ubuntu and
Debian.

View File

@ -69,6 +69,19 @@ describe 'neutron::agents::ovn_metadata' do
should contain_ovn_metadata_agent_config('ovn/ovn_sb_connection').with(:value => '<SERVICE DEFAULT>')
should contain_ovn_metadata_agent_config('ovn/ovn_remote_probe_interval').with(:value => '<SERVICE DEFAULT>')
end
it 'installs ovn metadata agent package' do
should contain_package('ovn-metadata').with(
:ensure => params[:package_ensure],
:name => platform_params[:ovn_metadata_agent_package],
:tag => ['openstack', 'neutron-package'],
)
end
it 'configures subscription to ovn-metadata package' do
should contain_service('ovn-metadata').that_subscribes_to('Anchor[neutron::service::begin]')
should contain_service('ovn-metadata').that_notifies('Anchor[neutron::service::end]')
end
end
shared_examples 'ovn metadata agent with auth_ca_cert set' do
@ -90,21 +103,6 @@ describe 'neutron::agents::ovn_metadata' do
end
end
shared_examples 'neutron::agents::ovn::metadata on RedHat based' do
it 'installs ovn metadata agent package' do
should contain_package('ovn-metadata').with(
:ensure => params[:package_ensure],
:name => platform_params[:ovn_metadata_agent_package],
:tag => ['openstack', 'neutron-package'],
)
end
it 'configures subscription to ovn-metadata package' do
should contain_service('ovn-metadata').that_subscribes_to('Anchor[neutron::service::begin]')
should contain_service('ovn-metadata').that_notifies('Anchor[neutron::service::end]')
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
@ -116,21 +114,16 @@ describe 'neutron::agents::ovn_metadata' do
let (:platform_params) do
case facts[:osfamily]
when 'Debian'
{
:ovn_metadata_agent_service => 'networking-ovn-metadata-agent'
}
{ :ovn_metadata_agent_package => 'neutron-ovn-metadata-agent',
:ovn_metadata_agent_service => 'neutron-ovn-metadata-agent' }
when 'RedHat'
{ :ovn_metadata_agent_package => 'python3-networking-ovn-metadata-agent',
:ovn_metadata_agent_service => 'networking-ovn-metadata-agent' }
{ :ovn_metadata_agent_package => 'openstack-neutron-ovn-metadata-agent',
:ovn_metadata_agent_service => 'neutron-ovn-metadata-agent' }
end
end
it_behaves_like 'ovn metadata agent'
it_behaves_like 'ovn metadata agent with auth_ca_cert set'
if facts[:osfamily] == 'RedHat'
it_behaves_like 'neutron::agents::ovn::metadata on RedHat based'
end
end
end
end

View File

@ -37,7 +37,7 @@ describe provider_class do
provider = provider_class.new(resource)
expect(provider.section).to eq('DEFAULT')
expect(provider.setting).to eq('foo')
expect(provider.file_path).to eq('/etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini')
expect(provider.file_path).to eq('/etc/neutron/neutron_ovn_metadata_agent.ini')
end
it 'should allow setting to be set explicitly' do
@ -50,7 +50,7 @@ describe provider_class do
provider = provider_class.new(resource)
expect(provider.section).to eq('dude')
expect(provider.setting).to eq('foo')
expect(provider.file_path).to eq('/etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini')
expect(provider.file_path).to eq('/etc/neutron/neutron_ovn_metadata_agent.ini')
end
it 'should ensure absent when <SERVICE DEFAULT> is specified as a value' do