Likely a bug in your software. testcpg works for me and it does exactly what you mention (cpg_join, cpg_leave, followed by dispatch). One possibility is you are executing cpg_finalize before the callback is delivered.
Regards -steve On Wed, 2009-08-12 at 17:43 +0200, "Wojciech L. Jędruch" wrote: > Hi > > It's my first time in corosync and i got following problem. I wanted to > integrate corosync with my application, therefore, I used cpg_get_fd, to > retrive fd. Then i called poll function on it with read event enabled. > Each read event calls cpg_dispatch function with CPG_DISPATCH_ALL. When > im using cpg_join, all is ok - i mean - callback 'on_change' is called. > But when i want to call cpg_leave, i got no callback (on_change). > Why ? In cpg_leave manual, its written at least one callback should be > called. I suppose there is an error in my code, but i dont know where to > look for it. > > Here is corosync output when im running cpg_leave function > > Aug 12 17:34:34 corosync [CPG ] cpg.c:985 got leave request on 0x9a532f0 > Aug 12 17:34:34 corosync [CPG ] cpg.c:999 CPD_STATE_JOIN_COMPLETED > Aug 12 17:34:34 corosync [CPG ] cpg.c:543 pid :14438 fn : 1 reason > 2 result 0 > Aug 12 17:34:34 corosync [TOTEM ] totemsrp.c:2155 mcasted message added > to pending queue > Aug 12 17:34:34 corosync [TOTEM ] totemsrp.c:3618 Delivering b to c > Aug 12 17:34:34 corosync [TOTEM ] totemsrp.c:3687 Delivering MCAST > message with seq c to pending delivery queue > Aug 12 17:34:34 corosync [CPG ] cpg.c:772 got procleave message from > cluster node 318835210 > Aug 12 17:34:34 corosync [TOTEM ] totemsrp.c:2293 releasing messages up > to and including c > > For comparsion output when running example application - testcpg from > corosync-1.0.0/test : > > Aug 12 17:36:43 corosync [CPG ] cpg.c:985 got leave request on 0xb6d00560 > Aug 12 17:36:43 corosync [CPG ] cpg.c:999 CPD_STATE_JOIN_COMPLETED > Aug 12 17:36:43 corosync [CPG ] cpg.c:543 pid :14514 fn : 1 reason > 2 result 0 > Aug 12 17:36:43 corosync [TOTEM ] totemsrp.c:2155 mcasted message added > to pending queue > Aug 12 17:36:43 corosync [TOTEM ] totemsrp.c:3618 Delivering d to e > Aug 12 17:36:43 corosync [TOTEM ] totemsrp.c:3687 Delivering MCAST > message with seq e to pending delivery queue > Aug 12 17:36:43 corosync [CPG ] cpg.c:772 got procleave message from > cluster node 318835210 > Aug 12 17:36:43 corosync [TOTEM ] totemsrp.c:2293 releasing messages up > to and including e > Aug 12 17:36:43 corosync [CPG ] cpg.c:514 exit_fn for conn=0xb6d00560 > > > Best regards > > > "WIRTUALNA POLSKA" Spolka Akcyjna z siedziba w Gdansku przy ul. > Traugutta 115 C, wpisana do Krajowego Rejestru Sadowego - Rejestru > Przedsiebiorcow prowadzonego przez Sad Rejonowy Gdansk - Polnoc w > Gdansku pod numerem KRS 0000068548, o kapitale zakladowym > 67.980.024,00 zlotych oplaconym w calosci oraz Numerze Identyfikacji > Podatkowej 957-07-51-216. > _______________________________________________ > Openais mailing list > [email protected] > https://lists.linux-foundation.org/mailman/listinfo/openais _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
