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 1014198 - Allow QoS change on the fly using updateDeviceFlags
Summary: Allow QoS change on the fly using updateDeviceFlags
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1002300 1017195 1017198
TreeView+ depends on / blocked
 
Reported: 2013-10-01 14:02 UTC by psebek
Modified: 2013-11-27 03:57 UTC (History)
13 users (show)

Fixed In Version: libvirt-0.10.2-29.el6
Doc Type: Enhancement
Doc Text:
Previously, the virDomainDeviceUpdateFlags() function in libvirt allowed users to update some configuration quirks on a domain device while the domain is still running. Consequently, when updating NIC (Network Interface Controller), the QoS could not be changed because of a missing implementation. With this update, the missing implementation has been added, and QoS can now be updated on a NIC.
Clone Of:
: 1014200 (view as bug list)
Environment:
Last Closed: 2013-11-21 09:12:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1581 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2013-11-21 01:11:35 UTC

Description psebek 2013-10-01 14:02:31 UTC
Description of problem:
Using updateDeviceFlags to change nic with set QoS parameters causes "error: this function is not supported by the connection driver: unable to change config on 'bridge' network type"

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. set guest domain with nic, running
2. run update-device with settings containing QoS
# virsh update-device <domain> settings_example.xml
# cat settings_example.xml:
<interface type='bridge'>
    <mac address='00:1a:4a:31:ab:2b'/>
    <source bridge='testnetwork'/>
    <target dev='vnet1'/>
    <model type='virtio'/>
    <filterref filter='vdsm-no-mac-spoofing'/>
    <link state='up'/>
    <bandwidth>
        <inbound average='25600' peak='51200' burst='204800'/>
        <outbound average='12800' peak='25600' burst='10240'/>
    </bandwidth>
    <alias name='net1'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

Actual results:
error:this function is not supported by the connection driver: unable to change config on 'bridge' network type

Expected results:
nic is updated properly

Additional info:

Comment 3 Michal Privoznik 2013-10-01 14:46:42 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-October/msg00024.html

Comment 7 Dan Kenigsberg 2013-10-08 10:09:49 UTC
Thanks for getting this into rhel-6.5. May we have it in rhel-6.4.z, too, so that ovirt-3.3.1 can enjoy it as well?

Comment 10 Hu Jianwei 2013-10-11 08:44:54 UTC
I can reproduce it with libvirt-0.10.2-28.el6, can not reproduce it with libvirt-0.10.2-29.el6.x86_64.

Verifying steps:
A. Function testing(testing results are same on 'network' and 'bridge' network type.)
1. Check domain status and interface element.
[root@test777 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 7     rhel6                          running

[root@test777 ~]# virsh dumpxml rhel6 | grep interface -A8
    <interface type='network'>
      <mac address='52:54:00:ff:a9:b6'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...

2. Add bandwidth to nic.xml
[root@test777 ~]# cat nic.xml 
<interface type='network'>
<mac address='52:54:00:ff:a9:b6'/>
<source network='default'/>
<model type='virtio'/>
<bandwidth>
<inbound average='1000' peak='5000' burst='1024'/>
<outbound average='128' peak='256' burst='256'/>
</bandwidth>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

3. Update interface of domian using update-device cmd.
[root@test777 ~]# virsh update-device rhel6 nic.xml 
Device updated successfully

4. Check the bandwidth part in domain xml.
[root@test777 ~]# virsh dumpxml rhel6 | grep interface -A10
...
      <model type='virtio'/>
      <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>
...

5. Update existing <bandwidth> using update-device
[root@test777 ~]# virsh update-device rhel6 nic.xml 
Device updated successfully

[root@test777 ~]# vim nic.xml 
[root@test777 ~]# virsh dumpxml rhel6 | grep interface -A10
...
      <model type='virtio'/>
      <bandwidth>
        <inbound average='1000' peak='5000' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
...

[root@test777 ~]# cat nic.xml 
<interface type='network'>
<mac address='52:54:00:ff:a9:b6'/>
<source network='default'/>
<model type='virtio'/>
<bandwidth>
<outbound average='128' peak='256' burst='256'/>
</bandwidth>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
[root@test777 ~]# 

[root@test777 ~]# virsh update-device rhel6 nic.xml 
Device updated successfully

[root@test777 ~]# virsh dumpxml rhel6 | grep interface -A10
...
      <model type='virtio'/>
      <bandwidth>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...
[root@test777 ~]#

B. Negative testing
1. [root@test777 ~]# cat nic.xml 
<interface type='network'>
<mac address='52:54:00:ff:a9:b6'/>
<source network='default'/>
<model type='virtio'/>
<bandwidth>
<inbound average='-1' peak='5000' burst='1024'/>
</bandwidth>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

[root@test777 ~]# virsh update-device rhel6 nic.xml 
error: Failed to update device from nic.xml
error: internal error cannot set bandwidth limits on vnet0

[root@test777 ~]# virsh dumpxml rhel6 | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:ff:a9:b6'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...

2. huge values:
[root@test777 ~]# vim nic.xml 
[root@test777 ~]# virsh update-device rhel6 nic.xml 
error: Failed to update device from nic.xml
error: unsupported configuration: could not convert 100000000000000000000

[root@test777 ~]# vim nic.xml 
[root@test777 ~]# virsh update-device rhel6 nic.xml 
error: Failed to update device from nic.xml
error: internal error cannot set bandwidth limits on vnet0

3. remove mandatory attribute average
[root@test777 ~]# cat nic.xml 
<interface type='network'>
<mac address='52:54:00:ff:a9:b6'/>
<source network='default'/>
<model type='virtio'/>
<bandwidth>
<inbound  peak='5000' burst='1024'/>
<outbound average='128' peak='256' burst='256'/>
</bandwidth>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
[root@test777 ~]# virsh update-device rhel6 nic.xml 
error: Failed to update device from nic.xml
error: Missing mandatory average attribute


During testing, I found libvirt ignore invalid <bandwidth> elements but report successfully. I think libvirt should have a precision response.
1. Add invalid element in <bandwidth> in nic.xml
[root@test777 ~]# cat nic.xml 
<interface type='network'>
<mac address='52:54:00:ff:a9:b6'/>
<source network='default'/>
<model type='virtio'/>
<bandwidth>
<inbdsdfsound average='1000' peak='5000' burst='1024'/>   <====== wrong element name.
</bandwidth>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

2. Add it to domain using update-device
[root@test777 ~]# virsh update-device rhel6 nic.xml 
Device updated successfully

3.Check the <bandwidth> field. The wrong rule did not add to domain xml, just added an empty <bandwidth>.
[root@test777 ~]# virsh dumpxml rhel6 | grep interface -A10
    <interface type='network'>
      <mac address='52:54:00:ff:a9:b6'/>
      <source network='default'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <bandwidth>
      </bandwidth>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
... 
[root@test777 ~]#

Comment 11 Michal Privoznik 2013-10-11 10:30:51 UTC
(In reply to Hu Jianwei from comment #10)
> [...]
> During testing, I found libvirt ignore invalid <bandwidth> elements but
> report successfully. I think libvirt should have a precision response.
> 1. Add invalid element in <bandwidth> in nic.xml
> [root@test777 ~]# cat nic.xml 
> <interface type='network'>
> <mac address='52:54:00:ff:a9:b6'/>
> <source network='default'/>
> <model type='virtio'/>
> <bandwidth>
> <inbdsdfsound average='1000' peak='5000' burst='1024'/>   <====== wrong
> element name.
> </bandwidth>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
> </interface>
> 
> 2. Add it to domain using update-device
> [root@test777 ~]# virsh update-device rhel6 nic.xml 
> Device updated successfully
> 
> 3.Check the <bandwidth> field. The wrong rule did not add to domain xml,
> just added an empty <bandwidth>.
> [root@test777 ~]# virsh dumpxml rhel6 | grep interface -A10
>     <interface type='network'>
>       <mac address='52:54:00:ff:a9:b6'/>
>       <source network='default'/>
>       <target dev='vnet0'/>
>       <model type='virtio'/>
>       <bandwidth>
>       </bandwidth>
>       <alias name='net0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
> ... 
> [root@test777 ~]#

I don't think this is a bug. Libvirt deliberately takes from XML only those elements which it can handle. This is there to provide forward compatibility - a newer libvirt can generate XML for older libvirt.

Although, you've experienced one 'bug' - see the empty <bandwidth/>. I am not sure if it's worth respawning a new package though.

Comment 12 Hu Jianwei 2013-10-12 01:32:18 UTC
According to comment 10 and 11, changed to verified.

Comment 14 errata-xmlrpc 2013-11-21 09:12:13 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.

http://rhn.redhat.com/errata/RHBA-2013-1581.html


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