[PATCH] qemu: save status xml after generating taint message

Kristina Hanicova khanicov at redhat.com
Wed Jul 21 15:38:46 UTC 2021


On Wed, Jul 21, 2021 at 2:29 PM Peter Krempa <pkrempa at redhat.com> wrote:

> On Wed, Jul 21, 2021 at 14:05:05 +0200, Kristina Hanicova wrote:
> > We didn't always save status xml after generating new taint
> > message, which resulted in it being deleted in case of a libvirtd
> > restart.  Some taint messages were preserved thanks to saving
> > status xml separately at the end of the calling functions (which
> > makes sense, because qemuDomainObjTaint was usually called there
> > multiple times).  But for special cases (e.g. When only few taint
> > messages are generated) we need a separate function for
> > generating them and saving status xml explicitly.
>
> Saving the status XML is a very common operation which we in some cases
> repeat a few times when doing an multi-step operation, thus we can
> reasonably assume that saving the status XML in all cases when we are
> adding a taint on a VM object is okay without the need to special case
> operations which don't save the status XML as part of their code.
>

I didn't want to add saving status xml to the original function mainly
because
of qemuDomainObjCheckTaint, where qemuDomainObjTaint could be potentially
called in multiple for cycles. I thought it would be ineffective, but I will
change the patch if that kind of situation is not likely.

Kristina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210721/b0a63eba/attachment-0001.htm>


More information about the libvir-list mailing list