[QoS] QoS policy doesn't restrict traffic on SR-IOV port

Bug #1563820 reported by Sergii
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Sergey Kolekonov
Mitaka
Fix Released
High
Sergey Kolekonov
Newton
Fix Committed
High
Sergey Kolekonov

Bug Description

Detailed bug description:

After adding qos policy for vm's SR-IOV port, traffic are not restricted

Steps to reproduce:
1) neutron net-create --provider:physical_network physnet2 --provider:network_type vlan net01
2) neutron subnet-create net01 192.168.112.0/24 --name subnet01
3) neutron router-interface-add 'router_id' subnet01
4) neutron port-create net01 --binding:vnic-type direct --device_owner nova-compute --name sriov_1
5) neutron port-create net01 --binding:vnic-type direct --device_owner nova-compute --name sriov_2
5) nova boot --flavor m1.small --image tk --nic port-id='port_id_1' qossriov_1 --key-name 'key_name'
6) nova boot --flavor m1.small --image tk --nic port-id='port_id_2' qossriov_2 --key-name 'key_name'
7) neutron qos-policy-create sriov
8) neutron qos-bandwidth-limit-rule-create sriov --max-kbps 8000
9) neutron port-update 'port_id_1' --qos-policy sriov
10) on VM qossriov_2 start iperf3 as a server:
 iperf3 -s
11) on VM qossriov_1 start iperf3 as a client:
 iperf3 -c 'ip_qossriov_2'
12) Look at the traffic on VM qossriov_1

Expected result:
 Traffic should be restricted by 8Mbps

Actual result:
 there are no restriction/
 ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 16.3 GBytes 14.0 Gbits/sec 0 sender
[ 4] 0.00-10.00 sec 16.3 GBytes 14.0 Gbits/sec receiver

Description of the environment:

fuel_build_id | 113 |

fuel_build_number | 113 |

fuel_release | 9.0 |

fuel_openstack_version | liberty-9.0 |

Changed in mos:
importance: Undecided → High
assignee: nobody → MOS Neutron (mos-neutron)
milestone: none → 9.0
Changed in mos:
status: New → Confirmed
Changed in mos:
assignee: MOS Neutron (mos-neutron) → Elena Ezhova (eezhova)
Revision history for this message
Elena Ezhova (eezhova) wrote :

This bug cannot be reproduced on stable/mitaka deployed by DevStack. Rate limiters are correctly applied to VFs:

elena@cz7833:~/devstack$ neutron qos-bandwidth-limit-rule-show 3d42f456-f21b-4a0a-9c2b-b1666ad603ca bw-limiter
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| id | 3d42f456-f21b-4a0a-9c2b-b1666ad603ca |
| max_burst_kbps | 0 |
| max_kbps | 170000 |
+----------------+--------------------------------------+

elena@cz7833:~/devstack$ ip l | less
....
5: p514p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 0c:c4:7a:bd:42:ad brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
   ...
    vf 6 MAC fa:16:3e:95:f6:ac, vlan 2010, tx rate 170 (Mbps), spoof checking on, link-state enable
...

Meanwhile, it has to be mentioned that max_rate wouldn't get applied to a VF if it's lower than the minimum rate supported by the NIC. For example, the XL710 static rate limiters can be configured to the minimal rate limit of 50Mb/s with a granularity of
50Mb/s.

This *might* be a configuration issue, addition repro is needed. Setting this to Incomplete for now.

Changed in mos:
status: Confirmed → Incomplete
Elena Ezhova (eezhova)
Changed in mos:
assignee: Elena Ezhova (eezhova) → Sergii (sgudz)
Revision history for this message
Elena Ezhova (eezhova) wrote :

Reproduced on:
[root@fuel ~]# shotgun2 short-report
cat /etc/fuel_build_id:
 155
cat /etc/fuel_build_number:
 155
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0
rpm -qa | egrep 'fuel|astute|network-checker|nailgun|packetary|shotgun':
 fuel-misc-9.0.0-1.mos8259.noarch
 python-fuelclient-9.0.0-1.mos301.noarch
 fuel-9.0.0-1.mos6325.noarch
 fuel-provisioning-scripts-9.0.0-1.mos8611.noarch
 fuelmenu-9.0.0-1.mos263.noarch
 fuel-ui-9.0.0-1.mos2641.noarch
 fuel-migrate-9.0.0-1.mos8259.noarch
 fuel-ostf-9.0.0-1.mos921.noarch
 shotgun-9.0.0-1.mos87.noarch
 python-packetary-9.0.0-1.mos130.noarch
 fuel-bootstrap-cli-9.0.0-1.mos272.noarch
 fuel-nailgun-9.0.0-1.mos8611.noarch
 fuel-setup-9.0.0-1.mos6325.noarch
 rubygem-astute-9.0.0-1.mos733.noarch
 fuel-mirror-9.0.0-1.mos130.noarch
 fuel-openstack-metadata-9.0.0-1.mos8611.noarch
 fuel-notify-9.0.0-1.mos8259.noarch
 fuel-release-9.0.0-1.mos6325.noarch
 nailgun-mcagents-9.0.0-1.mos733.noarch
 network-checker-9.0.0-1.mos72.x86_64
 fuel-utils-9.0.0-1.mos8259.noarch
 fuel-library9.0-9.0.0-1.mos8259.noarch
 fuel-agent-9.0.0-1.mos272.noarch

qos extension wasn't added to extensions list in sriov_agent.ini and due to that qos code wasn't invoked.

Modifying the [agent] section of sriov_agent.ini in the following way fixed the problem.
[agent]

#
# From neutron.ml2.sriov.agent
#

# Extensions list to use (list value)
extensions = qos

Changed in mos:
status: Incomplete → Confirmed
assignee: Sergii (sgudz) → Sergey Kolekonov (skolekonov)
affects: mos → fuel
Changed in fuel:
milestone: 9.0 → none
status: Confirmed → In Progress
Changed in fuel:
milestone: none → 9.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/304816
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=f687e913e6476ed85c34cd89e24dadd22e3ba3b6
Submitter: Jenkins
Branch: master

commit f687e913e6476ed85c34cd89e24dadd22e3ba3b6
Author: Sergey Kolekonov <email address hidden>
Date: Tue Apr 12 21:50:02 2016 +0300

    Pass extensions to Neutron SRIOV agent

    In order to use QoS for SR-IOV ports qos extension should be enabled for
    sriov agent

    Change-Id: Ice9fcfe8d6ed81ba2ae8e0cb6963f20ded5f8758
    Closes-bug: #1563820

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/307087

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/mitaka)

Reviewed: https://review.openstack.org/307087
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=4ab01eb90140c1a47dacc2c5c04adad1c8da3b94
Submitter: Jenkins
Branch: stable/mitaka

commit 4ab01eb90140c1a47dacc2c5c04adad1c8da3b94
Author: Sergey Kolekonov <email address hidden>
Date: Tue Apr 12 21:50:02 2016 +0300

    Pass extensions to Neutron SRIOV agent

    In order to use QoS for SR-IOV ports qos extension should be enabled for
    sriov agent

    Change-Id: Ice9fcfe8d6ed81ba2ae8e0cb6963f20ded5f8758
    Closes-bug: #1563820
    (cherry picked from commit f687e913e6476ed85c34cd89e24dadd22e3ba3b6)

Revision history for this message
Sergii (sgudz) wrote :

Veryfied on MOS9.0 build 232. Fixed

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.