[Linux-cluster] check status time out

Dustin Henry Offutt dhoffutt at gmail.com
Wed Jun 2 15:50:09 UTC 2010


Life is absolutely enjoyable! Hope yours is as well!

What one might consider in such a situation is instead calling a custom
wrapper script...

Have the custom script do something like:

a "thought script":

myTimeOut = 60 seconds? 120 seconds?
start {
/etc/init.d/myService start
date +SOMEFORMAT > /var/lock/subsys/customScriptStartTimeStamp
}
stop {
/etc/init.d/myService stop
}
status {
$serviceStartedAt = $(cat /var/lock/subsys/customScriptStartTimeStamp)
if ($serviceStartedAt is longer ago than a timestamp taken now plus
$myTimeOut){
  return $(service myService status)
} else {
return 0
}

So the wrapper won't start querying the real service for a status until
after the timeout specified in the myTimeOut variable....

Just an idea...


On Wed, Jun 2, 2010 at 9:36 AM, Georgi Stanojevski <glisha at gmail.com> wrote:

> On Wed, Jun 2, 2010 at 4:42 AM, Anas Alnajjar <anasnajj at gmail.com> wrote:
>
> > I have Redhat cluster on Centos 5.4  and I make Script resource to handle
> my
> > service “ /etc/init.d/xxxx “ but I need to modify check  status time out
> > because my service take long time to return back its status so how i can
> do
> > this
>
> According to /usr/share/cluster/script.sh you can't set up timeout for
> status check.
>
> <!-- This is just a wrapper for LSB init scripts, so monitor
>       and status can't have a timeout, nor do they do any extra
>       work regardless of the depth -->
>
> So I guess it waits indefinitely for the status script to return?
>
> Are you sure you need to increase the timeout? Does rgmanager kill
> your resource after a long time running or because it returns <>0?
>
> I have just the opposite problem. If my status doesn't return in ex.
> 60s I need to restart the service, and according to the comments in
> script.sh I can't do that?
>
> --
> Glisha
>
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20100602/bd903fb7/attachment.htm>


More information about the Linux-cluster mailing list