Hello again, 

I've worked at this things. I'm not finished yet, but now I
know a couple of things better.

On Jan 10, 2008, at 0:23 PM, Andrew Beekhof wrote:
> On Jan 9, 2008, at 7:30 PM, Stephan Berlet wrote:
>> When I try to compile crm_mon.c, the compiler moans that he can't
>> find the headers "lha_internal.h" and "lib/crm/pengine/unpack.h"
> 
> crm_mon.c can only be built from within the project
> in particular, the name of the first header should tell you something  
> about who should be including it :-)
> you're better off starting from scratch and copying in only what you  
> need

That is what I've done in the meantime. 


>> Both files don't exist in my filesystem. (I'm searched them by
>> using 'locate'). Is it because I installed heartbeat with rpms?
> 
> right, they're both internal files which are not installed.  you  
> shouldn't be using them.

I've simply omitted these two files, and I hope it works anyway.


>> Another problem for me is that there are some conflicts with C++
>> keywords
> 
> someone had a nice solution for this previously on the mailing list.
> i forget the details but google should be able to help

That solution works fine, here my code therefore:

#ifdef __cplusplus
extern "C" {
# define delete __fake_delete
# define private __fake_private
# define new __fake_new
# define class __fake_class
// Add other defines for any conflicting C++ keyword
#endif
/*** include heartbeat headers here ***/
#ifdef __cplusplus
}
#endif


>> and invalid transformations (e.g. void* to resource_t*)
>> Is it possible to make the macro "slist_iter" C++ compliant?
> 
> probably
> but not being a c++ guy i'd not know how. i'm happy to take patches  
> though...

I worked out a solution for this thing, too. Just modify one line
in the definition from slist_iter:
(more precisely the line 196 in /include/crm/crm.h, version 2.1.2-3)
--      child = __crm_iter_head->data;   \
++      child = (child_type *) __crm_iter_head->data;   \

That works for my purposes.
Similar changes for the xml_child_iter macro in xml.h


>> On Jan 8, 2008, at 3:20 AM, Andrew Beekhof wrote:
>>>
>>> On Jan 7, 2008, at 2:54 PM, Stephan Berlet wrote:
>>>
>>>> Hello,
>>>>
>>>> First of all I want to excuse me for my bad english!
>>>>
>>>> We use heartbeat 2.1.2-3 in a 2 node cluster, just to manage the
>>>> virtual
>>>> IP adress 172.30.4.170. We have a network service that have to run
>>>> at both nodes to make sure they have a synchronous data set.
>>>> Therefore both nodes have to know which one holds the virtual IP.
>>>> I would like to implement that with the heartbeat API.
>>> 
>>> If you're using the crm, then the correct API to use is from the
>>> Policy Engine.
>>> For an example, check out the source code for crm_mon.
>>> 

Maybe I will report my final results with this subject,
or I will ask you many more questions ;)

Best regards and many thanks,
Stephan
HELPING HEADS for Hard- and Software
-------------------------------------------------------------------------
Für Ihre Projekte entwickeln wir maßgeschneiderte Lösungen - schnell,
flexibel und direkt vor Ort. Unser eingespieltes Team an erfahrenen Hard-
und Software-Spezialisten unterstützt Sie dort, wo Sie uns brauchen.



--------------------------------------------------------------------------
SysDesign GmbH
Säntisstrasse 25
D-88079 Kressbronn am Bodensee

Geschäftsführer: Franz Kleiner, Achim Solle
Handelsregister: Ulm 632138
--------------------------------------------------------------------------

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to