Hey Florian,
On Thu, Nov 10, 2011 at 04:11:16PM +0100, Florian Haas wrote:
> Hi Dejan,
>
> thanks for the feedback! We've worked in most of your suggested changes,
> see below:
>
> On 2011-11-10 13:14, Dejan Muhamedagic wrote:
> > Hi,
[...]
> > Start may exit with some arbitrary error code (line 324 in
> > asterisk_start()).
I was referring to this, it should really be fixed:
ocf_run ${OCF_RESKEY_binary} -G $OCF_RESKEY_group -U
$OCF_RESKEY_user \
-C $OCF_RESKEY_config \
$OCF_RESKEY_additional_parameters \
$asterisk_extra_params
if [ $? -ne 0 ]; then
ocf_log err "Asterisk PBX start command failed: $?"
return $?
fi
You need to:
rc=$?
if [ $rc -ne 0 ]; then
ocf_log err "Asterisk PBX start command failed: $rc"
return $OCF_ERR_GENERIC
fi
[...]
> > Should check content of $pid before line 377 in stop.
>
> I'm unsure what you're suggesting here.
>
> - Just check that the pid file is non-empty?
> - Check whether its contents are numeric?
Both? Perhaps it's not necessary though, depending on the
outcome of _status. But perhaps still better not to assume, but
check anyway. Perhaps we need a helper function for this in
ocf-shellfuncs, sth like ocf_is_pidfile_valid.
> - Read the pid and do a kill -0 before kill -TERM?
No :) I think that would be an overkill.
Cheers,
Dejan
> Cheers,
> Florian
>
> --
> Need help with High Availability?
> http://www.hastexo.com/now
> _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/