RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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
Summary: qemu should prompt error "block I/O error in device xxx: No space left on dev...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-18 08:07 UTC by lijin
Modified: 2014-07-16 14:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-16 14:29:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lijin 2013-07-18 08:07:33 UTC
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 13:01:42 UTC
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-13 03:06:32 UTC
(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 14:29:15 UTC
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.