Bug 908796 - Redundant BLOCK_JOB_ERROR with action "stop"
Redundant BLOCK_JOB_ERROR with action "stop"
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Hai Huang
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-07 09:52 EST by Shaolong Hu
Modified: 2013-08-08 14:06 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-08 14:06:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shaolong Hu 2013-02-07 09:52:15 EST
Description of problem:
------------------------
block stream "on-error" option fails to work.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
qemu 1.3


How reproducible:
------------------
1/1


Steps to Reproduce:
--------------------------------
1. mount nfs:
mount -o rw,soft,timeo=60,retrans=3,nosharecache,vers=3 10.66.7.62:/nfs /root/nfs

2. stream to nfs, then stop nfs server

{ 'execute': 'block-stream',
  'arguments': { 'device': 'drive-virtio-disk0', 'speed': 1000000000,
            'on-error': 'enospc' } }
{"return": {}}

{"timestamp": {"seconds": 1360241454, "microseconds": 394338}, "event": "BLOCK_IO_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1360241454, "microseconds": 395201}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "read", "action": "report"}}
{"timestamp": {"seconds": 1360241454, "microseconds": 395369}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-virtio-disk0", "len": 21474836480, "offset": 2097152, "speed": 1000000000, "type": "stream", "error": "Input/output error"}}
{"timestamp": {"seconds": 1360241526, "microseconds": 586247}, "event": "STOP"}


BLOCK_JOB_ERROR "action" is "report", it should be "enospc"
  

Additional info:
---------------------------------------------
try with block mirror, it works correctly:

{ 'execute': 'drive-mirror',
  'arguments': { 'device': 'drive-virtio-disk0', 'target': '/root/nfs/sn1', 'format': 'qcow2',
            'sync': 'full', 'mode': 'absolute-paths',
            'speed': 1000000000, 'on-source-error': 'stop',
            'on-target-error': 'stop' } }
{"return": {}}
{"timestamp": {"seconds": 1360248194, "microseconds": 106349}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
Comment 2 Shaolong Hu 2013-03-14 23:14:56 EDT
Investigate further with this on-error option, i understood it wrong in the first time, "enospc" behaves "same as @stop on ENOSPC, same as @report otherwise", so in comment 0, action is "report" is as expected, for i trigger the error by stop nfs server, i test it with mirroring to no enough space target, it stops job correctly, however, in the first time, there are lots events instead of one:

{"timestamp": {"seconds": 1363315968, "microseconds": 127418}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315968, "microseconds": 293949}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315968, "microseconds": 493834}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315968, "microseconds": 677093}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315968, "microseconds": 843698}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315969, "microseconds": 10297}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315969, "microseconds": 176868}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315969, "microseconds": 468344}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315969, "microseconds": 776490}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315969, "microseconds": 992973}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}
{"timestamp": {"seconds": 1363315970, "microseconds": 151222}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}


after i manually resume the job (there is still no enough space), the job stops immediately as expected again, this time, only one event in QMP:

{"timestamp": {"seconds": 1363316124, "microseconds": 612830}, "event": "BLOCK_JOB_ERROR", "data": {"device": "drive-virtio-disk0", "operation": "write", "action": "stop"}}


Based on above results, i would like to change the subject of this bug to eliminate redundant event, if this is as expected or no need to be fixed, feel free to close.

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