[Pacemaker] Custom OCF Resource Agents

Lars Ellenberg lars.ellenberg at linbit.com
Mon Jul 4 18:43:53 UTC 2011


On Fri, Jul 01, 2011 at 02:47:02PM -0400, Sean.Feeney at sonydadc.com wrote:
> Okay, my script is now passing the ocf-tester but it is exhibiting strange 
> behavior. It is based on:
> 
> #!/bin/sh
> service=smbd
> if ps ax | grep -v grep | grep ${service} > /dev/null
> then
>     echo "$service service running, everything is OK"
> else
>     echo "$service is not running"
> fi
> 
> So in the monitor() method of my RA:
> 
> service=smbd
> if ps ax | grep -v grep | grep ${service} > /dev/null
> then
>     return $OCF_SUCCESS
> else
>     return $OCF_NOT_RUNNING
> fi
> 
> Whether the smbd service running or not, in the RA the first case is 
> always returned: "return $OCF_SUCCESS"
> 
> Any ideas?

Your script name happen to contain "smbd"?
 ;)


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.




More information about the Pacemaker mailing list