[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] rind-0.8.1 patch



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>

(However, I don't consider this critical...)

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.

> 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. :)


> 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.


>  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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]