On Feb 5, 2008, at 11:07 PM, Dejan Muhamedagic wrote:

Hi,

On Tue, Feb 05, 2008 at 09:53:05PM +0100, Andreas Mock wrote:
-----Urspr?ngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von
Lars Marowsky-Bree
Gesendet: Dienstag, 5. Februar 2008 16:19
An: General Linux-HA mailing list
Betreff: Re: [Linux-HA] 32 / 64 Bit

Hi Lars,


No. OCF_ROOT is part of it, but the variables in the shell are a
heartbeat/CRM/Pacemaker "extension". We reserve the right to redefine
them as needed, they are not part of our exported API.

All true, however we do this once in a blue moon... it's not exactly a rapidly moving target :-) Far easier to use the "extension" and fix the RA if-and-when the variables change, than to manage it all yourself.


However, we will
fix up the scripts included with the package, of course - which is a
long and complicated way of saying one should get their scripts merged
;-)

Ahhh, now we're back to the original question. How shall a developer
code his RA so that the architecture/platform dependent parts
can be changed by e.g. build system? :-)

There's no way to ensure that automatically. But if you figure
out how, please let us know.


3) How do I get these environment variables if I need/want
to use another
programming language for RA?

That would depend on the language, no? ;-)

This answer enlightens me... :-))
What I meant: There is a script (which is more or less part of the API,
Andrew and you have different opinions about that.  :-)) which can
be called ($OCF_ROOT/resource.d/heartbeat/.ocf-shellfuncs) which
sets environment variables appropriately. This is a part I can rely on when I write an OCF RA as shell script. So, now: If I write a RA in another language (except C: Andrew: hb_config.h) I don't have a kind of module or
callable which sets these environment variables for me correctly.

Then we'll have to figure out how to do that. So far, most RAs
are shell scripts. And perhaps one in C.

Right. If there is enough demand, then we can just make the equivalent of ocf-shellfuncs for that language. autoconf makes this relatively straight forward, you just supply the template and it'll fill in the values.

Or or can extract the variables from hb_config.h during your own build process (as pacemaker and pygui do)



By the way: Is is "standard"-compatible to write an OCF RA in another
interpreted language?

Yes.

Cheers,

Dejan


5) Where do I have to document other dependencies, e.g.
certain interpreter?

In the package dependencies?

Yes, but I'm not a packager...  :-)

Cheers
Andreas Mock

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

_______________________________________________
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