Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Newton
openstack-neutron-doc
0015-Trigger-port-status-DOWN-on-VIF-replug.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0015-Trigger-port-status-DOWN-on-VIF-replug.patch of Package openstack-neutron-doc
diff -crB --new-file neutron-9.4.2.dev21-backup/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 *** neutron-9.4.2.dev21-backup/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py 2019-03-18 15:33:12.777165543 -0700 --- neutron-9.4.2.dev21/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py 2019-03-18 15:42:47.983379920 -0700 *************** *** 1383,1389 **** return self._get_port_info(registered_ports, cur_ports, sync) def check_changed_vlans(self): ! """Return ports which have lost their vlan tag. The returned value is a set of port ids of the ports concerned by a vlan tag loss. --- 1383,1389 ---- return self._get_port_info(registered_ports, cur_ports, sync) def check_changed_vlans(self): ! """Check for changed VLAN tags. If changes, notify server and return. The returned value is a set of port ids of the ports concerned by a vlan tag loss. *************** *** 1403,1408 **** --- 1403,1420 ---- 'vlan_tag': lvm.vlan} ) changed_ports.add(port.vif_id) + if changed_ports: + # explicitly mark these DOWN on the server since they have been + # manipulated (likely a nova unplug/replug) and need to be rewired + devices_down = self.plugin_rpc.update_device_list(self.context, + [], + changed_ports, + self.agent_id, + self.conf.host) + failed_devices = set(devices_down.get('failed_devices_down')) + if failed_devices: + LOG.debug("Status updated failed for %s", failed_devices) + return changed_ports def treat_vif_port(self, vif_port, port_id, network_id, network_type, diff -crB --new-file neutron-9.4.2.dev21-backup/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 *** neutron-9.4.2.dev21-backup/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py 2019-03-18 15:33:12.777165543 -0700 --- neutron-9.4.2.dev21/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py 2019-03-18 15:44:47.376781911 -0700 *************** *** 615,624 **** added=set([3]), current=vif_port_set, removed=set([2]), updated=set([1]) ) ! with mock.patch.object(self.agent, 'tun_br', autospec=True): actual = self.mock_scan_ports( vif_port_set, registered_ports, port_tags_dict=port_tags_dict) self.assertEqual(expected, actual) def test_update_retries_map_and_remove_devs_not_to_retry(self): failed_devices_retries_map = { --- 615,629 ---- added=set([3]), current=vif_port_set, removed=set([2]), updated=set([1]) ) ! with mock.patch.object(self.agent, 'tun_br', autospec=True), \ ! mock.patch.object(self.agent.plugin_rpc, ! 'update_device_list') as upd_l: actual = self.mock_scan_ports( vif_port_set, registered_ports, port_tags_dict=port_tags_dict) self.assertEqual(expected, actual) + upd_l.assert_called_once_with(mock.ANY, [], set([1]), + self.agent.agent_id, + self.agent.conf.host) def test_update_retries_map_and_remove_devs_not_to_retry(self): failed_devices_retries_map = {
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