All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Grimme <grimme@atix.de>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] rind-0.8.1 patch
Date: Wed, 6 Feb 2008 10:03:24 +0100	[thread overview]
Message-ID: <200802061003.24749.grimme@atix.de> (raw)
In-Reply-To: <1202234305.1759.196.camel@ayanami.boston.devel.redhat.com>

On Tuesday 05 February 2008 18:58:25 Lon Hohberger wrote:
> On Mon, 2008-02-04 at 18:41 +0100, Marc Grimme wrote:
> > Hi Lon,
> > finally I had time looking at this patch and adapted your example for the
> > follow-service a little bit.
> >
> > Besides that the eventtriggering is running es expected I stubled over
> > some minor changes (find patch attached).
> >
> > 1. Isn't it better to organize the configuration as follows:
> >   <event name="followservice_node" class="node"
> > file="/usr/local/cluster/follow-service.sl">
> >                         follow_service("service:ip_a", "service:ip_b",
> > "ip_a", 1);
> >     </event>
>
> See below...
>
> > Now you can use the follow_service function as a library function and
> > make the implementation in the cluster.conf (this is already integrated
> > in the patch).
> >
> > I would also like something like this:
> >   <event name="followservice_node" class="node">
> >         <file="/usr/local/cluster/another-lib.sl">
> >         <file="/usr/local/cluster/follow-service.sl">
> >         follow_service("service:ip_a", "service:ip_b", "ip_a", 1);
> >     </event>
> > This would make using sl-files very modular. I didn't yet have time to
> > implement it but wanted to hear what you are thinking.
>
> Nothing to implement, really.  The following should handle both cases
> without changing how configuration works (and requiring more parsing of
> cluster.conf):
>
>   <event name="followservice_node" class="node">
>     evalfile("another-lib.sl");
>     evalfile("follow-service.sl");
>     follow_service("service:ip_a", "service:ip_b", "ip_a", 1);
>   </event>
>
> I do, however, need a way to set search paths for the s-lang interpreter
> as a matter of configuration.  (The above should work if you drop
> another-lib.sl and follow-service.sl in /usr/share/cluster...)
>
> <events search_path="/usr/share/cluster:/usr/local/cluster:..." />
>    <!-- for example -->
>    ...
> </events>
Ah got it. I wasn't aware of evalfile. But wouldn't filetags work around the 
searchpath problem and being pretty easy to implement?
>
> (However, I don't consider this critical...)
It's not critical but could help make the development of those sl-files more 
general.
>
> I looked in to modules, but it'd be more complicated, and it seems
> import() doesn't work on RHEL (or maybe I did it wrong...).
>
> Note that the reason I was calling external scripts is because there's a
> limit in ccsd on the amount of data you can get back from ccs_get() -
> it's a couple hundred bytes.  So, embedding an entire script won't work,
> but a shorty script like the one you made should work.
And you can independently develop sl-scripts from the cluster.conf. So you 
don't need a new version number anytime you change the sl-file. Besides you 
could build up libraries (on example is follow-service) to be used general.
>
> > 2. I found that the sl-function nodes_online() returns also online if the
> > node in question is in the cluster but has no rgmanager running. For me
> > it worked just to change the line in
> > rgmanager/src/daemons/slang_event.c:606 : -               if
> > (membership->cml_members[i].cn_member &&
> > +               if (membership->cml_members[i].cn_member > 0 &&
> > But I'm not sure if this is right. For me it worked perfectly well ;-) .
>
> That's strange... I'll look at that.  That *needs* to work. :)
Right that should not be a difference shouldn't it. ;-)
>
> > Next is I reimplemented your example on follow-service and made it more
> > general.
>
> I'll take a look at it.  Mine was really a PoC / example.  If yours is
> better, then we should document it and put it up on the cluster wiki at
> some point as an example of how to make rgmanager do backflips.
I just thought to make it more like a library. And I also took the 
failoverdomains into account when returning the nodes which are capable of 
running the service in question.
>
> >  Still some cases might not be handled. But all my tests (which were
> > not too many up to know) didn't show any problems. I will hand it over to
> > the SAP Guys this week to let then see it this suits there requirements
> > for master/slave queue replication (find the example attached).
> >
> :) Good good.
>
> -- Lon

Marc.

-- 
Gruss / Regards,

Marc Grimme
http://www.atix.de/               http://www.open-sharedroot.org/



  reply	other threads:[~2008-02-06  9:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-30 16:49 [Cluster-devel] rind-0.8.1 patch Lon Hohberger
2008-02-04 17:41 ` Marc Grimme
2008-02-05 17:58   ` Lon Hohberger
2008-02-06  9:03     ` Marc Grimme [this message]
2008-02-06 17:01       ` Lon Hohberger
2008-02-06 17:22         ` Lon Hohberger
2008-02-06 19:18         ` Marc Grimme
2008-02-07  8:38         ` Marc Grimme
2008-02-08 20:56           ` Lon Hohberger
2008-02-14 21:56   ` Lon Hohberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802061003.24749.grimme@atix.de \
    --to=grimme@atix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.