Bug 997817
Summary: | -boot order and -boot once regressed since RHEL-6 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Markus Armbruster <armbru> |
Component: | qemu-kvm | Assignee: | Amos Kong <akong> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | acathrow, ailan, akong, armbru, bili, flang, hhuang, juzhang, michen, mrezanin, sluo, virt-bugs, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-1.5.3-36.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-13 11:32:02 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1037593 |
Description
Markus Armbruster
2013-08-16 09:07:36 UTC
Re boot-order-test: make that upstream commit fdd26fc^..2494397. Fix included in qemu-kvm-1.5.3-12.el7 Test this bug on old version: # rpm -q qemu-kvm qemu-kvm-1.5.3-11.el7.x86_64 # rpm -q seabios seabios-1.7.2.2-4.el7.x86_64 Test 4 senarios) Case 1: -boot order="" Case 2: -boot once=a Case 3: -boot once=a,order=c Case 4: -boot once=a -boot once=b -boot once=c ***Results: case 1: Hard Disk -->Floppy-->DVD/CD(**Boot order is "cad") Reboot guest(system_reset)---->Hard Disk -->Floppy-->DVD/CD.... case 2: Floppy-->Hard Disk--->DVD/CD... Reboot guest(system_reset)---->Floppy(**Boot order reverts to ""on reboot) case 3: Floppy-->Hard Disk--->DVD/CD...--->(***Boot order is "c“-->Not know what's the mean) Reboot guest(system_reset)--->Hard disk-->Floppy(***Boot order reverts to "" ) case 4: Floppy--->(***Boot order is "b" ) Reboot guest(system_reset)---->Floppy(***Boot order reverts to "") Test on fixed version: # rpm -q qemu-kvm qemu-kvm-1.5.3-19.el7.x86_64 # rpm -q seabios seabios-1.7.2.2-4.el7.x86_64 Test 4 senarios) Case 1: -boot order="" Case 2: -boot once=a Case 3: -boot once=a,order=c Case 4: -boot once=a -boot once=b -boot once=c ***Results: case 1) Floppy-->Hard Disk-->DVD/CD(Boot order is "" -->what's the mean) Reboot guest(system_reset)-->Floppy--->Hard Disk-->DVD/CD case 2) Floppy-->Hard Disk--->DVD/CD Reboot guest(system_reset)--->Hard Disk-->Floppy-->DVD/CD (Boot order reverts to "cad") case 3) Floppy-->Hard Disk-->DVD/CD Reboot guest(system_reset)--->>Hard Disk-->Floppy-->DVD/CD case 4) Hard Disk-->Floppy-->DVD/CD Reboot guest(system_reset)--->>Hard Disk-->Floppy-->DVD/CD MY CLI: /usr/libexec/qemu-kvm -M pc-i440fx-rhel7.0.0 -enable-kvm -m 4G -smp 4,sockets=2,cores=2,threads=1 -uuid `uuidgen` -nodefaults -rtc base=utc -drive file=/home/test.qcow2,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=unsafe -device virtio-blk-pci,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:60:3f:29,bus=pci.0,addr=0x4 -monitor stdio -vnc :10 -vga qxl -usb -device usb-tablet,id=input0 -drive if=none,id=drive-scsi0-0-2,readonly=on,format=raw -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0xe -device scsi-cd,bus=scsi0.0,scsi-id=2,drive=drive-scsi0-0-2,id=scsi0-0-2 -drive file=/home/floppy1.qcow2,if=none,id=drive-fdc0-0-0,readonly=on,format=qcow2 -global isa-fdc.driveA=drive-fdc0-0-0 -drive file=/home/floppy2.qcow2,if=none,id=drive-fdc0-0-1,readonly=on,format=qcow2 -global isa-fdc.driveB=drive-fdc0-0-1 -boot once=a -boot once=b -boot once=c Hi,Markus Please help me check whether my reproduce and verify tests are right? Thanks . The fix patches caused another regression: "splash", "splash-time", "reboot-timeout", "strict" Those four parameters doesn't work, so re-open this bug. (In reply to Amos Kong from comment #6) > The fix patches caused another regression: > > "splash", "splash-time", "reboot-timeout", "strict" > > Those four parameters doesn't work, so re-open this bug. Sorry, only strict parameter doesn't work. Posted patches to upstream: http://marc.info/?l=qemu-devel&m=138657548618031&w=3 Re comment#5: As I said under "Steps to Reproduce", boot order isn't directly observable, but the test suite run by "make check" has a boot-order-test that exercises all four test cases listed. You can additionally observe the guest's boot behavior, if you like. Here's what I'd expect. Case 1: Boot order is "" both for first boot and subsequent reboots. Boot order "" leaves the boot order to SeaBIOS, which defaults to hard disk, floppy, CD-ROM, if I remember correctly. Case 2: Boot order is "a" on first boot (floppy only), and "cad" on subsequent reboots (hard disk, floppy, CD-ROM). Case 3: Boot order is "a" on first boot (floppy only), and "c" on subsequent reboots (hard disk only). Case 4: Boot order is "c" on first boot (hard disk only), and "cad" on subsequent reboots (hard disk, floppy, CD-ROM). You need an additional test case to verify the regression of -boot strict has been fixed. Amos should be able to provide instructions. (In reply to Amos Kong from comment #7) > (In reply to Amos Kong from comment #6) > > The fix patches caused another regression: > > > > "splash", "splash-time", "reboot-timeout", "strict" > > > > Those four parameters doesn't work, so re-open this bug. > > Sorry, only strict parameter doesn't work. > > Posted patches to upstream: > http://marc.info/?l=qemu-devel&m=138657548618031&w=3 Reproduce steps: * Launch qemu, enable strict boot (there is not pxeserver in tap's subnet) # qemu -boot strict=on \ -device virtio-net-pci,netdev=h1,bootindex=1 -netdev tap,id=h1 ... Expected result: guest fails to boot from nic, and didn't try to boot from other devices * qemu -boot strict=off \ -device virtio-net-pci,netdev=h1,bootindex=1 -netdev tap,id=h1 ... Expected result: guest fails to boot from network, then try to boot from disk, floppy, etc Fix included in qemu-kvm-1.5.3-36.el7 Test on latest version: Host: # uname -r 3.10.0-64.el7.x86_64 # rpm -q qemu-kvm qemu-kvm-1.5.3-41.el7.x86_64 #rpm -q seabios seabios-1.7.2.2-9.el7.x86_64 *Senario 1) "stirct=on/off" test Steps: 1.Boot guest with "strict=on",and bootindex=1 for scsi-hd disk /usr/libexec/qemu-kvm -boot menu=on,strict=on -drive file=/home/test11.qcow2,if=none,media=disk,format=qcow2,rerror=stop,werror=stop,aio=native,id=scsi-disk0 -device virtio-scsi-pci,id=bus2,addr=0x7 -device scsi-hd,bus=bus2.0,drive=scsi-disk0,id=disk0,bootindex=1 -monitor stdio -vnc :10 -vga qxl 2.Boot guest with "strict=off",and bootindex=1 for scsi-hd disk ...-boot menu=on,strict=off ...bootindex=1... Resutls: After step1 ,guest only boot from the hard disk,not try other devices After step2, guest will try boot from hard disk,floppy,DVD/CD *Senario 2) 4 cases test Steps: 1.Boot guest with Case 1: -boot order="" Case 2: -boot once=a Case 3: -boot once=a,order=c Case 4: -boot once=a -boot once=b -boot once=c Results: Case 1)guest boot from floppy-->hard disk-->DVD/CD After reboot,boot from floppy-->hard disk--->DvD/CD Case 2)guest boot from floppy-->hard disk-->DVD/CD After reboot,boot from hard disk-->floppy-->DvD/CD Case 3)guet boot from floppy After reboot, boot from hard disk-->floppy-->DVD/CD Case 4)guest boot from hard disk -->floppy-->DVD/CD After reboot ,boot from hard disk--->floppy-->DVD/CD My CLI: /usr/libexec/qemu-kvm -boot menu=on,order="" -drive file=/home/test11.qcow2,if=none,media=disk,format=qcow2,rerror=stop,werror=stop,aio=native,id=scsi-disk0 -device virtio-scsi-pci,id=bus2,addr=0x7 -device scsi-hd,bus=bus2.0,drive=scsi-disk0,id=disk0 -monitor stdio -vnc :10 -vga qxl MY problems: 1)But test on old vesion,"qemu-kvm-1.5.3-35.el7.x86_64",i get the same results. 2)As you told me ,test on upstream qemu code #cd qemu #make #make check V=1 I can get the results: ... TEST: tests/boot-order-test... (pid=8221) /i386/boot-order/pc: OK PASS: tests/boot-order-test .. But on the lates version: qemu-kvm-1.5.3-41.el7.src.rpm, i can't found the file "boot-order-test.c".So how can i test the latest qemu version? (In reply to langfang from comment #12) > Test on latest version: > Host: > # uname -r > 3.10.0-64.el7.x86_64 > # rpm -q qemu-kvm > qemu-kvm-1.5.3-41.el7.x86_64 > #rpm -q seabios > seabios-1.7.2.2-9.el7.x86_64 > > *Senario 1) "stirct=on/off" test > > Steps: > 1.Boot guest with "strict=on",and bootindex=1 for scsi-hd disk > /usr/libexec/qemu-kvm -boot menu=on,strict=on -drive > file=/home/test11.qcow2,if=none,media=disk,format=qcow2,rerror=stop, > werror=stop,aio=native,id=scsi-disk0 -device > virtio-scsi-pci,id=bus2,addr=0x7 -device > scsi-hd,bus=bus2.0,drive=scsi-disk0,id=disk0,bootindex=1 -monitor stdio -vnc > :10 -vga qxl > > 2.Boot guest with "strict=off",and bootindex=1 for scsi-hd disk > ...-boot menu=on,strict=off ...bootindex=1... > > Resutls: > After step1 ,guest only boot from the hard disk,not try other devices > After step2, guest will try boot from hard disk,floppy,DVD/CD > > *Senario 2) 4 cases test > Steps: > 1.Boot guest with > Case 1: -boot order="" > Case 2: -boot once=a > Case 3: -boot once=a,order=c > Case 4: -boot once=a -boot once=b -boot once=c > > Results: > > Case 1)guest boot from floppy-->hard disk-->DVD/CD > After reboot,boot from floppy-->hard disk--->DvD/CD > > Case 2)guest boot from floppy-->hard disk-->DVD/CD > After reboot,boot from hard disk-->floppy-->DvD/CD > > Case 3)guet boot from floppy > After reboot, boot from hard disk-->floppy-->DVD/CD > > Case 4)guest boot from hard disk -->floppy-->DVD/CD > After reboot ,boot from hard disk--->floppy-->DVD/CD > > My CLI: /usr/libexec/qemu-kvm -boot menu=on,order="" -drive > file=/home/test11.qcow2,if=none,media=disk,format=qcow2,rerror=stop, > werror=stop,aio=native,id=scsi-disk0 -device > virtio-scsi-pci,id=bus2,addr=0x7 -device > scsi-hd,bus=bus2.0,drive=scsi-disk0,id=disk0 -monitor stdio -vnc :10 -vga qxl > > MY problems: > 1)But test on old vesion,"qemu-kvm-1.5.3-35.el7.x86_64",i get the same > results. Confirmed with QE, she got same result of "Senario 2) 4 cases test", it's expected. My patch just fixed the strict regression of Senario 1). > 2)As you told me ,test on upstream qemu code I didn't tell you this ;), moving needinfo to Markus > #cd qemu > #make > #make check V=1 > > I can get the results: > ... > TEST: tests/boot-order-test... (pid=8221) > /i386/boot-order/pc: OK > PASS: tests/boot-order-test > .. > But on the lates version: qemu-kvm-1.5.3-41.el7.src.rpm, i can't found the > file "boot-order-test.c".So how can i test the latest qemu version? The bug was fixed in qemu-kvm-1.5.3-12.el7. However, the fix was flawed, and that was fixed in qemu-kvm-1.5.3-36.el7. Therefore, you need to reproduce the bug (comment#8 case 1-4). with a version older than -12.el7. Please also reproduce the test case from comment#9. Both the old version (before flawed fix) and the latest version should behave as expected. For versions between the flawed fix and the followup fix (such as -12.el7), strict=on should have no effect (that's the bug introduced by the flawed fix in -12.el7). Hi Markus thanks for your reminder.Test again. Reproduce this bug as follow version: # uname -r 3.10.0-64.el7.x86_64 # rpm -q qemu-kvm qemu-kvm-1.5.3-11.el7.x86_64 # rpm -q seabios seabios-1.7.2.2-9.el7.x86_64 Steps: 1.Boot guest with Case 1: -boot order="" Case 2: -boot once=a Case 3: -boot once=a,order=c Case 4: -boot once=a -boot once=b -boot once=c Results: Case 1:guest boot from Hard disk -->floppy-->DVD/CD After reboot,boot from Hard disk-->floppy--->DvD/CD case 2:guest boot from floppy-->Hard disk--->DVD/CD After reboot,boot from floppy--->hard disk-->DvD/CD case 3:guest boot from floppy-->Hard disk--->DVD/CD After reboot,boot from Hard disk-->floppy--->DvD/CD ******the case 3 actual results not as same as the description in comment0 case 4:guest boot from floppy-->Hard disk--->DVD/CD After reboot,boot from floppy-->Hard disk--->DVD/CD *For "strict" problem,i can reproduce on version: qemu-kvm-1.5.3-35.el7.x86_64 Test on latest version: Host: # uname -r 3.10.0-64.el7.x86_64 # rpm -q qemu-kvm qemu-kvm-1.5.3-41.el7.x86_64 #rpm -q seabios seabios-1.7.2.2-9.el7.x86_64 *Senario 1) "stirct=on/off" test Steps: 1.Boot guest with "strict=on",and bootindex=1 for scsi-hd disk /usr/libexec/qemu-kvm -boot menu=on,strict=on -drive file=/home/test11.qcow2,if=none,media=disk,format=qcow2,rerror=stop,werror=stop,aio=native,id=scsi-disk0 -device virtio-scsi-pci,id=bus2,addr=0x7 -device scsi-hd,bus=bus2.0,drive=scsi-disk0,id=disk0,bootindex=1 -monitor stdio -vnc :10 -vga qxl 2.Boot guest with "strict=off",and bootindex=1 for scsi-hd disk ...-boot menu=on,strict=off ...bootindex=1... Resutls: After step1 ,guest only boot from the hard disk,not try other devices After step2, guest will try boot from hard disk,floppy,DVD/CD So the "strict" problem has been fixed. *Senario 2) 4 cases test Steps: 1.Boot guest with Case 1: -boot order="" Case 2: -boot once=a Case 3: -boot once=a,order=c Case 4: -boot once=a -boot once=b -boot once=c Results: Case 1)guest boot from floppy-->hard disk-->DVD/CD After reboot,boot from floppy-->hard disk--->DvD/CD Case 2)guest boot from floppy-->hard disk-->DVD/CD After reboot,boot from hard disk-->floppy-->DvD/CD Case 3)guet boot from floppy After reboot, boot from hard disk-->floppy-->DVD/CD Case 4)guest boot from hard disk -->floppy-->DVD/CD After reboot ,boot from hard disk--->floppy-->DVD/CD According to above test ,these are expected results, so this bug fixed. My problems: Hi,Markus Please help me check my case3 test on reproduce version? And another problem :As you told me ,i can test this bug on upstream qemu code #cd qemu #make #make check V=1 I can get the results: ... TEST: tests/boot-order-test... (pid=8221) /i386/boot-order/pc: OK PASS: tests/boot-order-test .. But on the lates version: qemu-kvm-1.5.3-41.el7.src.rpm, i can't found the file "boot-order-test.c".Could we can verify this bug as above tests? I'm afraid we don't package the tests. You'd have to run them in the exploded development tree. As mentioned before, the boot order requested by qemu-kvm from SeaBIOS can't be directly observed, only what SeaBIOS does. Could you additionally test cases 1-4 with strict=on? This could help me to make sense of your observations. Thanks Markus. Hi flang, Could you give a test and update the test result in the bz? Best Regards, Junyi I will remove the bug needinfo, because get the same results with "strict=on",please help me see comment15,thanks First, regarding "make check": rpm build runs it, so there's no need for QE to run it again. Sorry I didn't think of this earlier. Next, let me summarize your observations again. Case 1: -boot order="" 1st boot: fd, hd, cd 2nd boot: fd, hd, cd Case 2: -boot once=a 1st boot: fd, hd, cd 2nd boot: hd, fd, cd Case 3: -boot once=a,order=c 1st boot: fd 2nd boot: hd, fd, cd Case 4: -boot once=a -boot once=b -boot once=c 1st boot: hd, fd, cd 2nd boot: hd, fd, cd By X, Y, Z, I mean "try to boot from X, and if that fails, try to boot from Y, and if that fails, try to boot from Z", where "fails" means the boot sector cannot be read. For fd and cd, that's the case when the drive is empty. For hd, it's the case when the disk does not exist. Is this correct? Are you sure you really got just "fd" in case 3 1st boot? Finally, let's evaluate your observations. SeaBIOS constructs a boot order from several sources, including built-in defaults. One source is the RTC CMOS. What it gets from there is basically a tuple [B1, B2, B3, B4], where each Bi can be fd, cd, hd, bev or none. This defines boot priorities as follows. For all X != none, let i be the largest number so that Bi is X. If i exists, X's priority is 100 + i. Else it's 9999. Example: [fd, cd, hd, none] sets fd's priority to 101, cd's to 102, hd's to 103, and bev's to 9999. SeaBIOS adds the bootable devices it finds to a list sorted first by priority, then by other, SeaBIOS-defined criteria. It tries boot devices from this list in order. Boot orders occurring in the test cases, and the resulting SeaBIOS boot priorities: boot order fd cd hd bev notes "cad" 102 103 101 9999 qemu-kvm default "" 9999 9999 9999 9999 "a" or "b" 101 9999 9999 9999 "c" 9999 9999 101 9999 Effect on how SeaBIOS sorts its list of boot devices: boot order effect on list sorting "cad" hd before fd before cd before bev "" hd, fd, cd, bev in SeaBIOS-defined order "a" or "b" fd before (hd, cd, bev in SeaBIOS-defined order) "c" hd before (fd, cd, bev in SeaBIOS-defined order) Let's apply this to the test cases, ignoring bev, because we don't test that. Case 1: -boot order="" boot order expected order actual order okay? 1st: "" SeaBIOS-defined fd, hd, cd yes 2nd: "" same fd, hd, cd yes Case 2: -boot once=a boot order expected order actual order okay? 1st: "a" fd before (hd, cd) fd, hd, cd yes 2nd: "cad" hd before fd before cd hd, fd, cd yes Case 3: -boot once=a,order=c boot order expected order actual order okay? 1st: "a" fd before (hd, cd) fd NO! 2nd: "c" hd before (fd, cd) hd, fd, cd yes Case 4: -boot once=a -boot once=b -boot once=c boot order expected order actual order okay? 1st: "c" hd before (fd, cd) hd, fd, cd yes 2nd: "cad" hd before fd before cd hd, fd, cd yes Please have a second look at your testing of case 3. Hi,Markus Firstly,thanks very much for your help and your detail explanation. (In reply to Markus Armbruster from comment #19) > By X, Y, Z, I mean "try to boot from X, and if that fails, try to boot > from Y, and if that fails, try to boot from Z", where "fails" means > the boot sector cannot be read. For fd and cd, that's the case when > the drive is empty. For hd, it's the case when the disk does not > exist. > > Is this correct? Are you sure you really got just "fd" in case 3 1st > boot? > yes, please see CLI of my test: /usr/libexec/qemu-kvm -boot menu=on,strict=on -boot once=a,order=c -drive file=/root/test.qcow2,if=none,media=disk,format=qcow2,rerror=stop,werror=stop,aio=native,id=scsi-disk0 -device virtio-scsi-pci,id=bus2,addr=0x7 -device scsi-hd,bus=bus2.0,drive=scsi-disk0,id=disk0 -monitor stdio -vnc :10 -vga qxl For case3, the boot order not just "fd",the results is: Case 3: -boot once=a,order=c guest boot from floppy-->hard disk-->DVD/CD after reboot ,guest boot from hard disk--->floppy--->DVD/CD I understand you observe fd, hd, cd in case 3's first boot, which is consistent with what we expect. I think we're good. (In reply to Markus Armbruster from comment #21) > I understand you observe fd, hd, cd in case 3's first boot, which is > consistent with what we expect. I think we're good. Hi Markus Could we can verify this bug as above test . thanks fang lang I'm not sure what your question is. If you're asking whether I think we can flip the bug to VERIFIED, my answer is yes. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |