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

[virtual network] virtio-net device does not function with vnet_hdr=False and vhost

    • Normal
    • sst_virtualization_windows
    • ssg_virtualization
    • 20
    • 22
    • 5
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • If docs needed, set a value

      Description of problem:
      An intermittent error occurs on rhel8.5 when executing the test case nic_hotplug.vhost_nic.nic_virtio.
      Error info:
      -->FAIL: Hotplug nic still can't get ip after reboot vm

      Version-Release number of selected component (if applicable):
      qemu-kvm-6.0.0-16.module+el8.5.0+10848+2dccc46d.x86_64
      kernel-4.18.0-305.2.el8.x86_64
      Avocado: avocado-framework 87.0

      How reproducible:
      2/5

      Steps to Reproduce:
      1.Install latest RHEL8.5 env
      2.Please execute the following command to test:
      python3 ConfigTest.py --testcase=nic_hotplug.vhost_nic.nic_virtio --guestname=RHEL.8.5.0 --machines=q35 --nicmodel=virtio_net --platform=x86_64

      Actual results:
      07:03:25 DEBUG| Send command: {'execute': 'netdev_add', 'arguments':

      {'type': 'tap', 'id': 'idFAOSbc', 'fd': '47', 'vhost': True}

      , 'id': 'TcukncTt'}
      07:03:25 DEBUG| (monitor avocado-vt-vm1.qmpmonitor1) Sending command 'device_add'
      07:03:25 DEBUG| Send command:

      {'execute': 'device_add', 'arguments': OrderedDict([('id', 'idYqr9u4'), ('driver', 'virtio-net-pci'), ('netdev', 'idFAOSbc'), ('mac', '9a:06:a8:9c:f3:64'), ('bus', 'pcie_extra_root_port_0'), ('addr', '0x0')]), 'id': 'hbqkSCuH'}

      07:03:25 INFO | Check if new interface gets ip address
      07:04:55 DEBUG| Attempting to log into 'avocado-vt-vm1' via serial console (timeout 90s)
      07:05:06 DEBUG| Sending command: echo %OS%
      07:05:06 DEBUG| Sending command (safe): ifconfig -a
      07:05:06 DEBUG| Sending command (safe): ip link | grep -B1 '' -i
      07:05:06 DEBUG| Sending command: test -d /sys/class/net/eth0
      07:05:06 DEBUG| Sending command: echo $?
      07:05:07 DEBUG| Sending command: cat /sys/class/net/eth0/address
      07:05:07 DEBUG| Sending command (safe): ifconfig eth0 || ip address show eth0
      07:05:07 WARNI| No VM's NIC got IP address
      07:05:07 DEBUG| Sending command (safe): ifconfig -a
      07:05:07 DEBUG| Sending command (safe): ip link | grep -B1 '9a:06:a8:9c:f3:64' -i
      07:05:07 DEBUG| Sending command (safe): test -f /etc/sysconfig/network-scripts/ifcfg-eth0 || echo 'DEVICE=eth0
      BOOTPROTO=dhcp
      ONBOOT=yes' > /etc/sysconfig/network-scripts/ifcfg-eth0
      07:05:07 DEBUG| Sending command (safe): ifconfig eth0 up
      07:05:07 DEBUG| Sending command (safe): dhclient -r
      07:05:08 DEBUG| Sending command (safe): dhclient eth0
      07:06:09 DEBUG| Sending command (safe): arp -n|awk '/^[1-9]/

      {print "arp -d " $1}'|sh
      ....
      07:11:42 INFO | Reboot vm after hotplug nic
      07:11:42 INFO | Context: Start test iteration 1 --> rebooting 'avocado-vt-vm1'
      07:11:42 DEBUG| Send command: shutdown -r now
      07:11:42 DEBUG| Sending command: shutdown -r now
      07:12:42 INFO | Context: Start test iteration 1 --> rebooting 'avocado-vt-vm1' --> waiting for guest to go down
      07:12:42 INFO | Context: Start test iteration 1 --> rebooting 'avocado-vt-vm1' --> logging in after reboot
      07:12:42 DEBUG| Attempting to log into 'avocado-vt-vm1' via serial console (timeout 180s)
      07:15:03 DEBUG| Attempting to log into 'avocado-vt-vm1' via serial console (timeout 90s)
      07:15:14 DEBUG| Sending command: echo %OS%
      07:15:14 DEBUG| Sending command (safe): ifconfig -a
      07:15:15 DEBUG| Sending command (safe): ip link | grep -B1 '' -i
      07:15:15 DEBUG| Sending command: test -d /sys/class/net/eth0
      07:15:15 DEBUG| Sending command: echo $?
      07:15:15 DEBUG| Sending command: cat /sys/class/net/eth0/address
      07:15:15 DEBUG| Sending command (safe): ifconfig eth0 || ip address show eth0
      07:15:15 WARNI| No VM's NIC got IP address
      07:15:15 DEBUG| Sending command (safe): ifconfig -a
      07:15:15 DEBUG| Sending command (safe): ip link | grep -B1 '9a:06:a8:9c:f3:64' -i
      07:15:15 DEBUG| Sending command (safe): test -f /etc/sysconfig/network-scripts/ifcfg-eth0 || echo 'DEVICE=eth0
      BOOTPROTO=dhcp
      ONBOOT=yes' > /etc/sysconfig/network-scripts/ifcfg-eth0
      07:15:16 DEBUG| Sending command (safe): ifconfig eth0 up
      07:15:16 DEBUG| Sending command (safe): dhclient -r
      07:15:16 DEBUG| Sending command (safe): dhclient eth0
      07:16:17 DEBUG| Sending command (safe): arp -n|awk '/^[1-9]/{print "arp -d " $1}

      '|sh

      07:21:50 INFO | Running 'arp -aen'
      07:21:50 DEBUG| [stdout] Address HWtype HWaddress Flags Mask Iface
      07:21:50 INFO | Command 'arp -aen' finished with 0 after 0.0018116980063496158s
      07:21:50 DEBUG| [stdout] 10.73.227.254 ether 44:aa:50:cc:2b:a1 C switch
      07:21:50 DEBUG| Can't get IP address:
      07:21:50 DEBUG| Cached IP: None
      07:21:50 DEBUG| ARP table: Address HWtype HWaddress Flags Mask Iface
      10.73.227.254 ether 44:aa:50:cc:2b:a1 C switch
      07:21:50 ERROR|
      07:21:50 ERROR| Reproduced traceback from: /usr/local/lib/python3.6/site-packages/avocado_framework_plugin_vt-87.0-py3.6.egg/avocado_vt/test.py:380
      07:21:50 ERROR| Traceback (most recent call last):
      07:21:50 ERROR| File "/usr/local/lib/python3.6/site-packages/avocado_framework_plugin_vt-87.0-py3.6.egg/virttest/error_context.py", line 135, in new_fn
      07:21:50 ERROR| return fn(*args, **kwargs)
      07:21:50 ERROR| File "/var/lib/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/qemu/tests/nic_hotplug.py", line 220, in run
      07:21:50 ERROR| test.fail("Hotplug nic still can't get ip after reboot vm")
      07:21:50 ERROR| File "/usr/local/lib/python3.6/site-packages/avocado_framework-87.0-py3.6.egg/avocado/core/test.py", line 955, in fail
      07:21:50 ERROR| raise exceptions.TestFail(message)
      07:21:50 ERROR| avocado.core.exceptions.TestFail: Hotplug nic still can't get ip after reboot vm
      07:21:50 ERROR|

      Expected results:
      The vm should get a valid IP address and ping between the guest and the host.

      Additional info:
      1.So far, it only reproduced with the automation. I can't reproduce this problem manually.
      2.As mentioned in Bug 1762906#Comment 16. If you delete "vhost = on" from the nic_hotplug.cfg file, there is no the issue any more. So I think this issue is related to "vhost=on",but this can only be reproduced through automation.
      3.Let me know if you would like me to set up a machine to reproduce the problem.

            yuri.benditovich Yuri Benditovich
            rhn-support-leiyang Lei Yang
            virt-maint virt-maint
            Lei Yang Lei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: