Summary:ASTERISK-18253: Init service isn't compatible with LSB
Reporter:c0rnoTa (c0rnota)Labels:
Date Opened:2011-08-10 12:02:56Date Closed:2011-09-20 18:09:09
Versions: Frequency of
Environment:RHEL 5.5, HeartBeat 2.1.4Attachments:
Description:Existing init script for RedHat could not be used with HeartBeat 2.1.4 because it does not compatable with LSB Spec.
When asterisk service working and you are trying to start it again, you will receive exit code 1 (line 77 on rc.redhat.asterisk). Exit code 1 means that program is dead and /var/run pid file exists. According LSB spec we should return 0. Otherwise your master server in HA cluster will go out of sync.

Try it yourself. Sync 2 servers via heartbeat and asterisk service in haresources. Stop backup server. You will see that master server stopped all resources. That's because heartbeat trying to start asterisk service again on master but receives code 1 not 0.

Making changes in the line 77 to "exit 0" will help heartbeat to work fine.
This simple issue makes asterisk not useful in HA clusters on RHEL 5.5.

It does not appear, for example, on gentoo, because gentoo use different init script.