[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] cl_status & cl_api on Solaris 8 again
From:       Mark davis <mdrobot () team ! nwn ! de>
Date:       2005-01-13 11:40:14
Message-ID: 1105616413.6578.16.camel () mad-dington ! local
[Download RAW message or body]

Hi,

> >Both clients call "cl_status rscstatus" in the same moment (twice).
> >
> >Purpose: 
> >I want run cronjobs ONLY on the active node with the resources, so i
> >have on both machines:
> >
> >*/5 * * * * cron.sh && mysql_cluster.pl check 
> >* * * * *   cron.sh && test.sh
> >
> >with cron.sh calling cl_cluster to determine the node with the resources
> >(exits with 0 if node has the resources, 1 if the node doesn't have the
> >resources). So the cronjob ONLY gets executed on one of the hosts
> >(considered transition, ...).
> >
> >My guess, the client has a problem with parallel running, but maybe
> >Guochun has some ideas.  If you need further debug output, let me know.
> 
> can you check how exactly these error messages are generated? For example,
> you run "cl_status rscstatus" on both nodes at the same time. Please talk to me 
> if you are in IRC. thanks
> 

Here's the irc-chatlog:
------------------------
<mark3> so, what is the exact problem? is the api not designed to handle
more then one client or is it a problem with cl_status ?
<gshi> api is not designed to handle multiple clients with same name in
one node
<mark3> ok, so a wrapper, that excludes multi instances running, would
completly solve my problem...
<mark3> right?
<gshi> yes
<gshi> but you may want to bring the probme to dev list and see how
other people respond about that
<mark3> yepp.
<alsoran> gshi: is the API cabable of having >1 client receieving the
same message?
<mark3> i'm wondering. Am I the only one, trying to use cl_status to
determine the active node?
<gshi> alsoran: yes, as long as they are different names
...
<gshi> mark3: there are two types to clients, one is name, the other is
unnamed; the unnamed type client may suit your need; but I need to check
it first
<mark3> ah, ok.
<gshi> ok. you can use casual type client so each time client name is
different (its process id)
<gshi> you will need to add "apiauth default <uid>" to your ha.cf; uid
is the user id you run the causual type client
<gshi> in cl_status.c you will need to change the name in signon call
from "cl_status" to NULL
<gshi> that should work
<mark3> ah, nice.

-> And it worked fine (No errors anymore).

Greets
Mark

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic