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 1627781 - virsh domiflist return NULL for the vhostuser interface name and source [rhel-7.4.z]
Summary: virsh domiflist return NULL for the vhostuser interface name and source [rhel...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: chhu
URL:
Whiteboard:
Depends On: 1459091
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-11 13:01 UTC by Oneata Mircea Teodor
Modified: 2021-12-10 17:27 UTC (History)
12 users (show)

Fixed In Version: libvirt-3.2.0-14.el7_4.12
Doc Type: Bug Fix
Doc Text:
Prior to this update, the name of vhostuser interfaces were in some cases missing from XML configurations of virtual machines (VMs). Now, vhostuser interfaces are queried during VM startup instead of during VM defining, and the interface names are thus set up in the XM configuration correctly.
Clone Of: 1459091
Environment:
Last Closed: 2018-09-25 20:46:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3549532 0 None None None 2018-09-11 13:01:47 UTC
Red Hat Product Errata RHBA-2018:2780 0 None None None 2018-09-25 20:46:18 UTC
Red Hat Product Errata RHEA-2018:0704 0 None None None 2018-09-11 13:01:47 UTC

Description Oneata Mircea Teodor 2018-09-11 13:01:35 UTC
This bug has been copied from bug #1459091 and has been proposed to be backported to 7.4 z-stream (EUS).

Comment 7 yalzhang@redhat.com 2018-09-13 09:26:28 UTC
Hi Michal, please help to confirm below questions:

1. In step 2-3), if there is a pre-set "target dev" in the inactive xml, after start vm, it will be override, is it expected and acceptable?

2. The bug description says "...return NULL for... interface name and source", currently, the interface name is exposed, but the source is still null. Is it acceptable?


1. Reproduce on libvirt-3.2.0-14.el7.x86_64:

1)start vm with xml without "target dev", such as:
# virsh dumpxml vhostuser1 --inactive| grep /interface -B5
    <interface type='vhostuser'>
      <mac address='52:54:00:93:51:dd'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user2' mode='client'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

# virsh start vhostuser1

2) check the live xml, still no "target dev", and the domiflist show null for Interface and Source:
# virsh dumpxml vhostuser1 | grep /interface -B6
    <interface type='vhostuser'>
      <mac address='52:54:00:93:51:dd'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user2' mode='client'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

# virsh domiflist vhostuser1
Interface  Type       Source     Model       MAC
-------------------------------------------------------
-          vhostuser  -          virtio      52:54:00:93:51:dd

2. update libvirt to libvirt-3.2.0-14.el7_4.12.x86_64, then restart libvirtd, and do destroy -> start for the guest:

1) the "target dev" is added automatically into the live xml, and it is the same as the socket name:
# virsh  dumpxml vhostuser1 | grep /interface -B7
    <interface type='vhostuser'>
      <mac address='52:54:00:93:51:dd'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user2' mode='client'/>
      <target dev='vhost-user2'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

2) The "Interface" is the same as "target dev" in the 1) step;
# virsh domiflist vhostuser1 
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vhost-user2 vhostuser  -          virtio      52:54:00:93:51:dd


3) set "target dev" in the xml, then start guest:
# virsh dumpxml vhostuser1 | grep /interface -B6
    <interface type='vhostuser'>
      <mac address='52:54:00:93:51:dd'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user2' mode='client'/>
      ** <target dev='myguest'/> **
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

# virsh domiflist vhostuser1
Interface  Type       Source     Model       MAC
-------------------------------------------------------
** vhost-user2 ** vhostuser  -          virtio      52:54:00:93:51:dd

after guest start, the "target dev" in the live xml changed:
# virsh dumpxml vhostuser1 | grep /interface -B7
    <interface type='vhostuser'>
      <mac address='52:54:00:93:51:dd'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user2' mode='client'/>
     ** <target dev='vhost-user2'/> **
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

Comment 8 Michal Privoznik 2018-09-13 10:02:29 UTC
(In reply to yalzhang from comment #7)
> Hi Michal, please help to confirm below questions:
> 
> 1. In step 2-3), if there is a pre-set "target dev" in the inactive xml,
> after start vm, it will be override, is it expected and acceptable?

Yes. Keeping "target dev" would make no sense because that is not what ovs call the interface. We have to report the actual name that ovs uses.

> 
> 2. The bug description says "...return NULL for... interface name and
> source", currently, the interface name is exposed, but the source is still
> null. Is it acceptable?

Yes, this was never reported. Nor even when 7.5 bug was verified:

https://bugzilla.redhat.com/show_bug.cgi?id=1459091#c8

Comment 9 chhu 2018-09-18 07:22:01 UTC
Verified with packages:
libvirt-3.2.0-14.el7_4.12.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.18.x86_64

Test steps:
1. Start guest with vhostuser interface successfully.
# virsh start vhostuser1
Domain vhostuser1 started

# virsh dumpxml vhostuser1|grep interface -A 10
    <interface type='vhostuser'>
      <mac address='52:54:00:93:51:dd'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/>
      <target dev='vhost-user1'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

2. Check the virsh domiflist, the "Interface" is listed. For the "Source" use Bug 1630143 to track.

# virsh domiflist vhostuser1
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vhost-user1 vhostuser  -          virtio      52:54:00:93:51:dd

3. Check the virsh domifstat:
# virsh domifstat vhostuser1 vhost-user1
vhost-user1 rx_bytes 762322076
vhost-user1 rx_packets 515304
vhost-user1 rx_drop 747
vhost-user1 tx_bytes 556820974
vhost-user1 tx_packets 384243
vhost-user1 tx_errs 0

Comment 10 chhu 2018-09-18 07:30:46 UTC
According the comment7,8,9 set the bug status to "VERIFIED".

Comment 12 errata-xmlrpc 2018-09-25 20:46:11 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://access.redhat.com/errata/RHBA-2018:2780


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