From 308924e5fb65359a6ccd6c0a6a26d7fda48aebee Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 6 Jul 2022 07:42:33 +0000 Subject: [PATCH] Remove workaround for LP#1767422 Since [1] and [2], the workaround done in [3] is no longer needed because we set the port tag when is bound and fixed the VLAN tag setting. [1]https://review.opendev.org/c/openstack/neutron/+/819567 [2]https://review.opendev.org/c/openstack/neutron/+/820897 [3]https://review.opendev.org/c/openstack/neutron/+/566864 Closes-Bug: #1980126 Related-Bug: #1767422 Change-Id: Iee35cde7bbfee0e809cf71c4542dfbdefc97209f --- .../tests/functional/agent/l3/framework.py | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/neutron/tests/functional/agent/l3/framework.py b/neutron/tests/functional/agent/l3/framework.py index a4a497589b4..2ed552847f4 100644 --- a/neutron/tests/functional/agent/l3/framework.py +++ b/neutron/tests/functional/agent/l3/framework.py @@ -32,7 +32,6 @@ from neutron.agent.l3 import namespaces from neutron.agent.l3 import router_info as l3_router_info from neutron.agent import l3_agent as l3_agent_main from neutron.agent.linux import external_process -from neutron.agent.linux import interface from neutron.agent.linux import ip_lib from neutron.agent.linux import keepalived from neutron.agent.metadata import driver as metadata_driver @@ -409,28 +408,8 @@ class L3AgentTestFramework(base.BaseSudoTestCase): def manage_router(self, agent, router): self.addCleanup(agent._safe_router_removed, router['id']) - - # NOTE(mangelajo): Neutron functional for l3 don't rely on openvswitch - # agent tagging ports, and all ports remain untagged - # during test execution. - # Workaround related to lp#1767422 plugs new ports as - # dead vlan (4095) to avoid issues, we need to remove - # such tag during functional l3 testing. - original_plug_new = interface.OVSInterfaceDriver.plug_new - - def new_ovs_plug(self, *args, **kwargs): - original_plug_new(self, *args, **kwargs) - bridge = (kwargs.get('bridge') or args[4] or - self.conf.OVS.integration_bridge) - device_name = kwargs.get('device_name') or args[2] - ovsbr = ovs_lib.OVSBridge(bridge) - ovsbr.clear_db_attribute('Port', device_name, 'tag') - - with mock.patch(OVS_INTERFACE_DRIVER + '.plug_new', autospec=True) as ( - ovs_plug), \ - mock.patch.object(dvr_local_router.DvrLocalRouter, - '_load_used_fip_information'): - ovs_plug.side_effect = new_ovs_plug + with mock.patch.object(dvr_local_router.DvrLocalRouter, + '_load_used_fip_information'): agent._process_added_router(router) return agent.router_info[router['id']]