[libvirt] [PATCH] Make ABI stability issue easier to debug
Jiri Denemark
jdenemar at redhat.com
Thu Mar 13 10:30:43 UTC 2014
On Wed, Mar 12, 2014 at 10:05:56 -0600, Eric Blake wrote:
> 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.
Pushed, thanks.
Jirka
More information about the libvir-list
mailing list