[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvir-list
Subject:    Re: Public virErrorPreserveLast()/virErrorRestore()
From:       John Levon <levon () movementarian ! org>
Date:       2023-12-15 11:25:06
Message-ID: ZXw3kodON08NjdQC () movementarian ! org
[Download RAW message or body]

On Fri, Dec 15, 2023 at 11:20:10AM +0000, Daniel P. Berrangé wrote:

> Libvirt is executing the error callback and work done in the error callback
> is breaking our API guarantee.
> 
> This broken API guarantee is not the app's fault, it is libvirt's fault for
> not protecting itself against things the callback might do.
> 
> IOW, should we fix the virDispatchError function, to do the save/restore
> dance either side of invoking the callback. This would aviod exposing any
> new APIs, and make the app should "just work".

This would certainly fix my scenario, yes, thanks.

We still have to deal with the fact that e.g. virDomainFree() cannot be used in
cleanup paths, but the workarounds there are generally not so bad.

regards
john
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic