Reviewed: https://review.openstack.org/300679 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=213d48df014eebdc96a70a9369ffc9701f419f9f Submitter: Jenkins Branch: master
commit 213d48df014eebdc96a70a9369ffc9701f419f9f Author: Sławek Kapłoński <[email protected]> Date: Fri Apr 1 22:00:41 2016 +0000 Improve handle port_update and port_delete events in ovs qos agent This patch improves getting vif port name from port info in Openvswitch QoS extension driver. It will prevent to have tracebacks with info that NoneType object has no attribute. Such situation could happen if extension driver handled event on port which was already deleted Change-Id: Ib76630183f1091436f1cd282a91cbce5fb151716 Closes-Bug: #1536540 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1536540 Title: AttributeError: 'NoneType' object has no attribute 'port_name' when deleting an instance with QoS policy attached Status in neutron: Fix Released Bug description: After deleting an instance with a port the has a QoS policy attached the following Trace occurs in the OVS agent log: 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager Traceback (most recent call last): 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager File "/usr/lib/python2.7/site-packages/neutron/agent/l2/extensions/manager.py", line 77, in delete_port 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager extension.obj.delete_port(context, data) 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager File "/usr/lib/python2.7/site-packages/neutron/agent/l2/extensions/qos.py", line 239, in delete_port 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager self._process_reset_port(port) 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager File "/usr/lib/python2.7/site-packages/neutron/agent/l2/extensions/qos.py", line 254, in _process_reset_port 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager self.qos_driver.delete(port) 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager File "/usr/lib/python2.7/site-packages/neutron/agent/l2/extensions/qos.py", line 89, in delete 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager self._handle_rule_delete(port, rule_type) 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager File "/usr/lib/python2.7/site-packages/neutron/agent/l2/extensions/qos.py", line 104, in _handle_rule_delete 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager handler(port) 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py", line 49, in delete_bandwidth_limit 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager port_name = port['vif_port'].port_name 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager AttributeError: 'NoneType' object has no attribute 'port_name' 2016-01-21 04:02:22.634 21316 ERROR neutron.agent.l2.extensions.manager 2016-01-21 04:02:22.636 21316 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-b605ce4f-c832-4d8c-a7a7-ee8b89f47e4a - - - - -] port_unbound(): net_uuid None not in local_vlan_map 2016-01-21 04:02:22.637 21316 INFO neutron.agent.securitygroups_rpc [req-b605ce4f-c832-4d8c-a7a7-ee8b8 How to reproduce =============== 1. Enable QoS 2. Create a QoS policy and a rule 3. Launch an instance 4. Attach the QoS policy to a the port of the instance 5. Delete the instance and check the OVS agent's log Version ====== RHEL7.2 Liberty python-neutron-7.0.1-6.el7ost.noarch openstack-neutron-ml2-7.0.1-6.el7ost.noarch openstack-neutron-openvswitch-7.0.1-6.el7ost.noarch openstack-neutron-common-7.0.1-6.el7ost.noarch openstack-neutron-7.0.1-6.el7ost.noarch To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1536540/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

