Comment 12 for bug 2052485

Revision history for this message
Andy Litzinger (alitzinger) wrote (last edit ):

Should the log messages from ovs_vsctl.py end up in the ovn-bgp-agent logs? If so, I don't have any messages that match the error text from lines 36 or 40:

vagrant@rack-1-host-1:~$ sudo journalctl -u devstack@ovn-bgp-agent | grep Exception
vagrant@rack-1-host-1:~$

vagrant@rack-1-host-2:~$ sudo journalctl -u devstack@ovn-bgp-agent | grep Exception
vagrant@rack-1-host-2:~$

There is a slight difference in the errors ovn-bgp-agent is logging on my two nodes.
Node rack-1-host-1 is the controller + compute node. It has the config line to pin the neutron version and the pin to the OVS version in its local.conf . I also edited ovn_bgp_agent/drivers/openstack/utils/ovs.py so that each call for ovs-ofctl passes in the --protocols=OpenFlow13, e.g.:

--- a/ovn_bgp_agent/drivers/openstack/utils/ovs.py
+++ b/ovn_bgp_agent/drivers/openstack/utils/ovs.py
@@ -42,7 +42,7 @@ def _find_ovs_port(bridge):

 def get_bridge_flows(bridge, filter_=None):
- args = ['dump-flows', bridge]
+ args = ['--protocols=OpenFlow13', 'dump-flows', bridge]
     if filter_ is not None:
         args.append(filter_)
     return ovn_bgp_agent.privileged.ovs_vsctl.ovs_cmd(
@@ -114,10 +114,10 @@ def ensure_mac_tweak_flows(bridge, mac, ports, cookie):

         if not exist_flow:
             ovn_bgp_agent.privileged.ovs_vsctl.ovs_cmd(
- 'ovs-ofctl', ['add-flow', bridge, flow])
+ 'ovs-ofctl', ['--protocols=OpenFlow13', 'add-flow', bridge, flow])
         if not exist_flow_v6:
             ovn_bgp_agent.privileged.ovs_vsctl.ovs_cmd(
- 'ovs-ofctl', ['add-flow', bridge, flow_v6])
+ 'ovs-ofctl', ['--protocols=OpenFlow13', 'add-flow', bridge, flow_v6])

<snip>

Node rack-1-host-2 is the compute node. It does NOT have the config line to pin the neutron version in its local.conf. It does have the config line to pin OVS version. It does NOT have any updates to it's ovs.py

node rack-1-host-1 is not specifically logging the ofctl version error, presumably because of my changes to ovs.py. Despite not logging the 'version negotiation failed' errors, it is not adding the flow to br-ex. Every 5 minutes it is logging these errors which I am not sure what they relate to:
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: 2024-03-04 19:37:29.522 46187 DEBUG ovn_bgp_agent.drivers.openstack.ovn_bgp_driver [-] Added BGP route for logical por>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: fail <class 'int'>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: fail <class 'str'>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: fail <class 'str'>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: fail <class 'str'>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: fail <class 'int'>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: fail <class 'int'>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: recursion
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: fail <class 'int'>
Mar 04 19:37:29 rack-1-host-1 ovn-bgp-agent[46187]: {'attrs': [('RTA_TABLE', 232), ('RTA_DST', '2001:db8::192'), ('RTA_SRC', '::'), ('RTA_PREFSRC', 'fd53:d91e:400:7f17::1>

rack-1-host-2 is logging the ofctl version mismatch error every 5 minutes, in addition to the same errors as rack-1-host-1:
Mar 04 19:25:21 rack-1-host-2 ovn-bgp-agent[113895]: 2024-03-04 19:25:21.938 113895 DEBUG ovn_bgp_agent.utils.linux_net [-] IP fd53:d91e:400:7f17::1 already added on brid>
Mar 04 19:25:22 rack-1-host-2 ovs-ofctl[687344]: ovs|00001|vconn|WARN|unix:/usr/local/var/run/openvswitch/br-ex.mgmt: version negotiation failed (we support version 0x01,>
Mar 04 19:25:22 rack-1-host-2 ovs-ofctl[687346]: ovs|00001|vconn|WARN|unix:/usr/local/var/run/openvswitch/br-ex.mgmt: version negotiation failed (we support version 0x01,>
Mar 04 19:25:22 rack-1-host-2 ovs-ofctl[687348]: ovs|00001|vconn|WARN|unix:/usr/local/var/run/openvswitch/br-ex.mgmt: version negotiation failed (we support version 0x01,>
Mar 04 19:25:22 rack-1-host-2 ovs-ofctl[687350]: ovs|00001|vconn|WARN|unix:/usr/local/var/run/openvswitch/br-ex.mgmt: version negotiation failed (we support version 0x01,>
Mar 04 19:25:22 rack-1-host-2 ovs-ofctl[687352]: ovs|00001|vconn|WARN|unix:/usr/local/var/run/openvswitch/br-ex.mgmt: version negotiation failed (we support version 0x01,>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: 2024-03-04 19:25:22.102 113895 DEBUG ovn_bgp_agent.drivers.openstack.ovn_bgp_driver [-] Syncing current routes. sync >
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: 2024-03-04 19:25:22.105 113895 DEBUG ovn_bgp_agent.drivers.openstack.ovn_bgp_driver [-] Adding BGP route for logical >
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: 2024-03-04 19:25:22.111 113895 DEBUG ovn_bgp_agent.utils.linux_net [-] Route already existing: {'dst': '172.24.4.56',>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: 2024-03-04 19:25:22.118 113895 DEBUG ovn_bgp_agent.utils.linux_net [-] Route already existing: {'dst': '2001:db8::aa'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: 2024-03-04 19:25:22.129 113895 DEBUG ovn_bgp_agent.drivers.openstack.ovn_bgp_driver [-] Added BGP route for logical p>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: fail <class 'int'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: fail <class 'str'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: fail <class 'str'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: fail <class 'str'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: fail <class 'int'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: fail <class 'int'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: recursion
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: fail <class 'int'>
Mar 04 19:25:22 rack-1-host-2 ovn-bgp-agent[113895]: {'attrs': [('RTA_TABLE', 31), ('RTA_DST', '2001:db8::aa'), ('RTA_SRC', '::'), ('RTA_PREFSRC', 'fd53:d91e:400:7f17::1'>

neither node is properly adding the flow to br-ex which rewrites the mac addresses.