Bug 1420214 - To live commit to non-enough space storage shows the block job has completed
Summary: To live commit to non-enough space storage shows the block job has completed
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: John Snow
QA Contact: Qianqian Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-08 08:05 UTC by Donghui Huang
Modified: 2017-05-12 16:39 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-12 01:58:52 UTC
Target Upstream Version:


Attachments (Terms of Use)
the actual results (50.42 KB, image/png)
2017-02-08 08:05 UTC, Donghui Huang
no flags Details

Description Donghui Huang 2017-02-08 08:05:44 UTC
Created attachment 1248556 [details]
the actual results

Description of problem:
1.To live commit to non-enough space storage shows the block job has completed, but actually not.
2.QMP returns block_job_error during live commit, but finally it returns block_job_completed.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.8.0-1.el7.x86_64
3.10.0-546.rt56.453.el7.x86_64

How reproducible:
100%
Steps to Reproduce:
1./usr/libexec/qemu-kvm  
     -drive file=/home/image/rhel7.4.qcow2,format=qcow2,if=none,id=drive-virtio-disk0,werror=stop,rerror=stop 
     -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0  
     -qmp tcp:localhost:4444,server 
     -monitor stdio -net tap 
     -net nic  
     -smp 4 
     -m 2048
2.{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0", "snapshot-file": "/root/temp/sn1", "format": "qcow2" } }
   NOTE:/root/temp is mounted, whose total size is 1G.
3.{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0", "snapshot-file": "/root/sn2", "format": "qcow2" } }
4.dd if=/dev/urandom of=bigfile bs=1M count=2000
   NOTE:run this command in guest
5.{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0", "snapshot-file": "/root/sn2", "format": "qcow2" } 

Actual results:
QMP returns BLOCK_JOB_COMPLETED

Expected results:
QMP returns BLOCK_JOB_CANCELED

Additional info:
refer to the attachment for error details

Comment 1 Donghui Huang 2017-02-08 08:19:50 UTC
Steps to Reproduce:
  5.{ "execute": "block-commit", "arguments": { "device": "drive-virtio-disk0", "base": "/root/temp/sn1", "top": "/root/sn2", "speed": 1000000000 } 

NOTE: i made a mistake, the right command as above

Comment 3 John Snow 2017-05-11 22:20:34 UTC
Wait, "CANCELED" is only applicable to jobs that have been manually canceled, not jobs that encounter error.

I went to reproduce and I indeed get the expected events:

{u'timestamp': {u'seconds': 1494540938, u'microseconds': 740533}, u'data': {u'device': u'sda', u'action': u'report', u'operation': u'write'}, u'event': u'BLOCK_JOB_ERROR'}

{u'timestamp': {u'seconds': 1494540938, u'microseconds': 742336}, u'data': {u'speed': 0, u'offset': 1994063872, u'len': 2391212032, u'error': u'No space left on device', u'device': u'sda', u'type': u'commit'}, u'event': u'BLOCK_JOB_COMPLETED'}



If the COMPLETED event you received has the error field set, this is NOTABUG.

Comment 4 Qianqian Zhu 2017-05-12 01:58:52 UTC
Yes, this is NOTABUG.

Our test case expectation does not accurate, I will modify it.

Comment 5 John Snow 2017-05-12 16:39:02 UTC
Thank you! :)


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