Bug 1572856
Summary: | 'block-job-cancel' can not cancel a "drive-mirror" job | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Yanan Fu <yfu> | |
Component: | qemu-kvm-rhev | Assignee: | Hanna Czenczek <hreitz> | |
Status: | CLOSED ERRATA | QA Contact: | Gu Nini <ngu> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 7.6 | CC: | chayang, juzhang, knoel, michen, ngu, qizhu, qzhang, virt-maint, xianwang, xuma, yfu | |
Target Milestone: | rc | Keywords: | Regression | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | qemu-kvm-rhev-2.12.0-5.el7 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1596991 (view as bug list) | Environment: | ||
Last Closed: | 2018-11-01 11:07:33 UTC | Type: | Bug | |
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: | ||||
Bug Blocks: | 1518738, 1585320, 1596991 |
Description
Yanan Fu
2018-04-28 07:53:59 UTC
One simpler bz during RHEL7.3 bz1404137, and didn't hit this problem during rhel7.5. Broken (?) since commit b76e4458b1eb3c32e9824fe6aa51f67d2b251748. I’m not sure yet whether that was intentional, but in any case this behavior is not reflected by the description of block-job-cancel. The description now states that you have to set the @force flag post-READY so that the job is cancelled – without, the job will complete normally. (Before that patch, setting the flag did not have any effect in this case.) But now you have to always set @force to cancel the job, independently of whether that was before READY or not. I think that is not intended, not least because it is an incompatible change. (And it is not documented, so that’s even more reason to believe it wasn’t intentional.) So I will send a patch to revert the pre-READY behavior and we’ll see. Max Sent an upstream series: http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg00143.html Same issue happened in kvm acceptance test on Power: kernel-3.10.0-887.el7.ppc64le qemu-kvm-rhev-2.12.0-2.el7.ppc64le Merged upstream, pending backport: commit eb36639f7bbc16055e551593b81365e8ae3b0b05 Author: Max Reitz <mreitz> Date: Wed May 2 00:05:08 2018 +0200 block/mirror: Make cancel always cancel pre-READY Commit b76e4458b1eb3c32e9824fe6aa51f67d2b251748 made the mirror block job respect block-job-cancel's @force flag: With that flag set, it would now always really cancel, even post-READY. Unfortunately, it had a side effect: Without that flag set, it would now never cancel, not even before READY. Considering that is an incompatible change and not noted anywhere in the commit or the description of block-job-cancel's @force parameter, this seems unintentional and we should revert to the previous behavior, which is to immediately cancel the job when block-job-cancel is called before source and target are in sync (i.e. before the READY event). Cc: qemu-stable Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1572856 Reported-by: Yanan Fu <yfu> Signed-off-by: Max Reitz <mreitz> Reviewed-by: Eric Blake <eblake> Message-id: 20180501220509.14152-2-mreitz Reviewed-by: Jeff Cody <jcody> Signed-off-by: Jeff Cody <jcody> Fix included in qemu-kvm-rhev-2.12.0-5.el7 The bug didn't appear in the qemu-kvm-rhev-2.12.0-5.el7 acceptance testing on ppc. qemu-kvm-rhev-2.12.0-5.el7 acceptance test on x86_64 didn't hit this issue too. Verify the bug on following sw versions: Host kernel: 3.10.0-915.el7.x86_64 qemu-kvm-rhev: qemu-kvm-rhev-2.12.0-5.el7.x86_64 # nc -U /var/tmp/avocado1 {"QMP": {"version": {"qemu": {"micro": 0, "minor": 12, "major": 2}, "package": "qemu-kvm-rhev-2.12.0-5.el7"}, "capabilities": []}} {"execute":"qmp_capabilities"} {"return": {}} { "execute": "drive-mirror", "arguments": { "device": "drive_image1", "target": "mirror1", "format": "qcow2", "mode": "absolute-paths", "sync": "full" } } {"return": {}} {"execute": "block-job-cancel", "arguments": {"device": "drive_image1"}} {"return": {}} {"timestamp": {"seconds": 1530158982, "microseconds": 498950}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drive_image1", "len": 15066529792, "offset": 1113980928, "speed": 0, "type": "mirror"}} ...... { "execute": "drive-mirror", "arguments": { "device": "drive_image1", "target": "mirror1", "format": "qcow2", "mode": "absolute-paths", "sync": "full" } } {"return": {}} {"execute": "query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "drive_image1", "auto-dismiss": true, "busy": true, "len": 15275786240, "offset": 2719809536, "status": "running", "paused": false, "speed": 0, "ready": false, "type": "mirror"}]} {"timestamp": {"seconds": 1530168785, "microseconds": 973943}, "event": "BLOCK_JOB_READY", "data": {"device": "drive_image1", "len": 15277293568, "offset": 15277293568, "speed": 0, "type": "mirror"}} {"execute": "block-job-complete", "arguments": { "device": "drive_image1"} } {"return": {}} {"execute": "query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "drive_image1", "auto-dismiss": true, "busy": true, "len": 18223529984, "offset": 16170024960, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} {"execute": "query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "drive_image1", "auto-dismiss": true, "busy": true, "len": 18840616960, "offset": 16245391360, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} {"execute":"block-job-cancel","arguments":{"device":"drive_image1"}} {"return": {}} {"execute": "query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "drive_image1", "auto-dismiss": true, "busy": true, "len": 22204579840, "offset": 16752508928, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} {"execute": "query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "drive_image1", "auto-dismiss": true, "busy": true, "len": 22683320320, "offset": 16811229184, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror"}]} {"execute":"block-job-cancel","arguments":{"device":"drive_image1","force":true}} {"return": {}} {"timestamp": {"seconds": 1530169235, "microseconds": 839978}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drive_image1", "len": 24414584832, "offset": 17069113344, "speed": 0, "type": "mirror"}} 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. https://access.redhat.com/errata/RHBA-2018:3443 |