Bug 1585320

Summary: libvirt: use block-job cancel to stop long-running block-job-complete
Product: Red Hat Enterprise Linux 8 Reporter: Ademar Reis <areis>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED WONTFIX QA Contact: yisun
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: chayang, dyuan, eblake, gveitmic, jsnow, jsuchane, juzhang, knoel, lmen, mkalinin, mtessun, ngu, pkrempa, rhodain, sirao, virt-maint, xfu, xuzhang, yisun
Target Milestone: pre-dev-freezeKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1553234 Environment:
Last Closed: 2022-01-19 08:58:07 UTC Type: Feature Request
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: 1572856    
Bug Blocks:    

Description Ademar Reis 2018-06-01 20:55:20 UTC
From Eric's last comment in the original BZ:

block-job-complete is potentially long-running until a synchronous mirror lands (qemu 2.13).  As long as that is the case, a user may desire to immediately cancel a long-running block-job-complete.  To do that, they have to use the new block-job-cancel with "force":true added in qemu 2.12 (and with the additional patch backported to make it not regress block-job-cancel before the job is ready).  So the question is if libvirt should expose the instant cancel option, as long as qemu does not have any other way to prevent a long-running block-job-complete.

+++ This bug was initially created as a clone of Bug #1553234 +++

Description of problem:
When an active commit is running and the pivot is not ready yet the attempt to abort with VIR_DOMAIN_BLOCK_JOB_ABORT_PIVOT will fail as expected, but if the volumes are already synchronised, the event BLOCK_JOB_READY is already emitted and the volumes get out of sync again due to intensive IO operations. The blockJobAbort with the same flags get stuck until the volumes are in sync again and the pivot happen.

...

Comment 8 John Ferlan 2021-09-08 13:19:37 UTC
Bulk update - Move RHEL-AV bugs to RHEL

Comment 10 Peter Krempa 2022-01-19 08:58:07 UTC
Note that libvirt now supports the synchronous copy mode, so implementing this now is pointless:

https://bugzilla.redhat.com/show_bug.cgi?id=2026812