[Linux-cluster] check status time out

Kit Gerrits kitgerrits at gmail.com
Wed Jun 2 21:16:36 UTC 2010


You can also try playing with script.sh.
From: http://sources.redhat.com/cluster/wiki/FAQ/RGManager#rgm_svcstart

How can I change the interval at which rgmanager checks a given service?

The interval is in the script for each service, in /usr/share/cluster/ 

It's easier to just change the script.sh file to use whatever value you want
(<5 is not supported, though). Checking is per-resource-type, not
per-service, because it takes more system time to check one resource type
vs. another resource type. 

That is, a check on a "script" might happen only every 30 seconds, while a
check on an "ip" might happen every 10 seconds. 

The status checks are not supposed to consume system resources.
Historically, people have done one of two things which generate support
calls: 

*	Does not set a status check interval at all (why is my service not
being checked?), or 
*	sets the status check interval to something way too low, like 10
seconds for an Oracle service (why is the cluster acting strange/running
slowly?). 

If the status check interval is lower than the actual amount of time it
takes to check the status of a service, you end up with endless
status-checking, which is a pure waste of resources. 


________________________________

From: linux-cluster-bounces at redhat.com
[mailto:linux-cluster-bounces at redhat.com] On Behalf Of Dustin Henry Offutt
Sent: woensdag 2 juni 2010 17:50
To: linux clustering
Subject: Re: [Linux-cluster] check status time out


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


No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.819 / Virus Database: 271.1.1/2911 - Release Date: 06/01/10
20:25:00






More information about the Linux-cluster mailing list