Bug 2041859 - Failed to limit traffic to VM with ovs firewall qos
Summary: Failed to limit traffic to VM with ovs firewall qos
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z3
: 16.2 (Train on RHEL 8.4)
Assignee: Slawek Kaplonski
QA Contact: Eran Kuris
URL:
Whiteboard:
: 2143487 (view as bug list)
Depends On: 2138339
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-18 11:59 UTC by Alex Katz
Modified: 2023-07-24 09:36 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-24 09:36:56 UTC
Target Upstream Version:
Embargoed:
skaplons: needinfo-


Attachments (Terms of Use)
openflow rules (13.61 KB, text/plain)
2022-01-18 12:46 UTC, Alex Katz
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1959567 0 None None None 2022-02-01 11:53:46 UTC
Red Hat Issue Tracker OSP-12185 0 None None None 2022-01-18 12:05:41 UTC

Description Alex Katz 2022-01-18 11:59:28 UTC
Description of problem:
Inbound traffic (from some external node to the VM) is not limited. Iperf shows that the throughput is identical with and without QoS is applied to the port. 
The configuration looks correct.

# ovs-vsctl show
     Bridge br-int
...
        Port tap78734793-0c
            tag: 86
            Interface tap78734793-0c
...
 
 
# ovs-vsctl list Port
...
_uuid               : c03625d5-6382-4829-bfd5-b5ed8e874273
bond_active_slave   : []
bond_downdelay      : 0
bond_fake_iface     : false
bond_mode           : []
bond_updelay        : 0
cvlans              : []
external_ids        : {}
fake_bridge         : false
interfaces          : [45cbb7e8-3b3d-46eb-8697-ee523bf28745]
lacp                : []
mac                 : []
name                : tap78734793-0c
other_config        : {net_uuid="f88dc882-1475-4a92-a70c-9310c739b19a", network_type=vxlan, physical_network=None, segmentation_id="3", tag="86"}
protected           : false
qos                 : 080f5c48-5922-440b-92fc-57b29419a2d7
rstp_statistics     : {}
rstp_status         : {}
statistics          : {}
status              : {}
tag                 : 86
trunks              : []
vlan_mode           : []
...
 
 
# ovs-vsctl list Queue
_uuid               : 42ed87c0-faef-49c3-95bf-5d815cc0c9d5
dscp                : []
external_ids        : {id=tap78734793-0c, queue_type="0"}
other_config        : {burst="2400000", max-rate="3000000"}
 
 
# ovs-vsctl list QoS
_uuid               : 080f5c48-5922-440b-92fc-57b29419a2d7
external_ids        : {id=tap78734793-0c}
other_config        : {max-rate="3000000"}
queues              : {0=42ed87c0-faef-49c3-95bf-5d815cc0c9d5}
type                : linux-htb

Version-Release number of selected component (if applicable):
network-scripts-openvswitch2.15-0:2.15.0-38.el8fdp.x86_64
openvswitch-selinux-extra-policy-0:1.0-28.el8fdp.noarch
openvswitch2.15-0:2.15.0-38.el8fdp.x86_64
rhosp-network-scripts-openvswitch-0:2.15-5.el8ost.noarch
rhosp-openvswitch-0:2.15-5.el8ost.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Alex Katz 2022-01-18 12:26:14 UTC
In the description I've provided wrong versions for some packages. Below are the correct ones:

network-scripts-openvswitch2.15-0:2.15.0-38.el8fdp.x86_64                                               
openvswitch-selinux-extra-policy-0:1.0-28.el8fdp.noarch                                                 
openvswitch2.15-0:2.15.0-38.el8fdp.x86_64
rhosp-network-scripts-openvswitch-0:2.15-4.el8ost.1.noarch                                              
rhosp-openvswitch-0:2.15-4.el8ost.1.noarch

Comment 2 Ilya Maximets 2022-01-18 12:40:23 UTC
Is there an OpenFlow rule with the "set_queue:0" action?

As per the documentation, it is required for QoS to work:
  https://docs.openvswitch.org/en/latest/faq/qos/

If there is such rule, do packets actually hit it?

Comment 3 Alex Katz 2022-01-18 12:46:24 UTC
Created attachment 1851559 [details]
openflow rules

There is no such rule in the output of the `ovs-ofctl dump-flows br-int` (please see the attached file). Do you mean that such a rule should be created in addition to the QoS policy and Queue?

Comment 4 Ilya Maximets 2022-01-18 12:56:49 UTC
(In reply to Alex Katz from comment #3)
> Created attachment 1851559 [details]
> openflow rules
> 
> There is no such rule in the output of the `ovs-ofctl dump-flows br-int`
> (please see the attached file). Do you mean that such a rule should be
> created in addition to the QoS policy and Queue?

Yes.  You need to create it.  See the following part in the FAQ:

"""
At this point, bridge br0 is configured with the ports and eth0 is configured
with the queues that you need for QoS, but nothing is actually directing
packets from vif1.0 or vif2.0 to the queues that we have set up for them.
That means that all of the packets to eth0 are going to the “default queue”,
which is not what we want.
"""

If you don't want to modify OpenFlow rules, you may configure ingress
policing for a VM port instead:
  https://docs.openvswitch.org/en/latest/howto/qos/
It's a per-port configuration that doesn't require change of OF rules.

Comment 5 Alex Katz 2022-01-18 13:10:44 UTC
Ingress policing is working in the opposite direction as far as I understand. We have it enabled for the outgoing traffic (from VM to some resource outside) and it actually enforced with no problems.

The issue we are facing here is that we can't limit the traffic towards the VM. Looks like neutron creates the OVS resources (such as QoS policy and Queue) but doesn't set the correct OpenFlow rule.

Comment 6 Ilya Maximets 2022-01-18 14:10:01 UTC
Git it.  DPDK ports with userspace datapath also have support for egress policing,
but kernel datapath does not.  So, the usual OpenFlow QoS seems to be your only
option for this scenario.  Hence, you need to find out why neutron doesn't configure
it correctly.

Comment 7 Alex Katz 2022-01-18 14:14:12 UTC
Thanks for the explanation. I'm moving the bug to openstack-neutron for now.

Comment 18 Slawek Kaplonski 2022-11-17 14:12:31 UTC
*** Bug 2143487 has been marked as a duplicate of this bug. ***


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