Debian/Ubuntu: Prohibit BaGPipe agent
Currently networking-bagpipe is shipped in Debian and Ubuntu but their packages do not provide the service unit for the agent (bagpipe-bgp). Also the configuration path is different from the current expectation. This makes the agent class hard-fail in case it's used in Debian or Ubuntu, instead of making wrong configurations (or failures during applying manifests). We'll revisit this if the package problem is resolved and we hear a real request to support the service in Debian and Ubuntu. Closes-Bug: #2043283 Change-Id: If53fe4c586670e25b3dad6e712f5d7fb5778c341
This commit is contained in:
parent
c69ceb7faf
commit
2ed0f9a26d
@ -98,6 +98,10 @@ class neutron::agents::bagpipe (
|
||||
include neutron::deps
|
||||
include neutron::params
|
||||
|
||||
if $facts['os']['family'] != 'RedHat' {
|
||||
fail('BaGPipe agent is currently supported in RedHat OS family')
|
||||
}
|
||||
|
||||
resources { 'neutron_bgpvpn_bagpipe_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
@ -115,12 +119,10 @@ class neutron::agents::bagpipe (
|
||||
'dataplane_driver_ipvpn/mpls_interface': value => $mpls_interface;
|
||||
}
|
||||
|
||||
if $::neutron::params::bagpipe_bgp_package {
|
||||
package { 'openstack-bagpipe-bgp':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::bagpipe_bgp_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
package { 'bagpipe-bgp':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::bagpipe_bgp_package,
|
||||
tag => ['openstack', 'neutron-plugin-ml2-package']
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
@ -131,7 +133,7 @@ class neutron::agents::bagpipe (
|
||||
}
|
||||
service { 'bagpipe-bgp':
|
||||
ensure => $service_ensure,
|
||||
name => $::neutron::params::bgpvpn_bagpipe_service,
|
||||
name => $::neutron::params::bagpipe_bgp_service,
|
||||
enable => $enabled,
|
||||
tag => 'neutron-service',
|
||||
}
|
||||
|
@ -19,9 +19,6 @@ class neutron::params {
|
||||
$ovn_metadata_agent_service = 'neutron-ovn-metadata-agent'
|
||||
$ovn_agent_service = 'neutron-ovn-agent'
|
||||
$bgp_dragent_service = 'neutron-bgp-dragent'
|
||||
$bagpipe_bgp_package = 'openstack-bagpipe-bgp'
|
||||
$bgpvpn_bagpipe_package = 'python3-networking-bagpipe'
|
||||
$bgpvpn_bagpipe_service = 'bagpipe-bgp'
|
||||
$bgpvpn_plugin_package = 'python3-networking-bgpvpn'
|
||||
$l2gw_agent_service = 'neutron-l2gw-agent'
|
||||
$sfc_package = 'python3-networking-sfc'
|
||||
@ -54,6 +51,9 @@ class neutron::params {
|
||||
$ovn_agent_package = 'openstack-neutron-ovn-agent'
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
$bgp_dragent_package = 'openstack-neutron-bgp-dragent'
|
||||
$bagpipe_bgp_package = 'openstack-bagpipe-bgp'
|
||||
$bagpipe_bgp_service = 'bagpipe-bgp'
|
||||
$bgpvpn_bagpipe_package = 'python3-networking-bagpipe'
|
||||
$libreswan_package = 'libreswan'
|
||||
$strongswan_package = 'strongswan'
|
||||
$metadata_agent_package = false
|
||||
@ -79,20 +79,22 @@ class neutron::params {
|
||||
$api_service_name = 'neutron-api'
|
||||
$rpc_package_name = 'neutron-rpc-server'
|
||||
$rpc_service_name = 'neutron-rpc-server'
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
} else {
|
||||
$ml2_server_package = 'neutron-plugin-ml2'
|
||||
$ml2_server_package = 'neutron-plugin-ml2'
|
||||
$server_service = 'neutron-server'
|
||||
$server_package = 'neutron-server'
|
||||
$api_package_name = false
|
||||
$api_service_name = false
|
||||
$rpc_package_name = false
|
||||
$rpc_service_name = false
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
}
|
||||
$dynamic_routing_package = 'python3-neutron-dynamic-routing'
|
||||
$bgp_dragent_package = 'neutron-bgp-dragent'
|
||||
$bagpipe_bgp_package = undef
|
||||
$bagpipe_bgp_service = undef
|
||||
$bgpvpn_bagpipe_package = 'python3-networking-bagpipe'
|
||||
$ovs_agent_package = 'neutron-openvswitch-agent'
|
||||
$ovs_cleanup_service = false
|
||||
$ovs_cleanup_service = undef
|
||||
$linuxbridge_agent_package = 'neutron-linuxbridge-agent'
|
||||
$sriov_nic_agent_service = 'neutron-sriov-agent'
|
||||
$sriov_nic_agent_package = 'neutron-sriov-agent'
|
||||
|
@ -48,11 +48,9 @@ class neutron::plugins::ml2::bagpipe (
|
||||
'bagpipe/mpls_bridge': value => $mpls_bridge;
|
||||
}
|
||||
|
||||
if $::neutron::params::bgpvpn_bagpipe_package {
|
||||
package { 'python-networking-bagpipe':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::bgpvpn_bagpipe_package,
|
||||
tag => ['openstack', 'neutron-plugin-ml2-package']
|
||||
}
|
||||
package { 'python-networking-bagpipe':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::bgpvpn_bagpipe_package,
|
||||
tag => ['openstack', 'neutron-plugin-ml2-package']
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ describe 'neutron::agents::bagpipe' do
|
||||
end
|
||||
|
||||
it 'installs bgpvpn bagpipe package' do
|
||||
should contain_package('openstack-bagpipe-bgp').with(
|
||||
should contain_package('bagpipe-bgp').with(
|
||||
:ensure => p[:package_ensure],
|
||||
:name => platform_params[:bagpipe_bgp_package],
|
||||
)
|
||||
@ -72,7 +72,10 @@ describe 'neutron::agents::bagpipe' do
|
||||
end
|
||||
|
||||
it 'bagpipe service running' do
|
||||
should contain_service('bagpipe-bgp').with_ensure('running')
|
||||
should contain_service('bagpipe-bgp').with(
|
||||
:ensure => 'running',
|
||||
:name => platform_params[:bagpipe_bgp_service]
|
||||
)
|
||||
end
|
||||
|
||||
context 'with multiple peers' do
|
||||
@ -112,13 +115,16 @@ describe 'neutron::agents::bagpipe' do
|
||||
let (:platform_params) do
|
||||
case facts[:os]['family']
|
||||
when 'RedHat'
|
||||
{ :bagpipe_bgp_package => 'openstack-bagpipe-bgp' }
|
||||
{ :bagpipe_bgp_package => 'openstack-bagpipe-bgp',
|
||||
:bagpipe_bgp_service => 'bagpipe-bgp' }
|
||||
when 'Debian'
|
||||
{ :bagpipe_bgp_package => 'openstack-bagpipe-bgp' }
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'neutron bgpvpn bagpipe agent'
|
||||
if facts[:os]['family'] == 'RedHat'
|
||||
it_behaves_like 'neutron bgpvpn bagpipe agent'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,34 +1,24 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'neutron::plugins::ml2::bagpipe' do
|
||||
let :default_params do
|
||||
{
|
||||
:bagpipe_bgp_port => '<SERVICE DEFAULT>',
|
||||
:mpls_bridge => '<SERVICE DEFAULT>',
|
||||
:package_ensure => 'present',
|
||||
}
|
||||
end
|
||||
|
||||
let :params do
|
||||
{}
|
||||
end
|
||||
|
||||
shared_examples 'neutron plugin bagpipe ml2' do
|
||||
before do
|
||||
params.merge!(default_params)
|
||||
end
|
||||
|
||||
it 'should have' do
|
||||
should contain_package('python-networking-bagpipe').with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:bagpipe_package_name],
|
||||
:ensure => params[:package_ensure],
|
||||
:tag => ['openstack', 'neutron-plugin-ml2-package']
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures bagpipe settings' do
|
||||
should contain_neutron_plugin_ml2('bagpipe/bagpipe_bgp_port').with_value(params[:bagpipe_bgp_port])
|
||||
should contain_neutron_plugin_ml2('bagpipe/mpls_bridge').with_value(params[:mpls_bridge])
|
||||
should contain_neutron_plugin_ml2('bagpipe/bagpipe_bgp_port').with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_plugin_ml2('bagpipe/mpls_bridge').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user