Comment 1 for bug 1728088

Revision history for this message
Daniel Alvarez (dalvarezs) wrote :

The issue is not that it doesn't exist yet but that it was deleted a few seconds before that error. Actually, in those logs
For some reason, after the port was deleted in both Neutron and OVN, the mech driver receives various events from ovsdbapp that the port has transitioned to down, then to up and then back to down:

-> to Down:

Oct 27 14:11:45.194651 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: INFO networking_ovn.ml2.mech_driver [None req-9675e1f5-e4ee-4929-8a9d-7b06b20bccdf None None] OVN reports status down for port: cc17cd96-a9b5-4ccf-af2f-aec9601952b4
Oct 27 14:11:45.236309 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: DEBUG networking_ovn.ml2.mech_driver [None req-9675e1f5-e4ee-4929-8a9d-7b06b20bccdf None None] Port not found during OVN status down report: cc17cd96-a9b5-4ccf-af2f-aec9601952b4 {{(pid=5634) set_port_status_down /opt/stack/new/networking-ovn/networking_ovn/ml2/mech_driver.py:631}}

-> to Up:

Oct 27 14:11:45.236699 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: INFO networking_ovn.ml2.mech_driver [None req-9675e1f5-e4ee-4929-8a9d-7b06b20bccdf None None] OVN reports status up for port: cc17cd96-a9b5-4ccf-af2f-aec9601952b4
Oct 27 14:11:45.238874 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Running txn command(idx=0): DbListCommand(if_exists=False, records=None, table=Port_Binding, columns=None, row=True) {{(pid=5634) do_commit /usr/local/lib/python2.7/dist-packages/ovsdbapp/backend/ovs_idl/transaction.py:84}}

Oct 27 14:11:45.239120 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Transaction caused no change {{(pid=5634) do_commit /usr/local/lib/python2.7/dist-packages/ovsdbapp/backend/ovs_idl/transaction.py:110}}

Oct 27 14:11:45.244375 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event [None req-9675e1f5-e4ee-4929-8a9d-7b06b20bccdf None None] Unexpected exception in notify_loop: TypeError: 'NoneType' object is not iterable
Oct 27 14:11:45.244568 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event Traceback (most recent call last):
Oct 27 14:11:45.244742 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event File "/usr/local/lib/python2.7/dist-packages/ovsdbapp/event.py", line 117, in notify_loop
Oct 27 14:11:45.244918 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event match.run(event, row, updates)
Oct 27 14:11:45.245081 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event File "/opt/stack/new/networking-ovn/networking_ovn/ovsdb/ovsdb_monitor.py", line 113, in run
Oct 27 14:11:45.245240 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event self.driver.set_port_status_up(row.name)
Oct 27 14:11:45.245406 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event File "/opt/stack/new/networking-ovn/networking_ovn/ml2/mech_driver.py", line 602, in set_port_status_up
Oct 27 14:11:45.245568 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event self._wait_for_metadata_provisioned_if_needed(port_id)
Oct 27 14:11:45.245742 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event File "/opt/stack/new/networking-ovn/networking_ovn/ml2/mech_driver.py", line 671, in _wait_for_metadata_provisioned_if_needed
Oct 27 14:11:45.245988 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event self._sb_ovn.get_logical_port_chassis_and_datapath(port_id))
Oct 27 14:11:45.246152 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event TypeError: 'NoneType' object is not iterable
Oct 27 14:11:45.246309 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: ERROR ovsdbapp.event

-> to Down again:
Oct 27 14:11:45.246537 ubuntu-xenial-rax-ord-0000524329 neutron-server[5590]: INFO networking_ovn.ml2.mech_driver [None req-9675e1f5-e4ee-4929-8a9d-7b06b20bccdf None None] OVN reports status down for port: cc17cd96-a9b5-4ccf-af2f-aec9601952b4

As the port doesn't exist we shouldn't receive the up event.
Because, the port doesn't exist, get_logical_port_chassis_and_datapath() returns None and
this code fails since it can't assign chassis and datapath vars:

            chassis, datapath = (
                self._sb_ovn.get_logical_port_chassis_and_datapath(port_id))

I'll submit a patch to make this error clearer and, if the port doesn't exist, log an ERROR
saying that "We have received an UP event from a port that does not exist". However, we may
want to look deeper into this and prevent ovsdbapp from sending this event up.

@otherwiseguy can shed some light here :)