Hi,

On Tue, Jan 26, 2010 at 03:39:26PM +0100, Björn Boschman wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> Am 26.01.2010 13:25, schrieb Dejan Muhamedagic:
> > I've attached the grep output
> > 
> >> According to the logs, the resource started ok:
> > 
> > Jan 26 10:11:21 zreg01 lrmd: [8065]: info: rsc:ip-opensips-reg:0:4: start
> > Jan 26 10:11:21 zreg01 lrmd: [8065]: info: Managed ip-opensips-reg:0:start 
> > process 8150 exited with return code 0.
> 
> but the monitor always fails with rc=7

Well, we can't say why. From your code:

  /usr/bin/sipsak -s sip:t...@$ocf_reskey_ip -H 127.0.0.1 2>/dev/null >/dev/null
  rc=$?
  if
    [ $rc -ne 0 ]
  then
    return $OCF_NOT_RUNNING
  else 
    return $OCF_SUCCESS
  fi

So, you shouldn't map any exit code to NOT_RUNNING but check in
which ways that command can fail and how to distinguish a problem
from the service simply not running. If that's not possible then
perhaps first check for the process, preferably save the pid
before in the start action. Right now, if you don't redirect to
/dev/null, perhaps you can see what's going on in the logs. It'd
also be good to save the output, then log unconditionally stderr
and stdout in case the command fails.

Thanks,

Dejan


> 
> B
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkte/p4ACgkQABMWRpwdNum/sACgweNGyEp1pb8SVB30OPIZQwY9
> 0G0AnAwOuHxieYhAAbzQYegyR6X2u8N5
> =OLma
> -----END PGP SIGNATURE-----
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to