Bug 845462 - shoud not hotplug not exist virtio storage on qemu
shoud not hotplug not exist virtio storage on qemu
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.9
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-03 03:12 EDT by langfang
Modified: 2012-08-12 03:52 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-08 13:56:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description langfang 2012-08-03 03:12:43 EDT
Description of problem:

should not hotplug a not exist img to guest .

Version-Release number of selected component (if applicable):
host:
# uname -r
2.6.18-333.el5
#rpm -q kvm
kvm-83-258.el5
 
guest:
# uname -r
2.6.18-333.el5

How reproducible:
100%

Steps to Reproduce:
1.boot guest 
CLI:/usr/libexec/qemu-kvm -m 2G -smp 2 -cpu qemu64,+sse2 -drive file=/home/111.raw,format=raw,media=disk,if=virtio,cache=none,werror=stop,boot=on -net nic,model=virtio,macaddr=04:24:21:78:B7:97,vlan=0 -net tap,sndbuf=0,vlan=0,script=/etc/qemu-ifup,downscript=no -uuid 52879ba5-6819-47f4-8bb5-851043730461 -vnc :10 -boot nc -usbdevice tablet -no-hpet -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio  -boot c -balloon virtio  -drive file=/dev/cdrom,media=cdrom,if=ide -drive file=/home/floppy.img,if=floppy -drive file=/tmp/test.img,media=disk,if=virtio,cache=off,format=raw,werror=stop


(qemu)info block
virtio0: type=hd removable=0 file=/home/111.raw ro=0 drv=raw encrypted=0
ide0-cd0: type=cdrom removable=1 locked=0 file=/dev/cdrom ro=1 drv=host_device encrypted=0
floppy0: type=floppy removable=1 locked=0 file=/home/floppy.img ro=0 drv=raw encrypted=0
virtio1: type=hd removable=0 file=/tmp/test.img ro=0 drv=raw encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]

2.hotplug another not exist virtio storage to guest 
(qemu)pci_add pci_addr=auto storage file=/home/img-copy1.qcow2,if=virtio
qemu: could not open disk image /home/img-copy1.qcow2
failed to add file=/home/img-copy1.qcow2,if=virtio


3.results:
(qemu) info block
virtio0: type=hd removable=0 file=/home/111.raw ro=0 drv=raw encrypted=0
ide0-cd0: type=cdrom removable=1 locked=0 file=/dev/cdrom ro=1 drv=host_device encrypted=0
floppy0: type=floppy removable=1 locked=0 file=/home/floppy.img ro=0 drv=raw encrypted=0
virtio1: type=hd removable=0 file=/tmp/test.img ro=0 drv=raw encrypted=0
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]
virtio2: type=hd removable=0 [not inserted]

  
Actual results:
add virtio storage "virtio2",but in guest run " #fdisk -l ",can not see this blk

Expected results:

when add not exist img ,will report error like above ,but not add in qemu

Additional info:
Comment 1 langfang 2012-08-08 04:18:28 EDT
test the steps as same as description:

hotplug not exitst file about 30 times on qemu:

(qemu)pci_add pci_addr=auto storage file=/home/2222.img,if=virtio


results:

(qemu) pci_add pci_addr=auto storage file=/home/2222.img,if=virtio
qemu: could not open disk image /home/2222.img
failed to add file=/home/2222.img,if=virtio
(qemu) 
Program received signal SIGSEGV, Segmentation fault.
qemu_get_clock (clock=0x8200000001) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:1310
1310	    switch(clock->type) {
(gdb) bt
#0  qemu_get_clock (clock=0x8200000001) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:1310
#1  0x0000000000409505 in main_loop_wait (timeout=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:4134
#2  0x00000000005013ca in kvm_main_loop () at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/qemu-kvm.c:596
#3  0x000000000040e747 in main_loop (argc=32, argv=0x7fffffffe718, envp=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:4157
#4  main (argc=32, argv=0x7fffffffe718, envp=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:6559
(gdb)
Comment 2 langfang 2012-08-08 04:52:57 EDT
test this probelm on rhel6.3 host

host:
# uname -r
2.6.32-288.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.299.el6.x86_64

guest:
# uname -r
2.6.18-333.el5


1.boot a guest
2.hotplug a non-exist file 
(qemu)info block
drive-ide0-0-0: removable=0 io-status=ok file=/mnt/111.raw ro=0 drv=raw encrypted=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu)__com.redhat_drive_add file=/root/rhel6.4,id=test1
could not open disk image /root/rhel6.4: No such file or directory
Device 'test1' could not be initialized
(qemu) info block
drive-ide0-0-0: removable=0 io-status=ok file=/mnt/111.raw ro=0 drv=raw encrypted=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]



results:when hotplug a non-exist file ,the give friendly tip,and also not add on qemu.
Comment 3 Ronen Hod 2012-08-08 13:56:34 EDT
Closing as WONTFIX.
- Most, if not all, our customers use RHEV, or their own management software, so they do not run into these situations.
- There is no crash or data corruption, hence there is no real damage.
- We will wait for a customer report.
Thanks, Ronen.
Comment 4 Suqin Huang 2012-08-10 03:17:24 EDT
(In reply to comment #3)
> Closing as WONTFIX.
> - Most, if not all, our customers use RHEV, or their own management
> software, so they do not run into these situations.
> - There is no crash or data corruption, hence there is no real damage.


Hi ronen,

guest will reboot when hotplug more than 30 non-existing disk.

it make this bug more serious

Thanks
Suqin


> - We will wait for a customer report.
> Thanks, Ronen.

Note You need to log in before you can comment on or make changes to this bug.