Bug 796011 - Prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is not the same as expected
Summary: Prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is not the same a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-22 02:47 UTC by Sibiao Luo
Modified: 2013-11-21 05:44 UTC (History)
19 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.367.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 05:44:03 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 21:40:29 UTC

Description Sibiao Luo 2012-02-22 02:47:06 UTC
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 15:02:21 UTC
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 09:50:56 UTC
- 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 05:44:03 UTC
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.