On 5/27/24 18:22, Roberto Bartzen Acosta via discuss wrote:
> Hello everyone!
>
> I found an issue during testing with the OVN-IC daemon. I noticed that
> applications that interact with python-idl show an error when deleting
> datapath_binding when the table index changes.
>
> We can see the error in the logs below:
>
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection [-]
> Datapath_Binding(uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
> tunnel_key=16711683, load_balancers=[], external_ids={}) not in list:
> ValueError:
> Datapath_Binding(uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
> tunnel_key=16711683, load_balancers=[], external_ids={}) not in list
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> Traceback (most recent call last):
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/ovsdbapp/backend/ovs_idl/connection.py",
> line 110, in run
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> self.idl.run()
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/ovs/db/idl.py", line 465, in run
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> self.__parse_update(msg.params[2], OVSDB_UPDATE3)
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/ovs/db/idl.py", line 924, in
> __parse_update
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> self.__do_parse_update(update, version, self.tables)
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/ovs/db/idl.py", line 964, in
> __do_parse_update
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> changes = self.__process_update2(table, uuid, row_update)
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/ovs/db/idl.py", line 991, in
> __process_update2
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> del table.rows[uuid]
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/ovs/db/custom_index.py", line 102, in
> __delitem__
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> index.remove(val)
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/ovs/db/custom_index.py", line 66, in
> remove
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> self.values.remove(self.index_entry_from_row(row))
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> File "/usr/lib/python3/dist-packages/sortedcontainers/sortedlist.py", line
> 2015, in remove
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> raise ValueError('{0!r} not in list'.format(value))
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
> ValueError:
> Datapath_Binding(uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
> tunnel_key=16711683, load_balancers=[], external_ids={}) not in list
> 2024-05-27 09:49:38.779 23596 ERROR ovsdbapp.backend.ovs_idl.connection
>
>
> The complete logs showing the creation, update of the tunnel_key and deletion
> of the datapath_binding can be accessed at [1].
>
> Basically the problem occurs because of the tunnel_key update when we create
> a transit-switch. If the table did not have this index the problem would not
> be observed.
>
> This issue affects applications such as: neutron-server,
> neutron-ovn-metadata-agent, and everyone that monitors the Datapath_Binding
> table via python-idl.
>
> I've already talked to Ilya Maximets in the openvswitch IRC channel and the
> issue seems to be in the row updating process: python/ovs/db/idl.py.
Thanks, Roberto! I beleive the fix I shared on IRC is mostly correct though
I didn't test it. I need to refine it a little and add a unit test for the
issue. With that I hope to post it for review somewhere soon.
CC: Terry.
Best regards, Ilya Maximets.
>
> Kind regards,
> Roberto
>
>
> [1] https://paste.openstack.org/show/bqLA7nxfk2C6loD5YlY1/
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss