Bug 1014198
Summary: | Allow QoS change on the fly using updateDeviceFlags | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | psebek | |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.5 | CC: | acathrow, cpelland, dallan, danken, dyuan, gsun, honzhang, jiahu, jsvarova, lpeer, mjenner, mprivozn, tlavigne | |
Target Milestone: | rc | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
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.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1014200 (view as bug list) | Environment: | ||
Last Closed: | 2013-11-21 09:12:13 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1002300, 1017195, 1017198 |
Description
psebek
2013-10-01 14:02:31 UTC
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2013-October/msg00024.html Moving to POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2013-October/msg00043.html 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? 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 ~]# (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. According to comment 10 and 11, changed to verified. 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 |