Am 11.02.2011 11:27, schrieb Raoul Bhatia [IPAX]: > hi, > > On 02/09/2011 03:04 PM, Klaus Darilion wrote: > ... >> >> >> server1 server2 >> ip1 ip2 >> <-----virtual-IP-------> >> > ... >> Kamailio should always be running on both servers. Replication of >> Registrations is done on SIP level between the to servers (using the >> 'real' IP). The Registrar/LoadBalancer service itself is provided on the >> virtual-IP, thus the SIP traffic is handled either on server1 or server2. >> >> If the Kamailio process dies, it should be restarted. If it fails to >> start or fails to often (flapping) the virtual-IP should be migrated to >> the other node. Of course failover should also happen if one server dies >> completely. > > best would be to write a kamailio resource agent.
yes, that's the obvious part and a requirement, and I should be able to do that. The question is actually more about how to configure the resource in pacemaker. >> I wonder how I should implement this. Of course the virtual-IP sould onl >> be active on a host where Kamailio is active too. >> >> >> How do I make Kamailio active on both nodes? Just a "clone" as with the >> "ping resource"? >> >> How do I try to recover a Kamailio problem (restart) a few times before >> migrating the virtual-IP to the other node? > > i thought that kamilo is active on both nodes? or what is the difference > between "running on both servers" and "a host where kamailio is active"? If everything is fine, then Kamailio should run on both servers. But for example how should the cluster behave if e.g. Kamailio crashes and restarting by pacemaker again leads to crashes (e.g. Kamailio has DB connectivity problems or other problems). Is there some protection in pacemaker to not endlessly trying to restart such a broken service? Or, how should pacemaker behave if Kamailio on the active node crashes. Shall it just restart Kamailio or shall it migrate the IP address to the other node and then try to restart Kamailio on the inactive node? > (if there is a difference, you should create a multistate aka > master/slave resource) > > > basically: > primitive extip ocf:heartbeat:IPaddr2 \ > params ip="a.b.c.d" nic="eth0.123" cidr_netmask="28" \ > op monitor interval="30" > primitive kamailio ocf:pernau:kamailio \ > op monitor interval="30" timeout="30" \ > op monitor interval="15" role="Slave" timeout="30" \ > op monitor interval="10" role="Master" timeout="30" > ms ms-kamailio wdb-mysql > colocation colo_extip_with_kamailio inf: extip ms-kamailio:Master Thanks, I will evaluate this. regards Klaus > > > the most important thing would be the kamailio resource agent. > > > cheers, > raoul _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker