Bug 1128751 - <driver/> isn't always formated as it should be [NEEDINFO]
Summary: <driver/> isn't always formated as it should be
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Michael Burman
URL:
Whiteboard: network
: 1176148 (view as bug list)
Depends On:
Blocks: rhev35rcblocker rhev35gablocker 1183447
TreeView+ depends on / blocked
 
Reported: 2014-08-11 13:16 UTC by Michael Burman
Modified: 2015-03-05 07:42 UTC (History)
13 users (show)

Fixed In Version: libvirt-1.2.8-1.el7
Doc Type: Bug Fix
Doc Text:
Due to a bug in the underlying code, each attribute of the [driver/] element of the libvirt [interface/] setting was incorrectly formatted with its own [driver/] element. As a consequence, only the first [driver/] element and its attribute were parsed back, and the following [driver/] elements and their attributes were ignored. This could lead to a number of features not working correctly. With this update, the [driver/] is formatted only once with all the attributes, and is therefore parsed as intended. As a result, the described problem no longer occurs.
Clone Of:
: 1183447 (view as bug list)
Environment:
Last Closed: 2015-03-05 07:42:14 UTC
bmcclain: needinfo? (snagar)


Attachments (Terms of Use)
vdsm.log (10.35 MB, text/x-log)
2014-08-11 13:16 UTC, Michael Burman
no flags Details


Links
System 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 12:10:54 UTC

Description Michael Burman 2014-08-11 13:16:04 UTC
Created attachment 925745 [details]
vdsm.log

Description of problem:
<driver queues='X'/> is accepted but not formatted back
Vdsm reports XML to libvirt, but just doesn't format it back in the XML
ps -ww `pgrep qemu-kvm`   -  fds=25:26:27:28:29:30:31 (7 queues)
Libvirt requires driver name or txmode

Version-Release number of selected component (if applicable):
libvirt-1.1.1-29.el7_0.1.x86_64

How reproducible:


Steps to Reproduce:
1. Config value for queue on vNIC profile  
2. Check vdsm reports XML to libvirt 
3. Run ps -ww `pgrep qemu-kvm`

Actual results:
<driver queues='X'/> is accepted but not formatted back

Expected results:
<driver queues='X'/> should be formatted back in the XML

Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=821493

Comment 1 Michal Privoznik 2014-08-11 13:27:25 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2014-August/msg00462.html

Comment 2 Michal Privoznik 2014-08-12 08:03:39 UTC
I've just pushed the patch upstream:

commit 3085702b5461d3b0b057c37cf5fbff432244f529
Author:     Michal Privoznik <mprivozn@redhat.com>
AuthorDate: Mon Aug 11 14:51:49 2014 +0200
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: Tue Aug 12 09:29:10 2014 +0200

    conf: Format interface's driver more frequently
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1128751
    
    There's this <driver/> element under <interface/> which can have
    several attributes. However, the driver element is currently formated
    only if the driver's name or txmode has been specified. This makes
    only a little sense as we parse even partial <driver/>, for instance:
    
        <interface type='user'>
          <mac address='52:54:00:e5:48:58'/>
          <model type='virtio'/>
          <driver ioeventfd='on' event_idx='on' queues='5'/>
        </interface>
    
    But such XML would never get formatted back.
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Comment 5 Michael Burman 2014-10-01 07:18:34 UTC
Verified on - 3.5.0-0.13.beta.el6ev with libvirt-1.2.8-4.el7.x86_64

Comment 6 Michal Privoznik 2015-01-06 09:29:40 UTC
*** Bug 1176148 has been marked as a duplicate of this bug. ***

Comment 7 Dan Kenigsberg 2015-01-06 11:13:24 UTC
Can this be cloned to 7.0.z, as a RHEV-3.5 feature depends on it?

Comment 8 Michal Privoznik 2015-01-06 12:14:05 UTC
(In reply to Dan Kenigsberg from comment #7)
> Can this be cloned to 7.0.z, as a RHEV-3.5 feature depends on it?

Sure it can. Although we need PM help here to clone it.

Comment 11 Song Wang 2015-01-28 06:44:25 UTC
Verify it as follows:
Scene 1:
1.[root@localhost libvirt]# rpm -q libvirt
libvirt-1.2.8-15.el7.x86_64

2.[root@localhost libvirt]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     aa                             shut off

3.[root@localhost libvirt]# virsh dumpxml aa |grep interface -A6
    <interface type='network'>
      <mac address='52:54:00:c9:7d:a5'/>
      <source network='default'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>

4.add" <driver ioeventfd='on' event_idx='on' queues='5'/>" to xml
[root@localhost libvirt]# virsh edit aa
Domain aa XML configuration edited.

5.[root@localhost libvirt]# virsh dumpxml aa |grep interface -A6
    <interface type='network'>
      <mac address='52:54:00:c9:7d:a5'/>
      <source network='default'/>
      <model type='virtio'/>
      <driver ioeventfd='on' event_idx='on' queues='5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>

6.[root@localhost libvirt]# virsh start aa;virsh dumpxml aa |grep interface -A6
Domain aa started

    <interface type='network'>
      <mac address='52:54:00:c9:7d:a5'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver ioeventfd='on' event_idx='on' queues='5'/>
      <alias name='net0'/>
--
    </interface>

[root@localhost libvirt]# ps aux |grep qemu
qemu      7267  104  0.5 1914740 46172 ?       Sl   14:34   0:07 /usr/libexec/qemu-kvm -name aa -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 23d19d5a-ee01-4a2b-bec9-948fca512c00 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/aa.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 -device nec-usb-xhci,id=usb,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=/var/lib/libvirt/images/rhel7.0.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fds=24:25:26:27:28,id=hostnet0,vhost=on,vhostfds=29:30:31:32:33 -device virtio-net-pci,ioeventfd=on,event_idx=on,mq=on,vectors=12,netdev=hostnet0,id=net0,mac=52:54:00:c9:7d:a5,bus=pci.0,addr=0x5 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=8,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x7 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on
root      7288  0.0  0.0 112640   964 pts/0    S+   14:34   0:00 grep --color=auto qemu


7.[root@localhost libvirt]# virsh destroy aa
Domain aa destroyed

8.[root@localhost libvirt]# virsh dumpxml aa |grep interface -A6
    <interface type='network'>
      <mac address='52:54:00:c9:7d:a5'/>
      <source network='default'/>
      <model type='virtio'/>
      <driver ioeventfd='on' event_idx='on' queues='5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>

Scene 2:
1.add      <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>   to xml
[root@localhost libvirt]# virsh edit aa
Domain aa XML configuration edited.

2.[root@localhost libvirt]# virsh dumpxml aa |grep interface -A6
    <interface type='network'>
      <mac address='52:54:00:c9:7d:a5'/>
      <source network='default'/>
      <model type='virtio'/>
      <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
3. [root@localhost libvirt]# virsh start aa
Domain aa started

[root@localhost libvirt]# virsh dumpxml aa |grep interface -A6
    <interface type='network'>
      <mac address='52:54:00:c9:7d:a5'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/>
      <alias name='net0'/>



bug is fixed.

Comment 13 errata-xmlrpc 2015-03-05 07:42:14 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://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.