RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1628905 - systemctl reload openvswitch includes default flow.
Summary: systemctl reload openvswitch includes default flow.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openvswitch2.10
Version: 7.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Timothy Redaelli
QA Contact: Rick Alongi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-14 10:07 UTC by Timothy Redaelli
Modified: 2020-01-14 22:23 UTC (History)
9 users (show)

Fixed In Version: openvswitch2.10-2.10.0-5.el7fdp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1626096
Environment:
Last Closed: 2018-09-20 20:13:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:2735 0 None None None 2018-09-20 20:14:18 UTC

Description Timothy Redaelli 2018-09-14 10:07:38 UTC
+++ This bug was initially created as a clone of Bug #1626096 +++

Description of problem:
The flows should be restored when issuing a service reload, however the default flow is not removed when it starts and becomes part of the final flow table.

// installed version
# rpm -q openvswitch
openvswitch-2.9.0-56.el7fdp.x86_64

// adding an example of flow table
# ovs-ofctl del-flows ovsbr0 
# ovs-ofctl add-flow ovsbr0 'in_port=10 actions=output:20'
# ovs-ofctl add-flow ovsbr0 'in_port=20 actions=output:10'
# ovs-ofctl add-flow ovsbr0 'actions=drop'

// Dumping the flows
# ovs-ofctl dump-flows ovsbr0 
 cookie=0x0, duration=24.416s, table=0, n_packets=0, n_bytes=0, in_port=veth1 actions=output:veth2
 cookie=0x0, duration=18.466s, table=0, n_packets=0, n_bytes=0, in_port=veth2 actions=output:veth1
 cookie=0x0, duration=7.818s, table=0, n_packets=0, n_bytes=0, actions=drop

// Reload the service
# systemctl reload openvswitch 

// Dump the flow table again to check
[root@localhost ~]# ovs-ofctl dump-flows ovsbr0 
 cookie=0x0, duration=3.136s, table=0, n_packets=0, n_bytes=0, in_port=veth1 actions=output:veth2
 cookie=0x0, duration=3.136s, table=0, n_packets=0, n_bytes=0, in_port=veth2 actions=output:veth1
 cookie=0x0, duration=3.151s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL
 cookie=0x0, duration=3.136s, table=0, n_packets=0, n_bytes=0, actions=drop


Notice the default 'actions=NORMAL' is added to the flow table.

Expected results:
The flow table is restored as it was before the reloading the service.

--- Additional comment from Timothy Redaelli on 2018-09-10 16:21:12 CEST ---

Patch sent on OVS mailing list: https://mail.openvswitch.org/pipermail/ovs-dev/2018-September/351970.html

Comment 4 Rick Alongi 2018-09-14 17:19:47 UTC
Reproduced issue:

[root@netqe11 yum.repos.d]# rpm -q openvswitch
openvswitch-2.9.0-56.el7fdp.x86_64

systemctl start openvswitch

# add bridge and flows

ovs-vsctl --if-exists del-br obrbr0
ovs-vsctl add-br ovsbr0

ovs-ofctl del-flows ovsbr0 
ovs-ofctl add-flow ovsbr0 'in_port=10 actions=output:20'
ovs-ofctl add-flow ovsbr0 'in_port=20 actions=output:10'
ovs-ofctl add-flow ovsbr0 'actions=drop'

ovs-ofctl dump-flows ovsbr0

[root@netqe11 yum.repos.d]# ovs-ofctl dump-flows ovsbr0
 cookie=0x0, duration=28.241s, table=0, n_packets=0, n_bytes=0, in_port=10 actions=output:20
 cookie=0x0, duration=28.238s, table=0, n_packets=0, n_bytes=0, in_port=20 actions=output:10
 cookie=0x0, duration=28.235s, table=0, n_packets=0, n_bytes=0, actions=drop
 
 systemctl reload openvswitch
 
 # observe issue where NORMAL flow rule is added after systemctl reload openvswitch
 
 [root@netqe11 yum.repos.d]# ovs-ofctl dump-flows ovsbr0
 cookie=0x0, duration=5.715s, table=0, n_packets=0, n_bytes=0, in_port=10 actions=output:20
 cookie=0x0, duration=5.715s, table=0, n_packets=0, n_bytes=0, in_port=20 actions=output:10
 cookie=0x0, duration=5.731s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL
 cookie=0x0, duration=5.715s, table=0, n_packets=0, n_bytes=0, actions=drop

# Upgrade to OVS 2.10 with fix

[root@netqe11 yum.repos.d]# rpm -q openvswitch2.10
openvswitch2.10-2.10.0-5.el7fdp.x86_64

systemctl start openvswitch

# Add flows

ovs-vsctl --if-exists del-br obrbr0
ovs-vsctl add-br ovsbr0

ovs-ofctl del-flows ovsbr0 
ovs-ofctl add-flow ovsbr0 'in_port=10 actions=output:20'
ovs-ofctl add-flow ovsbr0 'in_port=20 actions=output:10'
ovs-ofctl add-flow ovsbr0 'actions=drop'

[root@netqe11 yum.repos.d]# ovs-ofctl dump-flows ovsbr0
 cookie=0x0, duration=8.554s, table=0, n_packets=0, n_bytes=0, in_port=10 actions=output:20
 cookie=0x0, duration=8.548s, table=0, n_packets=0, n_bytes=0, in_port=20 actions=output:10
 cookie=0x0, duration=8.541s, table=0, n_packets=0, n_bytes=0, actions=drop
 
 [root@netqe11 yum.repos.d]# systemctl reload openvswitch
 
 # NORMAL flow rule is no longer added after systemctl reload openvswitch
 
 [root@netqe11 yum.repos.d]# ovs-ofctl dump-flows ovsbr0
 cookie=0x0, duration=8.366s, table=0, n_packets=0, n_bytes=0, in_port=10 actions=output:20
 cookie=0x0, duration=8.366s, table=0, n_packets=0, n_bytes=0, in_port=20 actions=output:10
 cookie=0x0, duration=8.366s, table=0, n_packets=0, n_bytes=0, actions=drop
 
 Marking as Verified.

Comment 6 errata-xmlrpc 2018-09-20 20:13:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:2735


Note You need to log in before you can comment on or make changes to this bug.