Bug 797186 - QMP: Backport the I/O status feature
Summary: QMP: Backport the I/O status feature
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luiz Capitulino
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 746909
TreeView+ depends on / blocked
 
Reported: 2012-02-24 13:40 UTC by Luiz Capitulino
Modified: 2012-06-20 11:43 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.234.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 11:43:55 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0746 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2012-06-19 19:31:48 UTC

Description Luiz Capitulino 2012-02-24 13:40:52 UTC
The I/O status feature allows a management application to known which block device is on an error state when the VM enters into io-error state.

This feature was developed in conjunction with the VM state feature (bug 617889) and was supposed to be backported at the same time. However, due to upstream delay and other problems, it was forgotten.

The I/O status feature is implemented by upstream (qemu.git) commits: 449c184ed23c6238da7fcc8b965c8fcc865d72a9..d2078cc238ae30956f9ec74e656323e701937b4e.

Comment 4 Chao Yang 2012-04-06 06:23:30 UTC
There are three possible status: BDRV_IOS_OK (no error), BDRV_IOS_ENOSPC (no space error) and BDRV_IOS_FAILED (any other error). Three types of interface: virtio-blk-pci, ide, virtio-scsi. QMP command: {"execute": "query-block"}

Steps:
{"execute": "query-block"}

--- Reproduced with qemu-kvm-0.12.1.2-2.209.el6.x86_64
Actual Result:
No "io-status" returned by query-block.
{"return": [{"device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}

--- Verified with qemu-kvm-0.12.1.2-2.269.el6.x86_64

virtio-blk-pci:
---------------
1. BDRV_IOS_OK
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
2. BDRV_IOS_ENOSPC
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
3. BDRV_IOS_FAILED
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
CLI:
... -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop  -device virtio-blk-pci,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait

ide-drive:
----------
1. BDRV_IOS_OK
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
2. BDRV_IOS_ENOSPC
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
3. BDRV_IOS_FAILED
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
CLI:
...  -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop  -device ide-drive,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait

virtio-scsi(scsi-block,scsi-hd,scsi-disk):    
------------------------------------------
1. BDRV_IOS_OK
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "raw", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
2. BDRV_IOS_ENOSPC
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
3. BDRV_IOS_FAILED
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "raw", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}

CLI:
... -device virtio-scsi-pci,id=scsi-pci -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop  -device scsi-hd,bus=scsi-pci.0,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait

usb-storage:
-------------
1. BDRV_IOS_OK
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
2. BDRV_IOS_ENOSPC
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
3. BDRV_IOS_FAILED
{"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]}
CLI:
... -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop  -device usb-storage,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait


--- Conclusion:
As per above, this issue has been fixed.

Comment 6 Luiz Capitulino 2012-04-23 18:42:34 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 7 errata-xmlrpc 2012-06-20 11:43:55 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/RHBA-2012-0746.html


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