Bug 1970452

Summary: OVS restore flow script specifies OpenFlow14 leading error
Product: OpenShift Container Platform Reporter: Alexander Constantinescu <aconstan>
Component: NetworkingAssignee: Alexander Constantinescu <aconstan>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: unspecified    
Version: 4.6   
Target Milestone: ---   
Target Release: 4.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1970453 (view as bug list) Environment:
Last Closed: 2021-06-10 13:45:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1970453    

Description Alexander Constantinescu 2021-06-10 13:41:30 UTC
Description of problem:

The ovs-save script used by the CNO to restore flows whenever OVS boots in container mode on 4.6 has a bug introduced by the bump to OVS 2.13, namely it defaults to using OpenFlow14 whereas openshift-sdn only supports OpenFlow13. This leads to un-restored flows on upgrades from 4.5 -> 4.6 causing downtime for customers on upgrades. 

Errors will look like:

2021-05-27 15:33:00 info: Loading previous flows ...
2021-05-27 15:33:00 info: Adding br0 if it doesn't exist ...
2021-05-27 15:33:00 info: Created br0, now adding flows ...
+ ovs-ofctl add-tlv-map br0 ''
2021-05-27T15:33:00Z|00001|vconn|WARN|unix:/var/run/openvswitch/br0.mgmt: version negotiation failed (we support version 0x01, peer supports version 0x04)
ovs-ofctl: br0: failed to connect to socket (Broken pipe)
+ ovs-ofctl -O OpenFlow14 add-groups br0 /var/run/openvswitch/ovs-save.WIL41g6jZP/br0.groups.dump --bundle
2021-05-27T15:33:00Z|00001|vconn|WARN|unix:/var/run/openvswitch/br0.mgmt: version negotiation failed (we support version 0x05, peer supports version 0x04)
ovs-ofctl: br0: failed to connect to socket (Broken pipe)
+ ovs-ofctl -O OpenFlow14 replace-flows br0 /var/run/openvswitch/ovs-save.WIL41g6jZP/br0.flows.dump --bundle
2021-05-27T15:33:00Z|00001|vconn|WARN|unix:/var/run/openvswitch/br0.mgmt: version negotiation failed (we support version 0x05, peer supports version 0x04)
ovs-ofctl: br0: failed to connect to socket (Broken pipe)


Version-Release number of selected component (if applicable):


How reproducible:

Upgrade from 4.5 -> 4.6 and inspect OVS logs, you will see:

+ ovs-ofctl -O OpenFlow14 replace-flows br0 /var/run/openvswitch/ovs-save.WIL41g6jZP/br0.flows.dump --bundle
2021-05-27T15:33:00Z|00001|vconn|WARN|unix:/var/run/openvswitch/br0.mgmt: version negotiation failed (we support version 0x05, peer supports version 0x04)

Steps to Reproduce:
1.
2.
3.

Actual results:

Errors similar to:

+ ovs-ofctl -O OpenFlow14 replace-flows br0 /var/run/openvswitch/ovs-save.WIL41g6jZP/br0.flows.dump --bundle
2021-05-27T15:33:00Z|00001|vconn|WARN|unix:/var/run/openvswitch/br0.mgmt: version negotiation failed (we support version 0x05, peer supports version 0x04)

Expected results:

No errors in OVS when restoring flows

Additional info:

Comment 1 Alexander Constantinescu 2021-06-10 13:45:28 UTC
Closing this as CURRENT_RELEASE. This is not an issue on 4.7 since we launch OVS as a systemd service, it's needed however as to get the 4.6 back-port in.