[libvirt] [PATCH 2/2] qemuProcessStop: Simulate blockjob --abort on destroy

Peter Krempa pkrempa at redhat.com
Tue Nov 19 09:31:56 UTC 2019


On Tue, Nov 19, 2019 at 10:14:09 +0100, Michal Privoznik wrote:

In subject, please remove 'Simulate blockjob --abort' and replace it
e.g. with: 'remove image metadata for running mirror jobs' or something
similar, because this patch does not really do anything with the job
itself.

> If user starts a blockcommit without --pivot then we modify
> access for qemu on both images and leave it like that until
> pivot is executed. So far so good. Problem is, if user instead
> of issuing pivot calls destroy on the domain. In this case we
> don't ever clear the access we granted at the beginning.

This applies any time a job is still running. --pivot makes sure that it
finishes after qemu reaches the correct point, but the intermediate
state is still potentially long-running.

Also note that disk->mirror is only present for an active layer commit
job but not for regular commit jobs. Does this bug apply to those as
well?

It's harder to simulate that job though, but if qemu crashes
during the job exactly the same semantics as if --pivot was not used and
the VM was destroyed instead apply. We still relabelled some images.

Also disk->mirror is present also for virDomainBlockCopy which this
commit message omits completely.

You'll have to reformulate the commit message for this patch given that
you persuade me that checking disk->mirror is enough given the existence
of non-active jobs which don't populate disk->mirror.

> https://bugzilla.redhat.com/show_bug.cgi?id=1741456#c19
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/qemu/qemu_process.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191119/71ede84a/attachment-0001.sig>


More information about the libvir-list mailing list