Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-74487

Irrelevant ovs related error msg occurred when change vlan for direct interface with vf passthrough mode

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • No
    • Moderate
    • 1
    • rhel-virt-core-libvirt-2
    • ssg_virtualization
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • Libvirt Bugs already in Sprint
    • None
    • Manual
    • None

      What were you trying to do that didn't work?

      Start a guest with direct interface with sirov vf passthrough mode, then change vlan by virsh update-device, the update-device cmd get error msg which contains irrelevant ovs related info. 

      Please provide the package NVR for which the bug is seen:

      # rpm -q libvirt qemu-kvm
      libvirt-10.10.0-4.el10.x86_64
      qemu-kvm-9.1.0-10.el10.x86_64

      How reproducible is this bug?:100%

      Steps to reproduce

      1. Check Open vSwitch is not running:

      # /usr/share/openvswitch/scripts/ovs-ctl status
      ovsdb-server is not running
      ovs-vswitchd is not running

      2. Enable sirov VF:

      # echo 2 > /sys/bus/pci/devices/0000\:3b\:00.0/sriov_numvfs
      # ls /sys/bus/pci/devices/0000\:3b\:00.0/virtfn0/net/
      enp59s0f0v0

      3. Start a guest with below direct interface xml:

       <interface type='direct'>
            <mac address='52:54:00:8e:56:88'/>
            <source dev='enp59s0f0v0' mode='passthrough'/>
            <target dev='macvtap0'/>
            <model type='rtl8139'/>
            </interface>

      # virsh start vm1
      Domain 'vm1' started
      # virsh dumpxml vm1 --xpath //interface
      <interface type="direct">
        <mac address="52:54:00:8e:56:88"/>
        <source dev="enp59s0f0v0" mode="passthrough"/>
        <target dev="macvtap0"/>
        <model type="rtl8139"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x10" slot="0x01" function="0x0"/>
      </interface>
      

      4. prepare a direct interface xml like below:

      # cat direct.xml 
      <interface type="direct">
        <mac address="52:54:00:8e:56:88"/>
        <source dev="enp59s0f0v0" mode="passthrough"/>
        <vlan>
          <tag id='42'/>
        </vlan>
        <target dev="macvtap0"/>
        <model type="rtl8139"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x10" slot="0x01" function="0x0"/>
      </interface>

      5. Use virsh update-device to update interface by direct.xml

      # virsh update-device vm1 direct.xml
      error: Failed to update device from direct.xml
      error: internal error: Unable to set vlan configuration on port macvtap0: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)

      Expected results

      The error msg should be like below or provide correct info of the scenario

      error: Failed to update device from direct.xml
      error: Operation not supported: unable to change config on 'direct' network type

      Actual results

      the error msg contains the  Open vSwitch related info which has no relationship with this scenario

      # virsh update-device vm1 direct.xml
      error: Failed to update device from direct.xml
      error: internal error: Unable to set vlan configuration on port macvtap0: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)

              lstump@redhat.com Laine Stump
              lcong@redhat.com Liang Cong
              Laine Stump Laine Stump
              Nannan Li Nannan Li
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: