OVS agent may report AttributeError if db_get_val fails in port_bound()

Bug #1503750 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
Low
Ihar Hrachyshka

Bug Description

If db_get_val fails for some reason, it returns None, and then we get AttributeError when trying to call .update() on it.

> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl [req-f164f551-f0e9-4284-8e53-0ffd9591a21d - - - - -] Unable to execute ['ovs-vsctl', '--timeout=10', '--oneline', '--format=json', '--', '--columns=other_config', 'list', 'Port', u'tapb5c2c181-bb'].
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl Traceback (most recent call last):
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl File "/usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_vsctl.py", line 63, in run_vsctl
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl log_fail_as_error=False).rstrip()
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 158, in execute
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl raise RuntimeError(m)
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl RuntimeError:
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl Command: ['ovs-vsctl', '--timeout=10', '--oneline', '--format=json', '--', '--columns=other_config', 'list', 'Port', u'tapb5c2c181-bb']
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl Exit code: 1
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.589 27560 ERROR neutron.agent.ovsdb.impl_vsctl
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-f164f551-f0e9-4284-8e53-0ffd9591a21d - - - - -] Error while processing VIF ports
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent Traceback (most recent call last):
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 1725, in rpc_loop
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent ovs_restarted)
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 1451, in process_network_ports
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent devices_added_updated, ovs_restarted))
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 1342, in treat_devices_added_or_updated
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent ovs_restarted)
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 1238, in treat_vif_port
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent fixed_ips, device_owner, ovs_restarted)
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 798, in port_bound
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent port_other_config.update(vlan_mapping)
> /var/log/neutron/openvswitch-agent.log-20151007:2015-10-07 11:28:38.590 27560 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent AttributeError: 'NoneType' object has no attribute 'update'

Tags: ovs
Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
importance: Undecided → Low
status: New → Confirmed
tags: added: ovs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/232077

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: master
Review: https://review.openstack.org/232077
Reason: Superseded by https://review.openstack.org/#/c/234989

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.