[let's move this to developers list]

On 12/02/18 07:22 +0100, Kristoffer Grönlund wrote:
> (and especially the libqb developers)
> I started hacking on a python library written in C which links to
> pacemaker, and so to libqb as well, but I'm encountering a strange
> problem which I don't know how to solve.
> When I try to import the library in python, I see this error:
> --- command ---
> PYTHONPATH='/home/krig/projects/work/libpacemakerclient/build/python' 
> /usr/bin/python3 
> /home/krig/projects/python-pacemaker/build/../python/clienttest.py
> --- stderr ---
> python3: utils.c:66: common: Assertion `"implicit callsite section is 
> observable, otherwise target's and/or libqb's build is at fault, preventing 
> reliable logging" && work_s1 != NULL && work_s2 != NULL' failed.
> -------
> This appears to be coming from the following libqb macro:
> https://github.com/ClusterLabs/libqb/blob/master/include/qb/qblog.h#L352
> There is a long comment above the macro which if nothing else tells me
> that I'm not the first person to have issues with it, but it doesn't
> really tell me what I'm doing wrong...
> Does anyone know what the issue is, and if so, what I could do to
> resolve it?

Something similar has been reported already:

and the fix is proposed:

But the suitability depends on particular usecase.

I guess you are linking your python extension with one of the
pacemaker libraries (directly on indirectly to libcrmcommon), and in
that case, you need to rebuild pacemaker with the patched libqb[*] for
the whole arrangement to work.  Likewise in that case, as you may be
aware, the "API" is quite uncommitted at this point, stability hasn't
been of importance so far (because of the handles into pacemaker being
mostly abstracted through built-in CLI tools for the outside players
so far, which I agree is encumbered with tedious round-trips, etc.).
There's a huge debt in this area, so some discretion and perhaps
feedback which functions are indeed proper-API-worth is advised.

shortcut 1: just recompile pacemaker with those extra
            /usr/include/qb/qblog.h modifications as of the
            referenced commit)
shortcut 2: if the above can be tolerated widely, this is certainly
            for local development only: recompile pacemaker with

Hope this helps.

Jan (Poki)

Attachment: pgpBsObeln97F.pgp
Description: PGP signature

Users mailing list: Users@clusterlabs.org

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to