Hide Forgot
This bug has been copied from bug #1366108 and has been proposed to be backported to 7.3 z-stream (EUS).
To POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2016-November/msg00093.html
Failed to verify this bug with packages: libvirt-2.0.0-10.el7_3.3.x86_64 qemu-kvm-rhev-2.6.0-28.el7_3.2.x86_64 kernel-3.10.0-514.6.1.el7.x86_64 Hit qemu-kvm-rhev bug, which block this bug verification: Bug 1394140 - qemu gets SIGSEGV when hot-plug a vhostuser network.
Verified with packages: libvirt-2.0.0-10.el7_3.3.x86_64 qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64 kernel: 3.10.0-514.6.1.el7.x86_64 Test steps: 1. Setup the openvswtich dpdk environment, start an guest without vhostuser network. # virsh start vm Domain vm started # virsh dumpxml vm|grep interface -A 5 2. Open another terminal to setup a systemtap of qemu monitor command: # stap qemu-monitor.stp 0.000 begin 3. Attach a vhostuser network successfully. # cat vhostuser1.xml <interface type='vhostuser'> <mac address='52:54:00:5f:cd:11'/> <source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/> <model type='virtio'/> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> # virsh attach-device vm vhostuser1.xml Device attached successfully # virsh dumpxml vm|grep interface -A 5 <interface type='vhostuser'> <mac address='52:54:00:5f:cd:11'/> <source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> 4. Check the systemtap of qemu monitor command output: libvirt attach a chardev which backend is socket and then use netdev_add vhost-user net device, then use device_add to add virtio-net-pci # stap qemu-monitor.stp 0.000 begin 136.125 > 0x7fa754011df0 {"execute":"chardev-add","arguments":{"id":"charnet0","backend":{"type":"socket","data":{"addr":{"type":"unix","data":{"path":"/var/run/openvswitch/vhost-user1"}},"wait":false,"server":false}}},"id":"libvirt-14"} 136.129 < 0x7fa754011df0 {"return": {}, "id": "libvirt-14"} 136.129 > 0x7fa754011df0 {"execute":"netdev_add","arguments":{"type":"vhost-user","chardev":"charnet0","id":"hostnet0"},"id":"libvirt-15"} 136.132 < 0x7fa754011df0 {"return": {}, "id": "libvirt-15"} 136.132 > 0x7fa754011df0 {"execute":"device_add","arguments":{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:5f:cd:11","bus":"pci.0","addr":"0x8"},"id":"libvirt-16"} 136.144 < 0x7fa754011df0 {"return": {}, "id": "libvirt-16"} 5. Attach the second vhostuser network and detach it, check the systemtap of qemu monitor command output: PASS # virsh attach-device vm vhostuser2.xml Device attached successfully # virsh dumpxml vm |grep interface -A 5 <interface type='vhostuser'> <mac address='52:54:00:5f:cd:11'/> <source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> <interface type='vhostuser'> <mac address='52:54:00:5f:dd:21'/> <source type='unix' path='/var/run/openvswitch/vhost-user2' mode='client'/> <model type='virtio'/> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> # stap qemu-monitor.stp 0.000 begin 47.410 > 0x7fa754011df0 {"execute":"chardev-add","arguments":{"id":"charnet1","backend":{"type":"socket","data":{"addr":{"type":"unix","data":{"path":"/var/run/openvswitch/vhost-user2"}},"wait":false,"server":false}}},"id":"libvirt-18"} 47.414 < 0x7fa754011df0 {"return": {}, "id": "libvirt-18"} 47.414 > 0x7fa754011df0 {"execute":"netdev_add","arguments":{"type":"vhost-user","chardev":"charnet1","id":"hostnet1"},"id":"libvirt-19"} 47.417 < 0x7fa754011df0 {"return": {}, "id": "libvirt-19"} 47.417 > 0x7fa754011df0 {"execute":"device_add","arguments":{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"52:54:00:5f:dd:21","bus":"pci.0","addr":"0x3"},"id":"libvirt-20"} 47.432 < 0x7fa754011df0 {"return": {}, "id": "libvirt-20"} Login to the guest: # lspci | grep Ethernet 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device 00:08.0 Ethernet controller: Red Hat, Inc Virtio network device # virsh detach-device vm vhostuser2.xml Device detached successfully # virsh dumpxml vm |grep interface -A 5 <interface type='vhostuser'> <mac address='52:54:00:5f:cd:11'/> <source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> # stap qemu-monitor.stp 0.000 begin 3.349 > 0x7fa754011df0 {"execute":"device_del","arguments":{"id":"net1"},"id":"libvirt-22"} 3.351 < 0x7fa754011df0 {"return": {}, "id": "libvirt-22"} 3.411 ! 0x7fa754011df0 {"timestamp": {"seconds": 1483598085, "microseconds": 807355}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/net1/virtio-backend"}} 3.412 ! 0x7fa754011df0 {"timestamp": {"seconds": 1483598085, "microseconds": 807439}, "event": "DEVICE_DELETED", "data": {"device": "net1", "path": "/machine/peripheral/net1"}} 3.412 > 0x7fa754011df0 {"execute":"netdev_del","arguments":{"id":"hostnet1"},"id":"libvirt-23"} 3.416 < 0x7fa754011df0 {"return": {}, "id": "libvirt-23"} 3.416 > 0x7fa754011df0 {"execute":"chardev-remove","arguments":{"id":"charnet1"},"id":"libvirt-24"} 3.417 < 0x7fa754011df0 {"return": {}, "id": "libvirt-24"} Login to the guest: # lspci|grep Ethernet 00:08.0 Ethernet controller: Red Hat, Inc Virtio network device
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/RHBA-2017-0098.html