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

RHEL 10 Guest can not get disk serial in time which disks in throttle group

    • Yes
    • Important
    • Regression
    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • x86_64
    • Linux
    • None

      What were you trying to do that didn't work?
      Boot RHEL 10 Guest with multi disks, those disks link to the throttle group.
      It can not get disk serial in time in booting.

      This issue is not related to qemu, only related to guests.
      RHEL9 guest does not hit this issue

      It will not hit this issue if disks are not in throttle group,

      Please provide the package NVR for which bug is seen:
      host :
      Red Hat Enterprise Linux release 9.5 Beta (Plow)
      5.14.0-447.el9.x86_64
      qemu-kvm-9.0.0-3.el9.x86_64
      seabios-bin-1.16.3-2.el9.noarch
      edk2-ovmf-20240214-2.el9.noarch
      libvirt-10.3.0-1.el9.x86_64

      guest:

      How reproducible:
      >80%

      Steps to reproduce

      Prepare ENV:
      guest check disk script /home/disk.sh:
      root@vm-198-185 /home $ cat disk.sh 
      #!/bin/bash
      for((i=0;i<1000;i++)) ;do 
      	n=`lsblk -nd -o name,size,serial|grep TARGET_DISK|wc -l`
              lsblk -nd -o name,size,serial
      	if (( n<4 ));then
      		echo "Wrong:`date`"
              	sleep 0.5
      	else
      		break
      	fi
      done
      echo "$i"
      
      login guest script:
      #!/bin/bash
      
      [[ "$1" == "" ]] && ip="10.72.142.207" || ip="$1"
      for ((i = 0; i < 60; i++)); do
        if ping $ip -c 1 -W 1 > /dev/null; then break; fi;
        sleep 1;echo -n "."
      done
      echo
      ssh $ip /home/disk.sh
      
      
      1.Boot VM
      [[ "$1" == "" ]] && os=rhel100 || os=$1
      echo $os
      /usr/libexec/qemu-kvm \
      -name 'avocado-vt-vm1'  \
      -machine q35,memory-backend=mem-machine_mem \
      -device '{"id": "pcie-root-port-0", "driver": "pcie-root-port", "multifunction": true, "bus": "pcie.0", "addr": "0x1", "chassis": 1}' \
      -device '{"id": "pcie-pci-bridge-0", "driver": "pcie-pci-bridge", "addr": "0x0", "bus": "pcie-root-port-0"}'  \
      -nodefaults \
      -device '{"driver": "VGA", "bus": "pcie.0", "addr": "0x2"}' \
      -m 12288 \
      -object '{"size": 12884901888, "id": "mem-machine_mem", "qom-type": "memory-backend-ram"}'  \
      -smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2  \
      -cpu 'Cascadelake-Server-noTSX',+kvm_pv_unhalt \
      \
      -device '{"id": "pcie-root-port-1", "port": 1, "driver": "pcie-root-port", "addr": "0x1.0x1", "bus": "pcie.0", "chassis": 2}' \
      -device '{"driver": "qemu-xhci", "id": "usb1", "bus": "pcie-root-port-1", "addr": "0x0"}' \
      -device '{"driver": "usb-tablet", "id": "usb-tablet1", "bus": "usb1.0", "port": "1"}' \
      -object '{"qom-type": "iothread", "id": "iothread0"}' \
      -object '{"qom-type": "iothread", "id": "iothread1"}' \
      -object '{"qom-type": "throttle-group", "x-bps-total": 163840, "x-iops-total": 40, "x-iops-total-max": 50, "x-iops-total-max-length": 10, "x-bps-total-max": 204800, "x-bps-total-max-length": 10, "id": "group1"}' \
      -object '{"qom-type": "throttle-group", "x-bps-total": 204800, "x-iops-total": 50, "x-iops-total-max": 60, "x-iops-total-max-length": 10, "x-bps-total-max": 245760, "x-bps-total-max-length": 10, "id": "group2"}' \
      -device '{"id": "pcie-root-port-2", "port": 2, "driver": "pcie-root-port", "addr": "0x1.0x2", "bus": "pcie.0", "chassis": 3}' \
      -device '{"id": "virtio_scsi_pci0", "driver": "virtio-scsi-pci", "bus": "pcie-root-port-2", "addr": "0x0", "iothread": "iothread0"}' \
      -blockdev '{"node-name": "file_image1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "native", "filename": "'/home/kvm_autotest_root/images/$os.qcow2'", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_image1", "driver": "qcow2", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_image1"}' \
      -device '{"driver": "scsi-hd", "id": "image1", "drive": "drive_image1", "write-cache": "on"}' \
      -blockdev '{"node-name": "file_stg1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "native", "filename": "/home/kvm_autotest_root/images/mstg1.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "qcow2_stg1", "driver": "qcow2", "file": "file_stg1", "read-only": false, "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_stg1", "driver": "throttle", "throttle-group": "group1", "file": "qcow2_stg1"}' \
      -device '{"driver": "scsi-hd", "id": "stg1", "drive": "drive_stg1", "write-cache": "on", "serial": "TARGET_DISK1"}' \
      -blockdev '{"node-name": "file_stg2", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "native", "filename": "/home/kvm_autotest_root/images/mstg2.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "qcow2_stg2", "driver": "qcow2", "file": "file_stg2", "read-only": false, "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_stg2", "driver": "throttle", "throttle-group": "group1", "file": "qcow2_stg2"}' \
      -device '{"driver": "scsi-hd", "id": "stg2", "drive": "drive_stg2", "write-cache": "on", "serial": "TARGET_DISK2"}' \
      -blockdev '{"node-name": "file_stg3", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "native", "filename": "/home/kvm_autotest_root/images/mstg3.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "qcow2_stg3", "driver": "qcow2", "file": "file_stg3", "read-only": false, "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_stg3", "driver": "throttle", "throttle-group": "group2", "file": "qcow2_stg3"}' \
      -device '{"driver": "scsi-hd", "id": "stg3", "drive": "drive_stg3", "write-cache": "on", "serial": "TARGET_DISK3"}' \
      -blockdev '{"node-name": "file_stg4", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "native", "filename": "/home/kvm_autotest_root/images/mstg4.qcow2", "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "qcow2_stg4", "driver": "qcow2", "file": "file_stg4", "read-only": false, "cache": {"direct": true, "no-flush": false}}' \
      -blockdev '{"node-name": "drive_stg4", "driver": "throttle", "throttle-group": "group2", "file": "qcow2_stg4"}' \
      -device '{"driver": "scsi-hd", "id": "stg4", "drive": "drive_stg4", "write-cache": "on", "serial": "TARGET_DISK4"}' \
      -device '{"id": "pcie-root-port-3", "port": 3, "driver": "pcie-root-port", "addr": "0x1.0x3", "bus": "pcie.0", "chassis": 4}' \
      -device '{"driver": "virtio-net-pci", "mac": "9a:bb:aa:b4:7b:2f", "id": "idbIhL3Q", "netdev": "idK1r2tJ", "bus": "pcie-root-port-3", "addr": "0x0"}' \
      -netdev  '{"id": "idK1r2tJ", "type": "tap", "vhost": true}'  \
      -vnc :5 \
      -monitor stdio \
      -qmp tcp:0:5955,server=on,wait=off \
      -rtc base=utc,clock=host,driftfix=slew  \
      -boot menu=off,order=cdn,once=c,strict=off \
      -enable-kvm \
      -device '{"id": "pcie_extra_root_port_0", "driver": "pcie-root-port", "multifunction": true, "bus": "pcie.0", "addr": "0x3", "chassis": 5}' \
      -chardev socket,id=socket-serial,path=/var/tmp/socket-serial,logfile=/var/tmp/file-serial.log,mux=on,server=on,wait=off \
      -serial chardev:socket-serial \
      -chardev file,path=/var/tmp/file-bios.log,id=file-bios \
      -device isa-debugcon,chardev=file-bios,iobase=0x402 \
      
      2.run login guest script
      ./guest.sh $ip
      
      3.check the output
      

      Expected results
      once the disk attached, the serial should visible
      sda 20G
      sdb 1G TARGET_DISK1
      sdc 2G TARGET_DISK2
      sdd 3G TARGET_DISK3
      sde 4G TARGET_DISK4

      Actual results
      the disk serial has delay.
      ..................
      sda 20G
      sdb 1G
      sdc 2G
      sdd 3G
      sde 4G
      Wrong:Mon Jul 1 04:35:24 PM CST 2024
      sda 20G
      sdb 1G
      sdc 2G
      sdd 3G
      sde 4G
      Wrong:Mon Jul 1 04:35:25 PM CST 2024
      sda 20G
      sdb 1G
      sdc 2G
      sdd 3G TARGET_DISK3
      sde 4G
      Wrong:Mon Jul 1 04:35:25 PM CST 2024
      sda 20G
      sdb 1G
      sdc 2G
      sdd 3G TARGET_DISK3
      sde 4G TARGET_DISK4
      Wrong:Mon Jul 1 04:35:26 PM CST 2024
      sda 20G
      sdb 1G TARGET_DISK1
      sdc 2G
      sdd 3G TARGET_DISK3
      sde 4G TARGET_DISK4
      Wrong:Mon Jul 1 04:35:26 PM CST 2024
      sda 20G
      sdb 1G TARGET_DISK1
      sdc 2G
      sdd 3G TARGET_DISK3
      sde 4G TARGET_DISK4
      Wrong:Mon Jul 1 04:35:27 PM CST 2024
      sda 20G
      sdb 1G TARGET_DISK1
      sdc 2G
      sdd 3G TARGET_DISK3
      sde 4G TARGET_DISK4
      Wrong:Mon Jul 1 04:35:27 PM CST 2024
      sda 20G
      sdb 1G TARGET_DISK1
      sdc 2G TARGET_DISK2
      sdd 3G TARGET_DISK3
      sde 4G TARGET_DISK4
      7

        1. disk.sh
          0.2 kB
          qing wang
        2. guesh.sh
          0.3 kB
          qing wang

              hreitz@redhat.com Hanna Czenczek
              qingwangrh qing wang
              virt-maint virt-maint
              qing wang qing wang
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: