Red Hat Bugzilla – Bug 1128097
Can't use domiftune --inbound 0 or --outbound 0 to clear inbound or outbound settings for a shut off guest
Last modified: 2015-03-05 02:42:09 EST
Description of problem: Can't use domiftune --inbound 0 or --outbound 0 to clear inbound or outbound settings for a shut off guest Version-Release number of selected component (if applicable): libvirt-1.2.7-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.prepare a shut of guest with a interface # virsh dumpxml test6 <interface type='network'> <mac address='52:54:00:af:3a:9f'/> <source network='default'/> <target dev='lhuang1'/> <model type='rtl8139'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> 2.# virsh domiftune test6 lhuang1 inbound.average: 0 inbound.peak : 0 inbound.burst : 0 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 3.# virsh domiftune test6 lhuang1 124,546,346 4.# virsh domiftune test6 lhuang1 inbound.average: 124 inbound.peak : 546 inbound.burst : 346 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 5.# virsh domiftune test6 lhuang1 0 6.# virsh domiftune test6 lhuang1 inbound.average: 124 inbound.peak : 546 inbound.burst : 346 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 Actual results: Can't clear inbound and outbound settings when guest is shut off. Expected results: Can clear success Additional info: From manual: To clear inbound or outbound settings, use --inbound or --outbound respectfully with average value of zero.
There is a upstream patch I made, maybe it can fix the bug as expected. http://www.redhat.com/archives/libvir-list/2014-August/msg00372.html
Patch has been merged upstream: commit 337c6eec1b15ac409aaaaa5a93f493a0bfbb95d5 Author: Jianwei Hu <jiahu@redhat.com> AuthorDate: Mon Aug 11 14:41:33 2014 +0800 Commit: Michal Privoznik <mprivozn@redhat.com> CommitDate: Mon Aug 11 11:56:58 2014 +0200 qemu: Actually clear bandwidth settings The virDomainSetInterfaceParameters implementation in qemu over VIR_DOMAIN_AFFECT_CONFIG doesn't work as expected. When trying to clear out the bandwidth settings for an interface, it has no actual effect: virsh # domiftune --config $domain $interface inbound.average: 100 inbound.peak : 0 inbound.burst : 0 outbound.average: 10 outbound.peak : 0 outbound.burst : 0 virsh domiftune --config $domain $interface 0 0 virsh # domiftune --config $domain $interface inbound.average: 100 inbound.peak : 0 inbound.burst : 0 outbound.average: 10 outbound.peak : 0 outbound.burst : 0 But according to virsh man page: To clear inbound or outbound settings, use --inbound or --outbound respectfully with average value of zero. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> v1.2.7-36-g337c6ee
I could reproduce this issue with build libvirt-1.2.7-1.el7.x86_64 as bug steps mentioned. Verified this issue with build libvirt-1.2.8-1.el7.x86_64: Steps: 1.prepare a shut of guest with a interface # virsh dumpxml r6 <interface type='network'> <mac address='52:54:00:af:3a:aa'/> <source network='default'/> <target dev='test'/> <model type='rtl8139'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> 2.# virsh domiftune r6 test inbound.average: 0 inbound.peak : 0 inbound.burst : 0 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 3.# virsh domiftune r6 test 123,456,789 4.# virsh domiftune r6 test inbound.average: 123 inbound.peak : 456 inbound.burst : 789 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 5.# virsh domiftune r6 test 0 6.# virsh domiftune r6 test inbound.average: 0 inbound.peak : 0 inbound.burst : 0 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 For outbound, also could be cleared by setting as 0. I always tried above steps for running guest, they are also worked.
I can produce this bug on build qemu-kvm-rhev-2.1.0-1.el7.x86_64 libvirt-1.2.7-1.el7.x86_64 verify it on build libvirt-1.2.8-9.el7.x86_64 qemu-kvm-rhev-2.1.2-14.el7.x86_64 3.10.0-208.el7.x86_64 verify steps 1. prepare a guest in shutoff with a interface # virsh dumpxml rhel7new ... <interface type='network'> <mac address='52:54:00:af:3a:9f'/> <source network='default'/> <bandwidth> <inbound average='12' peak='34' burst='56'/> </bandwidth> <target dev='test'/> <model type='rtl8139'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> ... # virsh domiflist rhel7new Interface Type Source Model MAC ------------------------------------------------------- - network default rtl8139 52:54:00:c2:c6:e4 test network default rtl8139 52:54:00:af:3a:9f 2. check domiftune for this interface # virsh domiftune rhel7new test inbound.average: 0 inbound.peak : 0 inbound.burst : 0 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 3. set for this interface with valid value # virsh domiftune rhel7new test --inbound 19,34,58 --outbound 89,34,56 # virsh domiftune rhel7new test inbound.average: 19 inbound.peak : 34 inbound.burst : 58 outbound.average: 89 outbound.peak : 34 outbound.burst : 56 4. clear this setting, it works [root@server ~]# virsh domiftune rhel7new test --outbound 0 [root@server ~]# virsh domiftune rhel7new test inbound.average: 19 inbound.peak : 34 inbound.burst : 58 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 [root@server ~]# virsh domiftune rhel7new test --inbound 0 [root@server ~]# virsh domiftune rhel7new test inbound.average: 0 inbound.peak : 0 inbound.burst : 0 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 it works well for running guest move 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. https://rhn.redhat.com/errata/RHSA-2015-0323.html