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 1454709 - delete the Qos settings for the interface on the fly makes no changes
Summary: delete the Qos settings for the interface on the fly makes no changes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
: 1516686 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-23 11:27 UTC by yalzhang@redhat.com
Modified: 2018-10-30 09:52 UTC (History)
3 users (show)

Fixed In Version: libvirt-4.3.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:49:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 0 None None None 2018-10-30 09:52:27 UTC

Description yalzhang@redhat.com 2017-05-23 11:27:58 UTC
Description of problem:
Delete the Qos settings for the interface on the fly makes no changes, as the traffic control rules still exists.

Version-Release number of selected component (if applicable):
libvirt-3.2.0-5.el7.x86_64
qemu-kvm-rhev-2.9.0-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. bandwidth set in interface
# virsh dumpxml rhel7 | grep /interface -B11
    <interface type='network'>
      <mac address='52:54:00:1e:42:96'/>
      <source network='default' bridge='virbr0'/>
      <bandwidth>
        <inbound average='1000' peak='5000' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

# virsh net-dumpxml default
<network connections='1'>
  <name>default</name>
  <uuid>ec95afa8-2529-4e3f-b98c-82cfde363cfd</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:82:0b:86'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.100'/>
    </dhcp>
  </ip>
</network>

2. 
#  tc class show dev vnet0
class htb 1:1 root leaf 2: prio 0 rate 8000Kbit ceil 40000Kbit burst 1Mb cburst 1600b

#  tc filter show dev vnet0 parent ffff:
filter protocol all pref 49152 u32
filter protocol all pref 49152 u32 fh 800: ht divisor 1
filter protocol all pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1
  match 00000000/00000000 at 0
 police 0xf rate 1024Kbit burst 256Kb mtu 64Kb action drop overhead 0b
ref 1 bind 1

3. delete the Qos settings by update-device, the command succeed.
# cat nobound.xml
  <interface type='network'>
      <mac address='52:54:00:1e:42:96'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

# virsh update-device rhel7 nobound.xml
Device updated successfully

# virsh dumpxml rhel7 | grep /interface -B7
    <interface type='network'>
      <mac address='52:54:00:1e:42:96'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

4. Even the command succeed, the rules still exists, and the bandwidth limitation still works.
#  tc filter show dev vnet0 parent ffff:
filter protocol all pref 49152 u32
filter protocol all pref 49152 u32 fh 800: ht divisor 1
filter protocol all pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1
  match 00000000/00000000 at 0
 police 0xf rate 1024Kbit burst 256Kb mtu 64Kb action drop overhead 0b
ref 1 bind 1

#  tc class show dev vnet0
class htb 1:1 root leaf 2: prio 0 rate 8000Kbit ceil 40000Kbit burst 1Mb cburst 1600b

Actual results:
in step 4, all the rules still exists.

Expected results:
in step 4, all the rules should be deleted as there are no traffic control.

Additional info:
When there is no Qos settings for the interface, add Qos settings by update-device works.

Comment 2 yalzhang@redhat.com 2017-11-27 02:55:35 UTC
*** Bug 1516686 has been marked as a duplicate of this bug. ***

Comment 3 Laine Stump 2017-12-13 19:25:12 UTC
Fix posted upstream:

https://www.redhat.com/archives/libvir-list/2017-December/msg00481.html

Comment 4 Laine Stump 2017-12-14 19:44:33 UTC
Pushed upstream (will be in 4.0.0):

commit b21163bd119446dcbadab7523b1dc8dab487a571
Author: Laine Stump <laine>
Date:   Mon Dec 11 14:26:54 2017 -0500

    qemu: delete exist [sic] bandwidth restrictions when they are removed from config

Comment 6 yalzhang@redhat.com 2018-05-30 02:34:42 UTC
test on libvirt-4.3.0-1.el7.x86_64, the result is as expected, set this bug to be verified.

1. Prepare a running vm with network type interface defined with bandwidth just like comment 0, and check by tc, the rules exists;
2. Copy the interface section to a file, and delete the bandwidth section;
3. Do update-device with the xml in step2 to delete the Qos setting;
4. Check by tc, the rules are deleted as well.

And test below scenarios:
Delete the inbound and outbound one by one --> PASS
After delete the Qos setting, restart libvirtd ----> PASS
Test for direct type interface ---> PASS
Delete the Qos setting by domiftune ---> PASS
Add the Qos setting by domiftune ---> PASS
Add the Qos setting by update-device ---> PASS

Details:
1. # virsh dumpxml rhel | grep /interface -B12
<interface type='network'>
      <mac address='52:54:00:ab:8c:39'/>
      <source network='default' bridge='virbr0'/>
      <bandwidth>
        <inbound average='500' peak='600' burst='128'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
#  tc class show dev vnet0
class htb 1:1 root leaf 2: prio 0 rate 4Mbit ceil 4800Kbit burst 128Kb cburst 1599b 
# tc filter show dev vnet0 parent ffff: 
filter protocol all pref 49152 u32 
filter protocol all pref 49152 u32 fh 800: ht divisor 1 
filter protocol all pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw 
  match 00000000/00000000 at 0
 police 0x2 rate 1024Kbit burst 256Kb mtu 64Kb action drop overhead 0b 
	ref 1 bind 1

2. # cat  inter.xml
<interface type='network'>
      <mac address='52:54:00:ab:8c:39'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

3. # virsh update-device rhel inter.xml
Device updated successfully

4. # virsh dumpxml rhel | grep /interface -B12  
====> no bandwidth setting
# tc filter show dev vnet0 parent ffff:
#
#  tc class show dev vnet0
#

Comment 8 errata-xmlrpc 2018-10-30 09:49:58 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/RHSA-2018:3113


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