Remove Neutron Linux Bridge agent code
Linux Bridge agent support was removed in the Neutron
master branch in [0], let's remove any code here now
as well since it will just fail.
[0] https://review.opendev.org/c/openstack/neutron/+/927216
Change-Id: Idffa6579000322acfeb860189fb83a317d56bb4e
diff --git a/doc/source/guides/neutron.rst b/doc/source/guides/neutron.rst
index fb36b3e..a7adeef 100644
--- a/doc/source/guides/neutron.rst
+++ b/doc/source/guides/neutron.rst
@@ -451,44 +451,6 @@
'port_security'), set ``Q_ML2_PLUGIN_EXT_DRIVERS`` to blank.
-Using Linux Bridge instead of Open vSwitch
-------------------------------------------
-
-The configuration for using the Linux Bridge ML2 driver is fairly
-straight forward. The Linux Bridge configuration for DevStack is similar
-to the :ref:`Open vSwitch based single interface <single-interface-ovs>`
-setup, with small modifications for the interface mappings.
-
-
-::
-
- [[local|localrc]]
- HOST_IP=172.18.161.6
- SERVICE_HOST=172.18.161.6
- MYSQL_HOST=172.18.161.6
- RABBIT_HOST=172.18.161.6
- GLANCE_HOSTPORT=172.18.161.6:9292
- ADMIN_PASSWORD=secret
- DATABASE_PASSWORD=secret
- RABBIT_PASSWORD=secret
- SERVICE_PASSWORD=secret
-
- ## Neutron options
- Q_USE_SECGROUP=True
- FLOATING_RANGE="172.18.161.0/24"
- IPV4_ADDRS_SAFE_TO_USE="10.0.0.0/24"
- Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
- PUBLIC_NETWORK_GATEWAY="172.18.161.1"
- PUBLIC_INTERFACE=eth0
-
- Q_USE_PROVIDERNET_FOR_PUBLIC=True
-
- # Linuxbridge Settings
- Q_AGENT=linuxbridge
- LB_PHYSICAL_INTERFACE=eth0
- PUBLIC_PHYSICAL_NETWORK=default
- LB_INTERFACE_MAPPINGS=default:eth0
-
Using MacVTap instead of Open vSwitch
------------------------------------------
@@ -556,7 +518,7 @@
[[local|localrc]]
...
- Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,linuxbridge,macvtap
+ Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,macvtap
...
For the MacVTap compute node, use this local.conf:
diff --git a/doc/source/overview.rst b/doc/source/overview.rst
index 4384081..81e58a3 100644
--- a/doc/source/overview.rst
+++ b/doc/source/overview.rst
@@ -56,7 +56,7 @@
-----------------
- Neutron: A basic configuration approximating the original FlatDHCP
- mode using linuxbridge or OpenVSwitch.
+ mode using OpenVSwitch.
Services
--------
diff --git a/lib/neutron b/lib/neutron
index bcef8a5..69ff212 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -241,8 +241,7 @@
# If using VLANs for tenant networks, or if using flat or VLAN
# provider networks, set in ``localrc`` to the name of the physical
# network, and also configure ``OVS_PHYSICAL_BRIDGE`` for the
-# openvswitch agent or ``LB_PHYSICAL_INTERFACE`` for the linuxbridge
-# agent, as described below.
+# openvswitch agent, as described below.
#
# Example: ``PHYSICAL_NETWORK=default``
PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-public}
@@ -257,18 +256,6 @@
# Example: ``OVS_PHYSICAL_BRIDGE=br-eth1``
OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-br-ex}
-# With the linuxbridge agent, if using VLANs for tenant networks,
-# or if using flat or VLAN provider networks, set in ``localrc`` to
-# the name of the network interface to use for the physical
-# network.
-#
-# Example: ``LB_PHYSICAL_INTERFACE=eth1``
-if [[ $Q_AGENT == "linuxbridge" && -z ${LB_PHYSICAL_INTERFACE} ]]; then
- default_route_dev=$( (ip route; ip -6 route) | grep ^default | head -n 1 | awk '{print $5}')
- die_if_not_set $LINENO default_route_dev "Failure retrieving default route device"
- LB_PHYSICAL_INTERFACE=$default_route_dev
-fi
-
# With the openvswitch plugin, set to True in ``localrc`` to enable
# provider GRE tunnels when ``ENABLE_TENANT_TUNNELS`` is False.
#
@@ -889,10 +876,6 @@
neutron_ovs_base_cleanup
fi
- if [[ $Q_AGENT == "linuxbridge" ]]; then
- neutron_lb_cleanup
- fi
-
# delete all namespaces created by neutron
for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|fip|snat)-[0-9a-f-]*'); do
sudo ip netns delete ${ns}
diff --git a/lib/neutron_plugins/linuxbridge_agent b/lib/neutron_plugins/linuxbridge_agent
deleted file mode 100644
index a392bd0..0000000
--- a/lib/neutron_plugins/linuxbridge_agent
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/bash
-#
-# Neutron Linux Bridge L2 agent
-# -----------------------------
-
-# Save trace setting
-_XTRACE_NEUTRON_LB=$(set +o | grep xtrace)
-set +o xtrace
-
-function neutron_lb_cleanup {
- sudo ip link delete $PUBLIC_BRIDGE
-
- bridge_list=`ls /sys/class/net/*/bridge/bridge_id 2>/dev/null | cut -f5 -d/`
- if [[ -z "$bridge_list" ]]; then
- return
- fi
- if [[ "$Q_ML2_TENANT_NETWORK_TYPE" = "vxlan" ]]; then
- for port in $(echo $bridge_list | grep -o -e [a-zA-Z\-]*tap[0-9a-f\-]* -e vxlan-[0-9a-f\-]*); do
- sudo ip link delete $port
- done
- elif [[ "$Q_ML2_TENANT_NETWORK_TYPE" = "vlan" ]]; then
- for port in $(echo $bridge_list | grep -o -e [a-zA-Z\-]*tap[0-9a-f\-]* -e ${LB_PHYSICAL_INTERFACE}\.[0-9a-f\-]*); do
- sudo ip link delete $port
- done
- fi
- for bridge in $(echo $bridge_list |grep -o -e brq[0-9a-f\-]*); do
- sudo ip link delete $bridge
- done
-}
-
-function is_neutron_ovs_base_plugin {
- # linuxbridge doesn't use OVS
- return 1
-}
-
-function neutron_plugin_create_nova_conf {
- :
-}
-
-function neutron_plugin_install_agent_packages {
- :
-}
-
-function neutron_plugin_configure_dhcp_agent {
- local conf_file=$1
- :
-}
-
-function neutron_plugin_configure_l3_agent {
- local conf_file=$1
- sudo ip link add $PUBLIC_BRIDGE type bridge
- set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
-}
-
-function neutron_plugin_configure_plugin_agent {
- # Setup physical network interface mappings. Override
- # ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more
- # complex physical network configurations.
- if [[ "$LB_INTERFACE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
- LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
- fi
- if [[ "$PUBLIC_BRIDGE" != "" ]] && [[ "$PUBLIC_PHYSICAL_NETWORK" != "" ]]; then
- if is_service_enabled q-l3 || is_service_enabled neutron-l3; then
- iniset /$Q_PLUGIN_CONF_FILE linux_bridge bridge_mappings "$PUBLIC_PHYSICAL_NETWORK:$PUBLIC_BRIDGE"
- fi
- fi
- if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
- iniset /$Q_PLUGIN_CONF_FILE linux_bridge physical_interface_mappings $LB_INTERFACE_MAPPINGS
- fi
- if [[ "$Q_USE_SECGROUP" == "True" ]]; then
- iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
- if ! running_in_container; then
- enable_kernel_bridge_firewall
- fi
- else
- iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver
- fi
- AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-linuxbridge-agent"
- iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES
-
- # Configure vxlan tunneling
- if [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
- if [[ "$Q_ML2_TENANT_NETWORK_TYPE" == "vxlan" ]]; then
- iniset /$Q_PLUGIN_CONF_FILE vxlan enable_vxlan "True"
- iniset /$Q_PLUGIN_CONF_FILE vxlan local_ip $TUNNEL_ENDPOINT_IP
- else
- iniset /$Q_PLUGIN_CONF_FILE vxlan enable_vxlan "False"
- fi
- else
- iniset /$Q_PLUGIN_CONF_FILE vxlan enable_vxlan "False"
- fi
-}
-
-function neutron_plugin_setup_interface_driver {
- local conf_file=$1
- iniset $conf_file DEFAULT interface_driver linuxbridge
-}
-
-function neutron_plugin_check_adv_test_requirements {
- is_service_enabled q-agt neutron-agent && is_service_enabled q-dhcp neutron-dhcp && return 0
-}
-
-# Restore xtrace
-$_XTRACE_NEUTRON_LB
diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2
index c2e78c6..687167b 100644
--- a/lib/neutron_plugins/ml2
+++ b/lib/neutron_plugins/ml2
@@ -114,9 +114,6 @@
populate_ml2_config /$Q_PLUGIN_CONF_FILE securitygroup enable_security_group=$Q_USE_SECGROUP
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 mechanism_drivers=$Q_ML2_PLUGIN_MECHANISM_DRIVERS
- if [[ "$Q_ML2_PLUGIN_MECHANISM_DRIVERS" == *"linuxbridge"* ]]; then
- iniset $NEUTRON_CONF experimental linuxbridge True
- fi
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 overlay_ip_version=$TUNNEL_IP_VERSION
if [[ -n "$Q_ML2_PLUGIN_TYPE_DRIVERS" ]]; then
diff --git a/lib/neutron_plugins/services/l3 b/lib/neutron_plugins/services/l3
index c6d4663..bbedc57 100644
--- a/lib/neutron_plugins/services/l3
+++ b/lib/neutron_plugins/services/l3
@@ -334,16 +334,6 @@
local ext_gw_interface="none"
if is_neutron_ovs_base_plugin; then
ext_gw_interface=$(_neutron_get_ext_gw_interface)
- elif [[ "$Q_AGENT" = "linuxbridge" ]]; then
- # Get the device the neutron router and network for $FIXED_RANGE
- # will be using.
- if [ "$Q_USE_PROVIDERNET_FOR_PUBLIC" = "True" ]; then
- # in provider nets a bridge mapping uses the public bridge directly
- ext_gw_interface=$PUBLIC_BRIDGE
- else
- # e.x. brq3592e767-da for NET_ID 3592e767-da66-4bcb-9bec-cdb03cd96102
- ext_gw_interface=brq${EXT_NET_ID:0:11}
- fi
fi
if [[ "$ext_gw_interface" != "none" ]]; then
local cidr_len=${FLOATING_RANGE#*/}
diff --git a/tools/worlddump.py b/tools/worlddump.py
index edbfa26..26ced3f 100755
--- a/tools/worlddump.py
+++ b/tools/worlddump.py
@@ -31,7 +31,6 @@
'nova-compute',
'neutron-dhcp-agent',
'neutron-l3-agent',
- 'neutron-linuxbridge-agent',
'neutron-metadata-agent',
'neutron-openvswitch-agent',
'cinder-volume',