[SR-Users] Failover with UCARP and Monit

Hugh Waite hugh.waite at crocodile-rcs.com
Thu Feb 17 19:08:55 CET 2011


Thanks for the responses,

We wish the server to be a hot standby, so the kamailio service is 
running and is ready to take traffic as soon as the virtual IP is 
assigned. Kamailio is bound to a fixed IP and DNAT/SNAT is used to 
convert the IP of incoming traffic.
Monit is there to make sure that it is running and will alert a network 
admin if the standby is not ready to take over.
Since my original post, I think it is acceptable for us to send OPTIONS 
pings to localhost to check for responsiveness and therefore this check 
does not need to be turned off when standby. It will continue as an 
additional check that the standby instance is ready to take over when 
needed.

Regards,
Hugh

On 17/02/2011 13:53, Daniel-Constantin Mierla wrote:
> An option is to use in the UCARP VIP up/down scripts the commands:
>
> monit start kamailio
> monit stop kamailio
>
> Then monit will stop kamailio and no longer do options ping when the 
> server is standby.
>
> Cheers,
> Daniel
>
> On 2/17/11 2:05 PM, Klaus Feichtinger wrote:
>> Hi,
>>
>> I have built a similar solution with only one difference: I am using
>> HEARTBEAT instead of ucarp. In heartbeat it is possible moving
>> "haresources" from one active host to another. So, I activate MONIT (and
>> mysql + kamailio) only when the resources (e.g. virtual IP address) are
>> switched from one host to the other.
>>
>> A sample config of heartbeat looks like:
>>
>> [...]
>> Srv1 drbddisk::dbdata \
>>       Filesystem::/dev/drbd0::/mnt/drbdfiles::ext3 \
>>       10.0.0.1 mysql kamailio start-monit
>> [...]
>>
>> Maybe you can use a pendant to these 'resources' in ucarp, too. I do not
>> know any details.
>>
>> regard,
>> Klaus
>>
>>> Hello,
>>> I am setting up a high-availablilty kamailio system using UCARP to
>>> failover between active and standby instances. To detect failure, we
>>> intend to use Monit.
>>> Monit can monitor the kamailio PID and start the process when needed
>>> (Example on the wiki
>>> http://www.kamailio.org/dokuwiki/doku.php/install:configure-initd-script) 
>>>
>>> and  it can also do OPTIONS pings to verify it is working. If the pings
>>> fail  we will initiate a ucarp swap.
>>>
>>> However if the server is currently in standby, it does not have the 
>>> V-IP
>>>   address, so I don't want to run the OPTIONS pings (I think).
>>>
>>> Does anyone use a similar system and can provide an example of how
>>> ucarp, monit and kamailio can work together?
>>>
>>> Many thanks,
>>>
>>> Hugh Waite
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
--
Hugh Waite
Senior Design Engineer
Crocodile RCS Ltd.




More information about the sr-users mailing list