Bug 985761 - qemu should prompt error "block I/O error in device xxx: No space left on device" while install guest on unsufficient lvm space
qemu should prompt error "block I/O error in device xxx: No space left on dev...
Status: CLOSED WONTFIX
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: Markus Armbruster
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-18 04:07 EDT by lijin
Modified: 2014-07-16 10:29 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-16 10:29:15 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 lijin 2013-07-18 04:07:33 EDT
Description of problem:
In rhel7 host,while install guest on unsufficient lvm space,guest just hang and vm status is "paused (io-error)",qemu has no error prompt about "unsufficient space".

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 7.0 Beta (Maipo)
qemu-kvm-1.5.1-2.el7.x86_64
kernel-3.10.0-0.rc7.64.el7.x86_64
iscsi-initiator-utils-6.2.0.873-2.el7.x86_64
seabios-1.7.2.2-2.el7.x86_64
seavgabios-bin-1.7.2.2-2.el7.noarch
vgabios-0.6c-9.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.configure the iscsi-initiator on host.
2.create lvm on host.
    #fdisk -l     
    #fdisk /dev/sdb   --- -> new parition sdb1
    #partprobe
    #pvcreate /dev/sdb1
    #vgcreate vgtest /dev/sdb1
    #lvcreate -n lvtest -L 3G vgtest
3.qemu-img create -f qcow2 /dev/vgtest1/lvtest1 40G
4.then install win8-32 guest on it 
/usr/libexec/qemu-kvm   \
-drive file=en_windows_8_enterprise_x86_dvd_917587.iso,if=none,cache=unsafe,media=cdrom,format=raw,id=drive-ide0-0-0 \
-device ide-drive,id=ide0-0-0,drive=drive-ide0-0-0,bus=ide.0,unit=0,bootindex=0 \
-drive file=/dev/vgtest1/lvtest1,if=none,cache=unsafe,media=disk,format=qcow2,id=drive-ide0-0-1 \
-device ide-drive,id=ide0-0-1,drive=drive-ide0-0-1,bus=ide.0 \
-monitor unix:/tmp/ttt,server,nowait \
-vnc :2 -vga cirrus \
-usb \
-device usb-tablet,id=tablet1 \
-boot menu=on \
-chardev file,path=/root/console.log,id=serial1 \
-device isa-serial,chardev=serial1,id=s1 \
-cpu Penryn,+sep  -M pc \
-smp 2,cores=2,threads=1,sockets=1 -m 2G \
-enable-kvm \

Actual results:
(qemu) info status
VM status: paused (io-error)

But there is no error prompt about the unsufficient space

Expected results:
There should be an error prompt as:
"block I/O error in device 'drive-ide0-0-1': No space left on device (28)"


Additional info:
In rhel6.4 host,
1.(qemu) info status
  VM status: paused (io-error)
2.And at the same time,qemu prompt "block I/O error in device 'drive-ide0-0-1': No space left on device (28)"
Comment 2 Markus Armbruster 2013-09-12 09:01:42 EDT
Block devices can react to errors in four ways:

* "report": Report the error to the guest

* "stop": Pause the guest, and emit QMP event QEVENT_BLOCK_IO_ERROR

* "enospc": Like "stop" for ENOSPC errors, else like "report"

* "ignore": Ignore the error and try to continue

You configure the reaction with -drive option rerror for read errors
(default is rerror=report), and option werror for write errors
(default is werror=enospc).

Since your reproducer doesn't use option rerror or werror, you get the
defaults.  When the disk runs out of space, the guest should be
paused, and QEVENT_BLOCK_IO_ERROR emitted.  According to your report,
you observed the former.

I think your bug report basically is "let's report the stop in a
human-readable way in addition to the QMP event".  Is that correct?
Comment 3 lijin 2013-09-12 23:06:32 EDT
(In reply to Markus Armbruster from comment #2)
> Block devices can react to errors in four ways:
> 
> * "report": Report the error to the guest
> 
> * "stop": Pause the guest, and emit QMP event QEVENT_BLOCK_IO_ERROR
> 
> * "enospc": Like "stop" for ENOSPC errors, else like "report"
> 
> * "ignore": Ignore the error and try to continue
> 
> You configure the reaction with -drive option rerror for read errors
> (default is rerror=report), and option werror for write errors
> (default is werror=enospc).
> 
> Since your reproducer doesn't use option rerror or werror, you get the
> defaults.  When the disk runs out of space, the guest should be
> paused, and QEVENT_BLOCK_IO_ERROR emitted.  According to your report,
> you observed the former.
> 
> I think your bug report basically is "let's report the stop in a
> human-readable way in addition to the QMP event".  Is that correct?

Markus,Yes.
And thanks a lot.
Comment 5 Markus Armbruster 2014-07-16 10:29:15 EDT
Providing an anynchronous notification of (selected) QAPI events in HMP in addition to QMP should be possible, but since it required quite a bit of work, and HMP isn't supported in RHEL, I can't justify doing it on the company's dime.  Closing WONTFIX.  If you disagree with my assessment, please reopen the bug stating your reasons.

Related bug 1117445 is about the QMP events.  It involves extending QMP's query-block to carry error information.  Could be made visible in HMP's "info block", too.  Feel free to ask for it in that bug.

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