[libvirt] [PATCH] metadata: track title edits across libvirtd restart

Martin Kletzander mkletzan at redhat.com
Wed Jul 23 13:19:14 UTC 2014


On Wed, Jul 23, 2014 at 06:46:24AM -0600, Eric Blake wrote:
>On 07/22/2014 11:09 PM, Martin Kletzander wrote:
>> On Tue, Jul 22, 2014 at 01:11:03PM -0600, Eric Blake wrote:
>>> https://bugzilla.redhat.com/show_bug.cgi?id=1122205
>>>
>>> Although the edits were changing in-memory XML, it was not flushed
>>> to disk; so unless some other action changes XML, a libvirtd restart
>>> would lose the changed information.
>>>
>>
>> And there are more places like that.  Take a
>> qemuDomainSetNumaParameters() for example.
>
>That's what I was afraid of - that I'd be stuck with auditing other uses
>all because I stumbled on this one while testing a similar fix to
>blockcopy. :/
>
>>  Would it be possible (as
>> in "not devastatingly hard" to create a syntax-check rule for
>> *_driver.c files (only those that are applicable, mostly stateful)
>> that would check if virCheckFlags is called with
>> VIR_DOMAIN_AFFECT_LIVE and if yes, then that function would have to
>> call virDomainSaveStatus() as well?
>
>Via a .pl script maybe, but even that is hard, because sometimes (as in
>this patch) the call to virDomainSaveStatus() is delegated to a helper
>function in another file than where the API call checks flags.  It's not
>just AFFECT_LIVE, but any time where we modify a virDomainDefPtr
>(whether live or config), then those modifications have to be written
>back to disk before ending the API.
>

Or maybe CIL or something similar can be used for that.  Having
syntax-check work with the intermediate language would have both pros
and cons, I guess.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140723/a8a86b17/attachment-0001.sig>


More information about the libvir-list mailing list