Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 812085

Summary: use the name block-job-cancel to indicate async cancel support
Product: Red Hat Enterprise Linux 6 Reporter: Eric Blake <eblake>
Component: qemu-kvmAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: abaron, acathrow, ajia, areis, bazulay, berrange, bsarathy, bugproxy, djuran, dyasny, eblake, fosborne, gcosta, iheim, juzhang, kirbyzhou, michen, mkenneth, mzhan, pbonzini, rwu, shu, sluo, syeghiay, tburke, virt-maint, wdai, weizhan, whuang
Target Milestone: rc   
Target Release: 6.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.278.el6 Doc Type: Bug Fix
Doc Text:
No documentation needed
Story Points: ---
Clone Of: 582475
: 813953 (view as bug list) Environment:
Last Closed: 2012-06-20 11:46:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 582475, 783950    
Bug Blocks: 525307, 580954, 638506, 638508, 638509, 748534, 756082, 769496, 786141, 799055, 802284, 806280, 806432, 811683, 813953, 815791, 830861, 831532, 835344, 835345, 835722, 865384    

Comment 3 Eric Blake 2012-04-12 21:55:12 UTC
Per the upstream patch, libvirt expects that all three commands are changed as a group.  Either we have the old synchronous cancel interface with no partial streaming:

block_job_set_speed
block_job_cancel
block_stream

or we have the new asynchronous cancel interface and partial streaming:

block-job-set-speed
block-job-cancel
block-stream

Comment 5 Eric Blake 2012-04-18 17:03:53 UTC
Upstream raised another issue where a semantic difference would be desirable:

https://lists.gnu.org/archive/html/qemu-devel/2012-04/msg02273.html

If upstream indeed goes with block-job-set-speed being callable at any time, and not just when a block job is active, then this semantic change from block_job_set_speed would be another thing that libvirt would like to differentiate on based on the spelling of the monitor command.  I'm not sure whether to clone this into another BZ, but it should be fixed before both qemu 1.1 and RHEL 6.3 if we decide to go with this semantic change, to make libvirt's life easier.  (I suppose that libvirt could blindly try to set speed in advance, and fall back to setting it after the job, as a mitigation if we cannot rely on the spelling of the command to tell the difference).

Comment 9 Dor Laor 2012-04-22 11:32:44 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 10 daiwei 2012-04-26 08:00:39 UTC
Verified this issue with steps and environment as follows:

# uname -r;rpm -q qemu-kvm-rhev
2.6.32-262.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.282.el6.x86_64

Test both HMP and QMP , command works fine.

HMP:

(qemu) snapshot_blkdev drive-virtio-disk0 /root/sn1 qcow2
(qemu) block-stream drive-virtio-disk0
(qemu) block-job-set-speed drive-virtio-disk0 200M
(qemu) info block-jobs
Streaming device drive-virtio-disk0: Completed 679477248 of 21474836480 bytes, speed limit 209715200 bytes/s
(qemu) block-job-cancel drive-virtio-disk0
(qemu) info block-jobs
No active jobs

QMP:


{ 'execute' : 'qmp_capabilities' }
{"return": {}}
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0","snapshot-file":"/root/sn1","format": "qcow2" } }
{"return": {}}
{ "execute": "block-stream", "arguments": { "device": "drive-virtio-disk0" } }
{"return": {}}
{ "execute": "block-job-set-speed", "arguments": { "device": "drive-virtio-disk0", "value": 1024 } }
{"return": {}}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"device": "drive-virtio-disk0", "len": 21474836480, "offset": 605028352, "speed": 1024, "type": "stream"}]}
{ "execute": "block-job-cancel", "arguments": { "device": "drive-virtio-disk0" } }
{"timestamp": {"seconds": 1335426669, "microseconds": 715579}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drive-virtio-disk0", "len": 21474836480, "offset": 656932864, "speed": 1024, "type": "stream"}}
{"return": {}}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": []}

So, this bug has been fixed.

Comment 12 errata-xmlrpc 2012-06-20 11:46:31 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