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 <[email protected]> > --- > 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
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
