Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 796011 - Prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is not the same as expected
Prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is not the same a...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-21 21:47 EST by Sibiao Luo
Modified: 2013-11-21 00:44 EST (History)
19 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.367.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 00:44:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 16:40:29 EST

  None (edit)
Description Sibiao Luo 2012-02-21 21:47:06 EST
Description of problem:
Add blkdebug events to qcow2 to allow injecting I/O errors by using configure blkdebug file, but the prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is not the same as expected.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-235.el6.x86_64
qemu-kvm-0.12.1.2-2.231.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.configure blkdebug file and store it on the specific location.
# cat /home/blkdebug.cfg
[inject-error]
event = "cluster_free"
#errno = "5"
errno = "28"
immediately = "off"
2.create qcow2 image with small cluster size, e.g sluo_test.qcow2.
# qemu-img create -f qcow2 -o cluster_size=512 sluo_test.qcow2 10G
3.create internal snapshot.
# qemu-img snapshot -c sluo_snap sluo_test.qcow2
4.lists all the snapshots in the sluo_test.qcow2 image.
# qemu-img snapshot -l sluo_test.qcow2
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         sluo_snap                 0 2012-02-22 18:18:52   00:00:00.000
5.trigger blkdebug: BLKDBG_CLUSTER_FREE event and prompt error.
# qemu-img snapshot -d sluo_snap blkdebug:/home/blkdebug.cfg:/home/sluo_test.qcow2
6.run perror $errno.

Actual results:
after the step 5.
# qemu-img snapshot -d sluo_snap blkdebug:/home/blkdebug.cfg:/home/sluo_test.qcow2
qcow2_free_clusters failed: No space left on device
qemu-img: Could not delete snapshot 'sluo_snap': -1 (Operation not permitted)
after the step 6.
# perror 28
OS error code  28:  No space left on device

Expected results:
the prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event should the same as expected(run perror $errno).

Additional info:
Comment 2 Kevin Wolf 2012-03-02 10:02:21 EST
In short: Somewhere in the call path of the snapshot functions, someone returns -1 instead of the real error code. Need to debug which one it is.
Comment 12 Sibiao Luo 2013-06-24 05:50:56 EDT
- Verify this issue:
host info:
kernel-2.6.32-382.el6.x86_64
qemu-kvm-0.12.1.2-2.375.el6.x86_64

Steps and Results:
1.configure blkdebug file and store it on the specific location.
# cat /home/blkdebug.cfg
[inject-error]
event = "cluster_free"
#errno = "5"
errno = "28"
immediately = "off"
2.create qcow2 image with small cluster size, e.g sluo_test.qcow2.
# qemu-img create -f qcow2 -o cluster_size=512 sluo_test.qcow2 10G
3.create internal snapshot.
# qemu-img snapshot -c sluo_snap sluo_test.qcow2
4.lists all the snapshots in the sluo_test.qcow2 image.
# qemu-img snapshot -l sluo_test.qcow2
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         sluo_snap                 0 2013-06-24 17:41:53   00:00:00.000
5.trigger blkdebug: BLKDBG_CLUSTER_FREE event and prompt error.
# qemu-img snapshot -d sluo_snap blkdebug:/home/blkdebug.cfg:/home/sluo_test.qcow2
qcow2_free_clusters failed: No space left on device
Could not delete snapshot 'sluo_snap': -28 (No space left on device)
6.run perror $errno.
# perror 28
OS error code  28:  No space left on device

The prompt error return from trigger blkdebug: BLKDBG_CLUSTER_FREE event(step5) is same as expected(step6).

Base on above, this bug has been fixed correctly. Set this bug to VERIDIED status, please correct me if any mistake.
Comment 16 errata-xmlrpc 2013-11-21 00:44:03 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/RHSA-2013-1553.html

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