vpnaas: Do not install wrong backend package for OpenSwan driver

Currently the neutron::agents::vpnaas class installs LibreSwan (in
CentOS) or strongSwan (in Debian or Ubuntu) for the OpenSwan driver
but the OpenSwan driver only works with OpenSwan which is no longer
shipped. (That's why they developed different drivers for different
libraries).

This change drops installation of the wrong package and also deprecates
support for OpenSwan driver.

Change-Id: I158dd3411900241950ead9635bba4583eebcb983
This commit is contained in:
Takashi Kajinami 2023-11-07 01:47:14 +09:00
parent 74cbf81623
commit dfc70104d1
4 changed files with 6 additions and 18 deletions

View File

@ -53,12 +53,8 @@ class neutron::agents::vpnaas (
case $vpn_device_driver {
/\.OpenSwan/: {
Package['openswan'] -> Package<| title == 'neutron-vpnaas-agent' |>
package { 'openswan':
ensure => present,
name => $::neutron::params::openswan_package,
tag => ['openstack', 'neutron-support-package'],
}
warning("Support for OpenSwan has been deprecated, because of lack of \
openswan package in distributions")
}
/\.LibreSwan/: {
Package['libreswan'] -> Package<| title == 'neutron-vpnaas-agent' |>

View File

@ -54,7 +54,6 @@ class neutron::params {
$ovn_agent_package = 'openstack-neutron-ovn-agent'
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
$bgp_dragent_package = 'openstack-neutron-bgp-dragent'
$openswan_package = 'libreswan'
$libreswan_package = 'libreswan'
$strongswan_package = 'strongswan'
$metadata_agent_package = false
@ -101,7 +100,6 @@ class neutron::params {
$dhcp_agent_package = 'neutron-dhcp-agent'
$metering_agent_package = 'neutron-metering-agent'
$vpnaas_agent_package = 'python3-neutron-vpnaas'
$openswan_package = 'strongswan'
$libreswan_package = 'libreswan'
$strongswan_package = 'strongswan'
$metadata_agent_package = 'neutron-metadata-agent'

View File

@ -0,0 +1,4 @@
---
deprecations:
- |
Support for OpenSwan VPNaaS driver has been derecated.

View File

@ -48,14 +48,6 @@ describe 'neutron::agents::vpnaas' do
:tag => ['openstack', 'neutron-package'],
)
end
it 'installs openswan packages' do
should contain_package('openswan').with(
:ensure => 'present',
:name => platform_params[:openswan_package],
:tag => ['openstack', 'neutron-support-package'],
)
end
end
context 'with libreswan vpnaas driver' do
@ -113,14 +105,12 @@ describe 'neutron::agents::vpnaas' do
case facts[:os]['family']
when 'Debian'
{
:openswan_package => 'strongswan',
:libreswan_package => 'libreswan',
:strongswan_package => 'strongswan',
:vpnaas_agent_package => 'python3-neutron-vpnaas'
}
when 'RedHat'
{
:openswan_package => 'libreswan',
:libreswan_package => 'libreswan',
:strongswan_package => 'strongswan',
:vpnaas_agent_package => 'openstack-neutron-vpnaas'