Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Newton:Staging
openstack-neutron
0012-OVS-Fix-for-cleaning-after-skipped-devices...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0012-OVS-Fix-for-cleaning-after-skipped-devices.patch of Package openstack-neutron
From 20fa3f267ebe7e2feb60d930af4a58a77cb9334c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awek=20Kap=C5=82o=C5=84ski?= <slawek@kaplonski.pl> Date: Fri, 12 Jan 2018 23:08:56 +0100 Subject: [PATCH] [OVS] Fix for cleaning after skipped_devices When Openvswitch agent will get "port_update" event (e.g. to set port as unbound) and port is already removed from br-int when agent tries to get vif port in treat_devices_added_updated() method (port is removed because e.g. nova-compute removes it) then resources set for port by L2 agent extension drivers (like qos) are not cleaned properly. In such case port is added to skipped_ports and is set as DOWN in neutron-db but ext_manager is not called then for such port so it will not clear stuff like bandwidth limit's QoS and queue records and also DSCP marking open flow rules for this port. This patch fixes this issue by adding call of ext_manager.delete_port() method for all skipped ports. Change-Id: I3cf5c57c7f232deaa190ab6b0129e398fdabe592 Closes-Bug: #1737892 (cherry picked from commit a8271e978a1c540ae9888f568cf14b4c40ea1b6d) (cherry picked from commit cdcc704b9e0c6eb3eb8500e5791b007e85653c13) --- .../ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 1 + .../ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py | 4 ++++ 2 files changed, 5 insertions(+) Index: neutron-9.4.2.dev21/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py =================================================================== --- neutron-9.4.2.dev21.orig/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ neutron-9.4.2.dev21/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -1522,6 +1522,7 @@ class OVSNeutronAgent(sg_rpc.SecurityGro # The port disappeared and cannot be processed LOG.info(_LI("Port %s was not found on the integration bridge " "and will therefore not be processed"), device) + self.ext_manager.delete_port(self.context, {'port_id': device}) skipped_devices.append(device) continue Index: neutron-9.4.2.dev21/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py =================================================================== --- neutron-9.4.2.dev21.orig/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py +++ neutron-9.4.2.dev21/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py @@ -838,12 +838,16 @@ class TestOvsNeutronAgent(object): mock.patch.object(self.agent.int_br, 'get_vifs_by_ids', return_value={}),\ + mock.patch.object(self.agent.ext_manager, + "delete_port") as ext_mgr_delete_port,\ mock.patch.object(self.agent, 'treat_vif_port') as treat_vif_port: skip_devs = self.agent.treat_devices_added_or_updated([], False) # The function should return False for resync and no device # processed self.assertEqual((['the_skipped_one'], [], set()), skip_devs) + ext_mgr_delete_port.assert_called_once_with( + self.agent.context, {'port_id': 'the_skipped_one'}) self.assertFalse(treat_vif_port.called) def test_treat_devices_added_failed_devices(self):
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor