Bug 1721375
Summary: | block-job and block-job-2 have wrong event type with --active | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Dan Zheng <dzheng> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | yisun |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.1 | CC: | jdenemar, lmen, pkrempa, rbalakri, xuzhang, yalzhang |
Target Milestone: | rc | Keywords: | Automation, Regression |
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-5.6.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-06 07:16:26 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: |
Description
Dan Zheng
2019-06-18 07:04:20 UTC
Fixed upstream: commit 00c4c971fd4eac00ce80f7ffe415a4f5a3c45b03 Author: Peter Krempa <pkrempa> Date: Thu Jul 18 18:08:11 2019 +0200 qemu: process: Don't use qemuBlockJobStartupFinalize in qemuProcessHandleBlockJob The block job event handler qemuProcessHandleBlockJob looks at the block job data to see whether the job requires synchronous handling. Since the block job event may arrive before we continue the job handling (if the job has no data to copy) we could hit the state when the job is still set as QEMU_BLOCKJOB_STATE_NEW (as we move it to the QEMU_BLOCKJOB_STATE_RUNNING state only after returning from monitor). If the event handler uses qemuBlockJobStartupFinalize it would unregister and free the job. Thankfully this is not a big problem for legacy blockjobs as we don't need much data for them but since we'd re-instantiate the job data structure we'd report wrong job type for active commit as qemu reports it as a regular commit job. Fix it by not using qemuBlockJobStartupFinalize function in qemuProcessHandleBlockJob as it is not starting the job anyways. https://bugzilla.redhat.com/show_bug.cgi?id=1721375 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Ján Tomko <jtomko> v5.5.0-260-g00c4c971fd # rpm -q perl-Sys-Virt libvirt perl-Sys-Virt-5.6.0-1.module+el8.1.0+3908+8a8c5ed4.x86_64 libvirt-5.6.0-1.module+el8.1.0+3890+4d3d259c.x86_64 Rerun # libvirt-tck --testdir scripts/event/150-domain-blockjob.t -v --force Block job callback: /var/cache/libvirt-tck/storage-fs/tck/tck.snapshot3 4 3 Block job 2 callback: vda 4 3 ok 29 - Get block job type: block_commit_active ok 30 - Get block job status: ready ok 31 - Get block job 2 type: block_commit_active ok 32 - Get block job 2 status: ready # Destroying the running domain # Undefining the inactive domain config # Delete qcow2 backend volume ok 33 - create qcow2 backing file volume Ignore to download vmlinuz and initrd ok 34 - succeed to create external snapshot ok 35 - succeed to create external snapshot ok 36 - succeed to create external snapshot ok 37 - block pulled Block job callback: /var/cache/libvirt-tck/storage-fs/tck/tck.snapshot3 4 3 Block job 2 callback: vda 4 3 ok 38 - Get block job type: block_commit_relative ok 39 - Get block job status: completed ok 40 - Get block job 2 type: block_commit_relative ok 41 - Get block job 2 status: completed # Destroying the running domain # Undefining the inactive domain config # Delete qcow2 backend volume ok All tests successful. Files=1, Tests=41, 16 wallclock secs ( 0.03 usr 0.01 sys + 0.26 cusr 0.05 csys = 0.35 CPU) Result: PASS 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-2019:3723 |