[OpenSIPS-Users] Virtual DB failover wrangling

Jock McKechnie jock.mckechnie at gmail.com
Thu Mar 11 21:38:05 CET 2010


Greetings folks;

I've been attempting to get a working db_virtual failover setup going and am
having some very basic functionality problems while in testing, I was
wondering if someone could shed some light one what I, presumably, am doing
wrong.

Appropriate sections of config look something like this:
------------------------
modparam("alias_db", "db_url", "virtual://set1")

modparam("db_virtual", "db_max_consec_retrys", 3)

modparam("db_virtual","db_urls","define set1 FAILOVER")
modparam("db_virtual","db_urls","mysql://
opensips:password at 192.168.0.100/aliasdb")
modparam("db_virtual","db_urls","mysql://
opensips:password at 192.168.0.200/aliasdb")

if (alias_db_lookup("opensips_inbound", "d")) {
        # Do something
        };
------------------------

I'm running the Debian package release, 1.6.0-1, from the leurent.eurepository.

If I start OpenSIPs and then on the .100 DB do an iptables REJECT to
simulate a DB problem OpenSIPs will simply retry the alias lookup
infinitely.

Curiously, if I set up the iptables block, THEN start OpenSIPs, and toggle
the block on and off, the failure mode appears to work as it should, which
really confuses me.

Have I got an issue with how I expect this to work? How I've got it set up?
Or do we think my testing methodology is bunk?

My many thanks;

 - Jock
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100311/d5de77a1/attachment.htm 


More information about the Users mailing list