[OpenSIPS-Users] opensips HA resource script (for Heartbeat)

Alexandr A. Alexandrov shurrman at gmail.com
Tue Dec 28 08:09:16 CET 2010


Hi, All.

This is an issue of writing a correct script, nothing more. :-)
There are several possibilities, strating from simple process lookup 
(like pgrep -f opensips), ending using MI from such a script.

> This makes OpenSIPS not valid for full HA environment, so be careful.

I will make my opensips valid, was just wondering if someone already 
invented that bicycle. :-)


28.12.2010 04:55, Iñaki Baz Castillo:
> 2010/12/22 Alexandr A. Alexandrov<shurrman at gmail.com>:
>    
>> Does anyone by chance have opensips HA resource script (for using with
>> Heartbeat)?
>>      
> OpenSIPS is not good for init scripts as when running daemonized it
> returns 0 (ok) even if it fails to start (due to DB wrong connection
> or whatever module error).
>
> So HA would start OpenSIPS. The OpenSIPs init script (or HA LSB / OCF
> script) returns 0, but the fact is that the daemonized (forked)
> process has failed to start (i.e. any module error).
>
> Later HA monitors OpenSIPS status (by using the LSB script "status"
> action or the OCF script "monitor" action) and realizes that OpenSIPS
> is not running. Then HA tries to start it again, such action returns 0
> again (the script returns 0 as there are not grammar errors in the
> config script) so HA is happy, but again, OpenSIPS is not running, and
> so on.
>
> This makes OpenSIPS not valid for full HA environment, so be careful.
>
>    




More information about the Users mailing list