Bug 1446018

Summary: The content of SLOF boot menu is messy
Product: Red Hat Enterprise Linux 7 Reporter: xianwang <xianwang>
Component: SLOFAssignee: Thomas Huth <thuth>
Status: CLOSED ERRATA QA Contact: xianwang <xianwang>
Severity: low Docs Contact:
Priority: low    
Version: 7.4CC: micai, michen, mrezanin, qzhang, thuth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: SLOF-20170724-1.git89f519f.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 14:41:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xianwang 2017-04-27 03:05:59 UTC
Description of problem:
The boot devices in SLOF boot menu is messy, and some devices that specified "bootindex" may be displayed duplicate.

Version-Release number of selected component (if applicable):
3.10.0-657.el7.ppc64le
qemu-kvm-rhev-2.9.0-1.el7.ppc64le
SLOF-20170303-1.git66d250e.el7.noarch

How reproducible:
3/3

Steps to Reproduce:
1.Boot a guest with qemu cli, it specifies four devices as bootindex, once=c
/usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -nodefaults  \
    -machine pseries \
    -vga std  \
    -uuid 8aeab7e2-f341-4f8c-80e8-59e2968d85c2 \
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=03 \
    -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x4 \
    -device spapr-vscsi,id=scsi2 \
    -chardev socket,id=console0,path=/tmp/console0,server,nowait \
    -device spapr-vty,chardev=console0 \
    -device nec-usb-xhci,id=usb1,bus=pci.0,addr=05 \
    -drive file=/root/rhel74-ppc64-virtio.qcow2,format=qcow2,if=none,id=drive_blk1,werror=stop,rerror=stop \
    -device virtio-blk-pci,drive=drive_blk1,id=blk-disk1,bootindex=1,bus=pci.0,addr=06 \
    -drive id=drive_cd1,if=none,snapshot=off,aio=native,cache=none,media=cdrom,file=/root/RHEL-7.4-20170330.1-Server-ppc64-dvd1.iso \
    -device scsi-cd,id=cd1,drive=drive_cd1,bootindex=2,bus=scsi1.0 \
    -drive file=/root/data1.qcow2,format=qcow2,if=none,id=drive_data1,werror=stop,rerror=stop \
    -device scsi-hd,drive=drive_data1,id=data1,bus=scsi2.0,bootindex=3 \
    -drive file=/root/data2.qcow2,format=qcow2,if=none,id=drive_data2,werror=stop,rerror=stop \
    -device virtio-blk-pci,drive=drive_data2,id=data2,bus=pci.0,addr=08 \
    -drive file=/root/data3.qcow2,format=qcow2,if=none,id=drive_data3,werror=stop,rerror=stop \
    -device virtio-blk-pci,drive=drive_data3,id=data3,bus=pci.0,addr=09 \
    -device spapr-vlan,mac=9a:7b:7c:7d:7e:71,id=idtlLxAk,netdev=idlkwV8e \
    -netdev tap,id=idlkwV8e,vhost=on,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
    -device virtio-net-pci,mac=9a:7b:7c:7d:7e:72,id=id9HRc5V,vectors=4,netdev=idjlQN53,bus=pci.0,addr=10,bootindex=4 \
    -netdev tap,id=idjlQN53,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
    -m 4G \
    -smp 4 \
    -cpu host \
    -device usb-kbd \
    -device usb-mouse \
    -qmp tcp:0:8881,server,nowait \
    -vnc :1  \
    -msg timestamp=on \
    -rtc base=localtime,clock=vm,driftfix=slew  \
    -monitor stdio \
    -boot order=cdn,once=n,menu=on,strict=off \
    -enable-kvm
2.Press F12 at the early stage of boot, check the boot menu in SLOF user interface
3.

Actual results:
Select boot device:

1. /pci@800000020000000/scsi@6: /pci@800000020000000/scsi@6
2. /pci@800000020000000/scsi@4/disk@100000000000000: /pci@800000020000000/scsi@4/disk@100000000000000
3. /vdevice/v-scsi@71000001/disk@8000000000000000: /vdevice/v-scsi@71000001/disk@8000000000000000
4. /pci@800000020000000/ethernet@10: /pci@800000020000000/ethernet@10
5. disk: /vdevice/v-scsi@71000001/disk@8000000000000000
6. disk1: /pci@800000020000000/scsi@6
7. disk2: /pci@800000020000000/scsi@8
8. disk3: /pci@800000020000000/scsi@9
9. cdrom: /pci@800000020000000/scsi@4/disk@100000000000000
10. net: /vdevice/l-lan@71000003
11. net1: /pci@800000020000000/ethernet@10

selection "1" device  is equal to selection "6";
selection "2" device  is equal to selection "9";
selection "3" device  is equal to selection "5";
selection "4" device  is equal to selection "11";
i.e, it displays all the boot devices that specified "bootindex", then, it
displays again all the boot devices including "bootindex" devices, what's more, if change "once=n" the output is same as above, like following:
Select boot device:

1. /pci@800000020000000/scsi@6: /pci@800000020000000/scsi@6
2. /pci@800000020000000/scsi@4/disk@100000000000000: /pci@800000020000000/scsi@4/disk@100000000000000
3. /vdevice/v-scsi@71000001/disk@8000000000000000: /vdevice/v-scsi@71000001/disk@8000000000000000
4. /pci@800000020000000/ethernet@10: /pci@800000020000000/ethernet@10
5. disk: /vdevice/v-scsi@71000001/disk@8000000000000000
6. disk1: /pci@800000020000000/scsi@6
7. disk2: /pci@800000020000000/scsi@8
8. disk3: /pci@800000020000000/scsi@9
9. cdrom: /pci@800000020000000/scsi@4/disk@100000000000000
10. net: /vdevice/l-lan@71000003
11. net1: /pci@800000020000000/ethernet@10

Expected results:
I am not sure what is the expected result, at least, I think this result is not reasonable.

Additional info:

Comment 2 xianwang 2017-04-27 03:08:14 UTC
This issue is for SLOF, so, it is only for powerpc.

Comment 3 xianwang 2017-04-27 03:24:56 UTC
With the same qemu-kvm-rhev, kernel and same qemu cli as bug description, but SLOF-20160223-6.gitdbbfda4.el7.noarch, the boot menu is as following:
(both for once=c and once=n, test result is same)

Select boot device:

1. /pci@800000020000000/scsi@6: /pci@800000020000000/scsi@6
2. /pci@800000020000000/scsi@4/disk@100000000000000: /pci@800000020000000/scsi@4/disk@100000000000000
3. /vdevice/v-scsi@71000001/disk@8000000000000000: /vdevice/v-scsi@71000001/disk@8000000000000000
4. /pci@800000020000000/ethernet@10: /pci@800000020000000/ethernet@10

it only displays the "bootindex" devices.

Comment 5 Thomas Huth 2017-06-02 13:31:58 UTC
I've now suggested a patch series upstream to fix this issue:
https://lists.ozlabs.org/pipermail/slof/2017-June/001564.html

Comment 6 Thomas Huth 2017-08-04 07:25:16 UTC
The new bootmenu code has been merged in upstream:

https://github.com/aik/SLOF/commit/fa94a3bb20734cb8e0280b232d16b6d466ec3d53

We'll get it in downstream with the next rebase of the SLOF package.

Comment 8 Minjia Cai 2017-11-07 09:44:49 UTC
reproduced Version:
Host (RHEL7.5):
Compose: RHEL7.4 released (RHEL-7.4-20170711.0)
kernel-3.10.0- 767 771 .el7
qemu-kvm-rhev-2.10.0-4.el7
SLOF-20170303-1.git66d250e.el7.noarch

Guest:
Compose: RHEL7.4 released (RHEL-7.4-20170711.0)
kernel-3.10.0- 767 771 .el7

Steps to Reproduce is same the as comment0:
1.Boot a guest with qemu cli, it specifies four devices as bootindex
/usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -machine pseries-rhel7.4.0 \
    -nodefaults  \
    -vga std \
    -chardev socket,id=serial_id_serial0,path=/tmp/console0,server,nowait \
    -device spapr-vty,reg=0x30000000,chardev=serial_id_serial0 \
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=04 \
    -chardev socket,path=/tmp/serial0,nowait,id=idQdLRHP,server \
    -device virtserialport,id=idBu8FQH,name=vs,bus=virtio_serial_pci0.0,chardev=idQdLRHP \
    -object rng-random,filename=/dev/random,id=passthrough-rOXjKxaC \
    -device virtio-rng-pci,id=virtio-rng-pci-GVn8yzUA,rng=passthrough-rOXjKxaC,bus=pci.0,addr=05 \
    -device nec-usb-xhci,id=usb1,bus=pci.0,addr=06 \
    -device pci-ohci,id=usb3,bus=pci.0,addr=07 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=08 \
    -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,media=disk,format=qcow2,file=/root/micai/RHEL74_BE.qcow2  \
    -device scsi-hd,id=image1,drive=drive_image1,bus=virtio_scsi_pci0.0,logical_block_size=512,physical_block_size=4096,bootindex=0 \
    -drive  if=none,id=drive-scsi0-0-1-0,readonly=on  \
    -device scsi-cd,bus=virtio_scsi_pci0.0,drive=drive-scsi0-0-1-0,bootindex=2,id=scsi0-0-1-0 \
    -boot  menu=on  \
    -drive file=disk.qcow2,if=none,id=drive-scsi0-0-0-1,format=qcow2,cache=none \
    -device scsi-hd,bus=virtio_scsi_pci0.0,drive=drive-scsi0-0-0-1,bootindex=3,id=scsi0-0-0-1 \
    -chardev socket,id=chardev0,path=/tmp/slofpath,server,nowait \
    -device spapr-vty,chardev=chardev0 \
    -object iothread,id=thread0 \
    -device virtio-blk-pci,id=disk,drive=drive-disk0,iothread=thread0 \
    -drive file=/root/micai/r3.qcow2,format=qcow2,if=none,id=drive-disk0,cache=none\
    -object iothread,id=iothread0 \
    -drive file=/root/micai/r1.qcow2,format=qcow2,if=none,cache=none,id=drive_plane,werror=stop,rerror=stop \
    -device virtio-blk-pci,drive=d\rive_plane,id=plane,bus=pci.0,addr=09,iothread=iothread0 \
    -drive file=/root/micai/r2.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop \
    -device spapr-vscsi,reg=0x1000,id=scsi0 \
    -device scsi-hd,drive=drive-system-disk,id=system-disk,bus=scsi0.0 \
    -device virtio-net-pci,mac=9a:4f:50:51:52:53,id=id9HRc5V,vectors=4,netdev=idjlQN53,bus=pci.0,addr=11 \
    -netdev tap,id=idjlQN53,vhost=on,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
    -device spapr-vlan,mac=9a:4f:50:51:52:54,netdev=hostnet0,id=net0 \
    -netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
    -m 8G,slots=4,maxmem=1024G \
    -smp 8,cores=4,threads=1,sockets=2 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -device usb-mouse,id=input1,bus=usb1.0,port=2 \
    -device usb-kbd,id=input2,bus=usb1.0,port=3 \
    -drive id=drive_cd1,if=none,snapshot=off,aio=threads,cache=none,media=cdrom,format=raw,rerror=stop,werror=stop,file=/root/micai/RHEL-7.4-20170711.0-Server-ppc64-dvd1.iso \
    -device scsi-cd,id=cd1,drive=drive_cd1,bus=virtio_scsi_pci0.0,bootindex=1 \
    -vnc :1  \ 
    -qmp tcp:0:8881,server,nowait \
    -monitor stdio \
    -rtc base=utc,clock=host  \
    -boot order=cdn,once=c,menu=on,strict=off  \
    -enable-kvm  \
    -watchdog i6300esb \
    -watchdog-action reset \
    -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=15
2.Press F12 at the early stage of boot, check the boot menu in SLOF user interface

Actual results:
it displays again all the boot devices including "bootindex" devices,and 
Input selection number and the corresponding plate can not be one to one

Verified Version:

Change SLOF-20170303-1.git66d250e.el7.noarch to SLOF-20170724-2.git89f519f.el7.noarch.rpm

Steps to Reproduce is same the as comment0:
The phenomenon of normal performance,Enter the selection number and the disk one-to-one correspondence

Comment 11 errata-xmlrpc 2018-04-10 14:41:52 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:0820