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@xxxxxxxxx> wrote:
On Wed, Jun 2, 2010 at 4:42 AM, Anas Alnajjar <anasnajj@xxxxxxxxx> wrote:According to /usr/share/cluster/script.sh you can't set up timeout for
> 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
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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster
-- Linux-cluster mailing list Linux-cluster@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cluster