[PATCH v2] qemuDomainObjWait: Report error when VM is being destroyed

Ján Tomko jtomko at redhat.com
Thu Aug 11 11:53:53 UTC 2022


On a Thursday in 2022, Peter Krempa wrote:
>Since we started handing the monitor EOF event inside a job any code

*handling

>which uses virDomainObjWait would no longer properly abort in case when
>the VM crashed during the wait.
>
>This is because virDomainObjWait uses virDomainObjIsActive which checks
>'vm->def->id' to see if the VM is still active. Unfortunately the domain
>id is cleared in qemuProcessStop which is run only inside the job.
>
>To fix this we can use the 'beingDestroyed' flag stored in the VM
>private data which is set to true around the time when the condition is
>signalled.
>
>Reported-by: Pavel Hrdina <phrdina at redhat.com>
>Fixes: 8c9ff9960b29d4703a99efdd1cadcf6f48799cc0
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220811/2351f58e/attachment.sig>


More information about the libvir-list mailing list