Bug 970525 - qemu-kvm didnt raise block I/O error when NFS down (img on NFS)
qemu-kvm didnt raise block I/O error when NFS down (img on NFS)
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-04 05:08 EDT by Xiaoqing Wei
Modified: 2015-09-03 11:37 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-05 08:06:43 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 Xiaoqing Wei 2013-06-04 05:08:25 EDT
Description of problem:

qemu-kvm didnt raise block I/O error when NFS down (img on NFS)

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.0-2.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64
other components from 20130522.0

How reproducible:
4/4

Steps to Reproduce:
1.boot a vm w/ 2 img, one on local fs, and one on NFS mount
qemu-kvm -monitor stdio    -S \
    -name 'vm1' \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20130530-191349-ZMSDl1gm,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130530-191349-ZMSDl1gm,server,nowait \
    -device isa-serial,chardev=serial_id_serial1 \
    -chardev socket,id=seabioslog_id_20130530-191349-ZMSDl1gm,path=/tmp/seabios-20130530-191349-ZMSDl1gm,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20130530-191349-ZMSDl1gm,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -drive file='/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.0-64.qcow2',if=none,id=drive-ide0-0-0,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0 \
    -device rtl8139,netdev=idIg594w,mac=9a:3b:3c:3d:3e:3f,bus=pci.0,addr=0x3,id='idCSLDpm' \
    -netdev tap,id=idIg594w \
    -m 4096 \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
    -cpu 'SandyBridge' \
    -M pc \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -vnc :0 \
    -vga cirrus \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off   \
    -no-kvm-pit-reinjection \
    -enable-kvm  \
    -drive file='/media/qcow3-over-nfs.qcow2',if=none,id=drive-ide0-0-1,media=disk,cache=none,werror=stop,snapshot=off,format=qcow2,aio=native \
    -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1 \

 mount -l | grep media
10.66.9.255:/home on /media type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.106.40,local_lock=none,addr=10.66.9.255)
2. on NFS server:
either 1) iptables -t filter -A INPUT -s ip_of_kvm_host -m state --state NEW -p tcp --dport 2049 -j REJECT
or     2) ifconfig eth0 down

3. wait for qemu-kvm to freeze

Actual results:

qemu-kvm would freeze after a while
but not any error msg from monitor

Expected results:
on rhel6 host, do same test,
error would raised from monitor, 
and btw, the freeze of qemu comes much more quick then on rhel7 host.

block I/O error in device 'drive-ide0-0-1': Input/output error (5)

Additional info:
Comment 3 Sibiao Luo 2013-06-04 05:28:45 EDT
(In reply to Xiaoqing Wei from comment #0)
>     -drive
> file='/media/qcow3-over-nfs.qcow2',if=none,id=drive-ide0-0-1,media=disk,
> cache=none,werror=stop,snapshot=off,format=qcow2,aio=native \
>     -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1 \
> 
IIRC, IDE donot support 'rerror=stop and werror=stop'.
Comment 4 Kevin Wolf 2013-06-05 08:06:43 EDT
(In reply to Xiaoqing Wei from comment #0)
>  mount -l | grep media
> 10.66.9.255:/home on /media type nfs4
> (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,
> port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.106.40,local_lock=none,
> addr=10.66.9.255)

With the 'hard' mount option, I/O requests will never fail. See the man page:

"soft / hard: Determines the recovery behavior of the NFS client after an NFS
request times out. If neither option is specified (or if the hard option is
specified), NFS requests are retried indefinitely."

This is expected behaviour.
Comment 5 xu 2013-07-31 05:32:13 EDT
(In reply to Kevin Wolf from comment #4)
> (In reply to Xiaoqing Wei from comment #0)
> >  mount -l | grep media
> > 10.66.9.255:/home on /media type nfs4
> > (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,
> > port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.106.40,local_lock=none,
> > addr=10.66.9.255)
> 
> With the 'hard' mount option, I/O requests will never fail. See the man page:
> 
> "soft / hard: Determines the recovery behavior of the NFS client after an NFS
> request times out. If neither option is specified (or if the hard option is
> specified), NFS requests are retried indefinitely."
> 
> This is expected behaviour.

So if we mount nfs with "-o soft" werror action should work in qemu IDE block device, I'm a right?

Thanks,
Xu

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