Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1064770 - Fail to update floor attribute of QoS using updateDeviceFlags
Fail to update floor attribute of QoS using updateDeviceFlags
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
: Upstream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-13 04:37 EST by hongming
Modified: 2015-03-05 02:30 EST (History)
4 users (show)

See Also:
Fixed In Version: libvirt-1.2.8-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 02:30:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description hongming 2014-02-13 04:37:46 EST
Description of problem:
Fail to remove floor attribute of QoS using updateDeviceFlags

Version-Release number of selected component (if applicable):
libvirt-1.1.1-22.el7.x86_64
kernel-3.10.0-84.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Add floor attribute using updateDeviceFlags

[root@localhost ~]# virsh start r6.4
Domain r6.4 started

[root@localhost ~]# virsh dumpxml r6.4 | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:e7:33:6c'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <bandwidth>
        <inbound average='2000' peak='2000' burst='1024'/>
        <outbound average='2000' peak='2000' burst='1024'/>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
......

[root@localhost ~]# cat nic1.xml
    <interface type='network'>
      <mac address='52:54:00:e7:33:6c'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <bandwidth>
         <inbound average='1000' peak='5000' floor='200' burst='1024'/>
         <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

[root@localhost ~]# virsh update-device r6.4 nic1.xml
Device updated successfully

[root@localhost ~]# virsh dumpxml r6.4 | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:e7:33:6c'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <bandwidth>
        <inbound average='1000' peak='5000' floor='200' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
......

2.Remove floor attribute using updateDeviceFlags

[root@localhost ~]# cat nic.xml
    <interface type='network'>
      <mac address='52:54:00:e7:33:6c'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <bandwidth>
         <inbound average='1000' peak='5000' burst='1024'/>
         <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

[root@localhost ~]# virsh update-device r6.4 nic.xml
Device updated successfully

[root@localhost ~]# virsh dumpxml r6.4 | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:e7:33:6c'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <bandwidth>
        <inbound average='1000' peak='5000' floor='200' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
......


3.

Actual results:
Fail to remove floor attribute of QoS using updateDeviceFlags. Successfully add floor attribute using  updateDeviceFlags.

Expected results:
Successfully remove floor attribute of QoS using updateDeviceFlags

Additional info:
Bug 1014503 - Allow QoS change on the fly using updateDeviceFlags
Comment 2 dyuan 2014-02-17 03:56:20 EST
Set flag to 7.1.0 since it's not a blocker.
Comment 3 hongming 2014-02-24 00:16:31 EST
It is also failed to update the floor attribute of QoS using updateDeviceFlags.

# virsh list
 Id    Name                           State
----------------------------------------------------
 10    r7                             running

# virsh dumpxml r7|grep interface -A9
    <interface type='network'>
      <mac address='52:54:00:78:be:02'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver name='vhost' queues='3'/>
      <bandwidth>
        <inbound average='1000' peak='5000' floor='200' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
--


# tc -d class show dev virbr0
class htb 1:1 root rate 8000Kbit ceil 40000Kbit burst 1600b/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 7 
class htb 1:2 parent 1:1 leaf 2: prio 0 quantum 200000 rate 38400Kbit ceil 40000Kbit burst 1593b/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 0 
class htb 1:3 parent 1:1 leaf 3: prio 0 quantum 20000 rate 1600Kbit ceil 40000Kbit burst 1600b/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 0 


# cat nic.xml 
    <interface type='network'>
      <mac address='52:54:00:78:be:02'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <bandwidth>
        <inbound average='1000' peak='5000' floor='100' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <driver name='vhost' queues='3'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </interface>

# virsh update-device r7 nic.xml
Device updated successfully

# virsh dumpxml r7|grep interface -A9
    <interface type='network'>
      <mac address='52:54:00:78:be:02'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver name='vhost' queues='3'/>
      <bandwidth>
        <inbound average='1000' peak='5000' floor='200' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>

# tc -d class show dev virbr0
class htb 1:1 root rate 8000Kbit ceil 40000Kbit burst 1600b/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 7 
class htb 1:2 parent 1:1 leaf 2: prio 0 quantum 200000 rate 38400Kbit ceil 40000Kbit burst 1593b/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 0 
class htb 1:3 parent 1:1 leaf 3: prio 0 quantum 20000 rate 1600Kbit ceil 40000Kbit burst 1600b/1 mpu 0b overhead 0b cburst 1600b/1 mpu 0b overhead 0b level 0
Comment 5 Martin Kletzander 2014-08-22 05:50:57 EDT
This only happens if the domain is running, not when it is shut off, can you confirm, please?
Comment 6 Martin Kletzander 2014-08-22 06:02:26 EDT
I tried all possible combinations now and it really is a problem with live update of floor attribute only.  Trivial fix coming right up.
Comment 7 Martin Kletzander 2014-08-22 06:36:50 EDT
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2014-August/msg01025.html
Comment 8 Martin Kletzander 2014-08-22 06:44:36 EDT
Fixed upstream by v1.2.7-204-g1b5cff8:

commit 1b5cff867d4d84cf23cc5575afd48e38e8796550
Author:     Martin Kletzander <mkletzan@redhat.com>
AuthorDate: Fri Aug 22 12:02:12 2014 +0200

    util: compare floor attribute in virNetDevBandwidthEqual
Comment 10 lcheng 2014-11-14 06:05:42 EST
Verify it as follows. The result is expected.

Scenario 1. Remove floor attribute

[root@localhost bug1064770]# virsh start a
Domain a started

[root@localhost bug1064770]# virsh dumpxml a | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:bb:25:71'/>
      <source network='default'/>
      <bandwidth>
        <inbound average='2000' peak='2000' floor='100' burst='1024'/>
        <outbound average='2000' peak='2000' burst='1024'/>
      </bandwidth>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...

[root@localhost bug1064770]# cat nic.xml 
    <interface type='network'>
      <mac address='52:54:00:bb:25:71'/>
      <source network='default'/>
      <bandwidth>
        <inbound average='1000' peak='5000' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <target dev='vnet0'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>


[root@localhost bug1064770]# virsh update-device a nic.xml 
Device updated successfully

[root@localhost bug1064770]# virsh dumpxml a | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:bb:25:71'/>
      <source network='default'/>
      <bandwidth>
        <inbound average='1000' peak='5000' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...



Scenario 2. Update floor attribute

[root@localhost bug1064770]# virsh start a
Domain a started

[root@localhost bug1064770]# virsh dumpxml a | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:bb:25:71'/>
      <source network='default'/>
      <class id='3'/>
      <bandwidth>
        <inbound average='2000' peak='2000' floor='300' burst='1024'/>
        <outbound average='2000' peak='2000' burst='1024'/>
      </bandwidth>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
...

[root@localhost bug1064770]# cat nic.xml 
    <interface type='network'>
      <mac address='52:54:00:bb:25:71'/>
      <source network='default'/>
      <bandwidth>
         <inbound average='2000' peak='2000' floor='200' burst='1024'/>
         <outbound average='2000' peak='2000' burst='1024'/>
      </bandwidth>
      <target dev='vnet0'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

[root@localhost bug1064770]# virsh update-device a nic.xml 
Device updated successfully

[root@localhost bug1064770]# virsh dumpxml a | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:bb:25:71'/>
      <source network='default'/>
      <class id='4'/>
      <bandwidth>
        <inbound average='2000' peak='2000' floor='200' burst='1024'/>
        <outbound average='2000' peak='2000' burst='1024'/>
      </bandwidth>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
...
Comment 11 lcheng 2014-11-16 21:10:12 EST
Verified on libvirt-1.2.8-6.el7.x86_64 and qemu-kvm-rhev-2.1.2-8.el7.x86_64.
Comment 12 lcheng 2014-11-17 05:02:36 EST
Verified on libvirt-1.2.8-6.el7.x86_64 and qemu-kvm-1.5.3-79.el7.x86_64. Steps as comment 10. The result is expected too.
Comment 14 errata-xmlrpc 2015-03-05 02:30:19 EST
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://rhn.redhat.com/errata/RHSA-2015-0323.html

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