[libvirt] [PATCH] Make ABI stability issue easier to debug
Eric Blake
eblake at redhat.com
Wed Mar 12 16:05:56 UTC 2014
On 03/12/2014 09:52 AM, Jiri Denemark wrote:
> When ABI stability check fails, we only log the error message describing
> the incompatibility. Let's log both XMLs in case of an error to make it
> easier to analyze where and why the stability check failed.
>
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
> src/conf/domain_conf.c | 125 ++++++++++++++++++++++++++++---------------------
> 1 file changed, 72 insertions(+), 53 deletions(-)
> if (!virDomainPanicCheckABIStability(src->panic, dst->panic))
> - return false;
> + goto error;
>
> return true;
> +
> +error:
> + err = virSaveLastError();
> +
> + strSrc = virDomainDefFormat(src, 0);
> + strDst = virDomainDefFormat(dst, 0);
> + VIR_DEBUG("XMLs that failed stability check were: src=\"%s\", dst=\"%s\"",
> + NULLSTR(strSrc), NULLSTR(strDst));
Of course, the log filters have to be turned higher to allow debug
output; which means we may not see this information on bug reports until
we tell a person to rerun their test. But the idea makes sense, and
doesn't hurt the normal path of compatible API.
ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140312/bec71807/attachment-0001.sig>
More information about the libvir-list
mailing list