Bug 1278136

Summary: ovs-ofctl - version negotiation failed
Product: Red Hat Enterprise Linux 7 Reporter: Evgheni Dereveanchin <ederevea>
Component: openvswitch-dpdkAssignee: Thadeu Lima de Souza Cascardo <cascardo>
Status: CLOSED NOTABUG QA Contact: Jean-Tsung Hsiao <jhsiao>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: kzhang, rkhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-01 16:36:43 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: 1301628    

Description Evgheni Dereveanchin 2015-11-04 17:52:01 UTC
Description of problem:
OVS is used in OpenShift v3 with OpenFlow 1.3, however ovs-vsctl cannot negotiate capabilities for this protocol version. It must be specified explicitly which makes troubleshooting harder. Since supported versions are presented by OVS, the utility should automatically detect the proper protocol and use it. At the moment for some reason it reports supporting just version 1.0 (0x01) during negotiation.

Version-Release number of selected component (if applicable):
openvswitch-2.3.1-2.git20150113.el7.x86_64
kernel-3.10.0-229.20.1.el7.x86_64
openshift-sdn-ovs-3.0.2.0-0.git.20.656dc3e.el7ose.x86_64

How reproducible:
always

Steps to Reproduce:
1. set OpenFlow protocol to 1.3 on bridge br0 (done during boot in OpenShift)
# ovs-vsctl set bridge br0 protocols=OpenFlow13
2. try to dump flows
# ovs-ofctl dump-flows br0

Actual results:
2015-11-04T17:45:56Z|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)

Expected results:
OFPST_FLOW reply (OF1.3) (xid=0x2):
 cookie=0x0, duration=1299.155s, table=0, n_packets=0, n_bytes=0, dl_src=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
 ...

Additional info:
this currently works when specifying the version

# ovs-ofctl dump-flows br0 --protocols=OpenFlow13

Comment 2 Thadeu Lima de Souza Cascardo 2016-02-01 16:36:43 UTC
ovs-ofctl allows you to set many protocols on the command line, like --protocols=OpenFlow10,OpenFlow13.

That will work for bridges that only support OpenFlow13.

The problem with using any version by default is that mod-flow has different semantics depending on the version. So, instead of behaving differently whenever you use ovs-ofctl mod-flow, the tool defaults to OpenFlow10 only.

Why not use an alias like ovs-ofctl13='ovs-ofctl --protocols=OpenFlow13'?

Cascardo.