The ovn-db-sync script does not check if the router ports are actually out-of-sync before adding it to the list of ports that needs to be updated, this can create red herring problems by introducing an irrelevant piece of information [0] in the sync report (specially when ran in "log" mode) making the user think that the databases might be out-of-sync even when it is not.
Looking at the code [1] we can see that the comment talks about checking the networks and ipv6_ra_configs changes but it does neither; instead, it adds every router port to the list of ports that needs to be updated.
<snipet>
# We dont have to check for the networks and
# ipv6_ra_configs values. Lets add it to the
# update_lrport_list. If they are in sync, then
# update_router_port will be a no-op.
update_lrport_list.append(db_router_ports[lrport])
</snipet>
This LP is about changing this behavior and checking for such differences in the router ports before marking them to be updated.
[0]
2023-07-24 11:46:31.391 952358 WARNING networking_ovn.ovn_db_sync [req-1081a8a6-82dd-431c-a2ab-f58741dc1677 - - - - -] Router Port port_id=f164c0f1-8ac8-4c45-bba9-8c723a30c701 needs to be updated for networks changed
Reported at: https:/ /bugzilla. redhat. com/show_ bug.cgi? id=2225156
The ovn-db-sync script does not check if the router ports are actually out-of-sync before adding it to the list of ports that needs to be updated, this can create red herring problems by introducing an irrelevant piece of information [0] in the sync report (specially when ran in "log" mode) making the user think that the databases might be out-of-sync even when it is not.
Looking at the code [1] we can see that the comment talks about checking the networks and ipv6_ra_configs changes but it does neither; instead, it adds every router port to the list of ports that needs to be updated.
<snipet>
# We dont have to check for the networks and lrport_ list.append( db_router_ ports[lrport] )
# ipv6_ra_configs values. Lets add it to the
# update_lrport_list. If they are in sync, then
# update_router_port will be a no-op.
update_
</snipet>
This LP is about changing this behavior and checking for such differences in the router ports before marking them to be updated.
[0] ovn.ovn_ db_sync [req-1081a8a6- 82dd-431c- a2ab-f58741dc16 77 - - - - -] Router Port port_id= f164c0f1- 8ac8-4c45- bba9-8c723a30c7 01 needs to be updated for networks changed
2023-07-24 11:46:31.391 952358 WARNING networking_
[1] /github. com/openstack/ neutron/ blob/c453813d06 64259c4da0d132f 224be2eebe70072 /neutron/ plugins/ ml2/drivers/ ovn/mech_ driver/ ovsdb/ovn_ db_sync. py#L553- L557
https:/