[Linux-ha-dev] LRM Warning
dylan_huang2004 at yahoo.com
Mon Aug 16 05:37:57 MDT 2004
I have updated the lrmd.c for adding the name of the ra process.
The name is like "rsc_id:op_type" now. (eg, ip6:start)
And if you think other information is convenient for you, just let me know.
I left it as "no name yet;)" when first time I wrote it and forget to update it, sorry for that.
I am working on the callback issue now, hope can give you the answer soon.
You are right, the terms in resource managment are little confusing.
However, we have defined them already and you can find them in lrm_api.h.
And I extract them here,
id: a unique string, may treat as name.
class: lsb, ocf, heartbeat...
type: drdb, apache,IPaddr...
op_type: start, stop, status...
Unfortunately, the RA plugins had been finished before we had defined the terms.
They will be update to new terms soon.
> / 2004-08-14 08:25:37 -0600
> \ Alan Robertson:
> > Lars Ellenberg wrote:
> > >and I have to admit that to me the naming scheme of the structures,
> > >members, functions and variables is not intuitive at all.
> > >
> > >not only non-intuitive, there seems to be confusion of "class", "type"
> > >and "name" all over the place. but maybe its only me, and after all,
> > >it is late, too :-/
> > Is your confusion with the proctrack system, or the LRM code?
> > I probably ought to document the proctrack paradigm so it would be clearer
> > how to use it for those who didn't write it.
> um. now that you ask specifically,
> I can not point to a particular line of code ...
> after looking at the proctrack.[hc] again, it is pretty obvious how to
> use it. maybe only X->proctype(X) returning a "name", but it is quoted
> in the comment there, too.
> I think my "confusion" was more in the lrm*,
> and maybe was due to me looking there for the first time seriously.
> I'm not used to read code where some things are BumPyCode, and some are
> just_con_cat_em_together; some of the two letter "syllables" also need a
> second thought as to what they may stand for if you don't do it everyday...
> members named type passed as arguments where the argument name is name,
> [ RAExec->execra(op->rsc->type,...) -- execra(const char * ra_name,...) ],
> callback definitions named something_*_name registered into members
> named *_type [ X->ops->proctype = on_ra_proc_query_name ],
> I think I have seen similar examples with "class" and "type" ...
> sometimes this way, and then again the other ...
> it is not consistent, and that makes it more difficult to read.
> but it probably is as close to consistent as you get when there are many
> developers (with different mother tongues, different programming
> experience and background) working on the same project.
> so in short: never mind :-)
> and if I came across some really odd inconsistency,
> I could even submit a patch...
> Lars Ellenberg
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> Home Page: http://linux-ha.org/
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
More information about the Linux-HA-Dev