Red Hat Bugzilla – Bug 796011
Prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is not the same as expected
Last modified: 2013-11-21 00:44:03 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:
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.
- 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.
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