Bug 849657 - scsi devices see an unit attention condition on migration
scsi devices see an unit attention condition on migration
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-20 09:43 EDT by Gerd Hoffmann
Modified: 2013-02-21 02:38 EST (History)
11 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.320.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:38:37 EST
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 Gerd Hoffmann 2012-08-20 09:43:03 EDT
Description of problem:
All scsi devices are affected.
Most visible with removable scsi disks (or usb sticks) as linux guests will rescan the partition table then.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.303 (+ usb live migration patch series)

How reproducible:
100%

Steps to Reproduce:
1. boot guest with -device usb-storage,drive=$something,removable=on.
   [ virtio-scsi + scsi-hd should shoow this too ]
2. migrate guest.
  
Actual results:
Guest revalidates disk (linux kernel logs a line listing the partitions on disk).

Expected results:
Guest doesn't notice it got migrated.

Additional info:
triggered by drives_reopen()
Comment 2 Gerd Hoffmann 2012-08-20 10:26:14 EDT
patches posted.
Comment 7 Sibiao Luo 2012-10-12 04:21:16 EDT
(In reply to comment #0)
> Description of problem:
> All scsi devices are affected.
> Most visible with removable scsi disks (or usb sticks) as linux guests will
> rescan the partition table then.
> 
> Version-Release number of selected component (if applicable):
> qemu-kvm-0.12.1.2-2.303 (+ usb live migration patch series)
> 
> 
> Steps to Reproduce:
> 1. boot guest with -device usb-storage,drive=$something,removable=on.
>    [ virtio-scsi + scsi-hd should shoow this too ]
> 2. migrate guest.
>   
> Actual results:
> Guest revalidates disk (linux kernel logs a line listing the partitions on
> disk).
> 

hi Gerd,

   I tried to reproduce this issue with your indication, but get nothing from guest dmesg, the linux guests didnot rescan the partition table. Gerd, could you help me check my steps and show me details or give some tips. thx.

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-325.el6.x86_64
qemu-kvm-0.12.1.2-2.320.el6.x86_64
guest info:
rhel6.3 GA 64bit.

Steps:
1.boot a guest in src with -device usb-storage,drive=$something,removable=on.
eg: ...-drive file=/mnt/usb-storage,if=none,id=storage,media=disk,cache=none,format=qcow2 -device usb-storage,drive=storage,removable=on,id=usb-storage
2.# dmesg -c in guest.
3.do migrate from src to dest.
4.# dmesg in guest.

Results:
I got nothing from kernel logs. 
I tried to format the disk, but no effects. 
I also tried the virtio-scsi + scsi-hd, it also got nothing from kernel log.

Thanks.
sluo
Comment 8 Gerd Hoffmann 2012-10-12 04:45:16 EDT
I've seens this with a Fedora 17 guest, maybe RHEL-6.3 behaves in a different way.
Comment 9 Sibiao Luo 2012-10-12 04:49:19 EDT
(In reply to comment #8)
> I've seens this with a Fedora 17 guest, maybe RHEL-6.3 behaves in a
> different way.

Ok, I will try fedora 17 guest, thanks for your reminds.
Comment 10 Sibiao Luo 2012-10-12 07:43:27 EDT
(In reply to comment #8)
> I've seens this with a Fedora 17 guest, maybe RHEL-6.3 behaves in a
> different way.



I have tried the Fedora 17 64bit guest with the same steps as comment #7 using virtio-scsi + scsi-hd, it still fail to reproduce, got nothing from kernel log.

btw, I use the '-device usb-storage,drive=$something,removable=on' with the Fedora 17 64bit guest, it fail to migrate. I donot know whether is a new bug, how about your opinion ?
(qemu) migrate -d tcp:$ip_addr:$port
state blocked by non-migratable device '0000:00:01.2/2.1/usb-storage'

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-325.el6.x86_64
qemu-kvm-0.12.1.2-2.310.el6.x86_64

My cli:
# /usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -usb -device usb-tablet,id=input0 -name sluo_test -uuid `uuidgen` -drive file=/mnt/Fedora-17-x86_64.qcow2,format=qcow2,if=none,id=drive-disk,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-disk,id=scsi_image,bootindex=1 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=virtio-net-pci0,mac=05:1a:4a:02:0b:11,bus=pci.0,bootindex=3 -device virtio-balloon-pci,id=balloon0,bus=pci.0 -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -boot menu=on -monitor stdio -drive file=/mnt/usb-storage,if=none,id=storage,media=disk,cache=none,format=qcow2 -device usb-storage,drive=storage,removable=on,id=usb-storage

Gerd, could you help me see it and give some tips. thx.
Comment 11 Gerd Hoffmann 2012-10-12 08:20:18 EDT
RHEL-6.3 GA doesn't support live migration with usb-storage.

usb-storage (and ehci) live migration was added in qemu-kvm-0.12.1.2-2.312.el6
this bug was fixed in qemu-kvm-0.12.1.2-2.314.el6

So with qemu-kvm-0.12.1.2-2.312.el6 and qemu-kvm-0.12.1.2-2.313.el6 you should see the broken behavior.
Comment 12 Sibiao Luo 2012-10-14 22:45:44 EDT
Reproduce this issue on Fedora 17 64bit guest with the same steps as comment #0 using usb live migration, linux guests will rescan the partition table which we can got from kernel log.

Host info:
# uname -r && rpm -q qemu-kvm
2.6.32-325.el6.x86_64
qemu-kvm-0.12.1.2-2.313.el6.x86_64
Guest info:
Fedora 17 64bit

Steps to Reproduce:
1.boot a guest in src with -device usb-storage,drive=$something,removable=on.
eg:...-boot menu=on -monitor stdio -readconfig /mnt/ich9-ehci-uhci.cfg -drive file=/mnt/usb-storage,if=none,id=storage,media=disk,cache=none,format=qcow2 -device usb-storage,drive=storage,removable=on,id=usb-storage
2.# dmesg -c in guest.
3.do migrate from src to dest.
4.# dmesg in guest.

Results of reproduce:
after steps 4, after live migrate, got log form guest kernel,
# dmesg 
[   90.109415] hrtimer: interrupt took 2999909 ns
[  108.667213]  sda: unknown partition table

Verify this issue with the same steps as reproduce.
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-328.el6.x86_64
qemu-kvm-0.12.1.2-2.320.el6.x86_64
Guest info:
Fedora 17 64bit

Results of verify:
got nothing for guest kernel, did not see the broken behavior. so, the linux guests do not need to rescan the partition table.

Base on above, this issue has been fixed correctly.

Best Regards.
sluo
Comment 14 errata-xmlrpc 2013-02-21 02:38:37 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0527.html

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