[OpenSIPS-Users] Virtual DB failover wrangling

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Mar 12 12:29:32 CET 2010


Hi Jock,

Jock McKechnie wrote:
> 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@192.168.0.100/aliasdb 
> <http://opensips:password@192.168.0.100/aliasdb>")
> modparam("db_virtual","db_urls","mysql://opensips:password@192.168.0.200/aliasdb 
> <http://opensips:password@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.eu 
> <http://leurent.eu> repository.
>
> 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.
the retry is from mysql lib or from opensips mysql module ?
>
> 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.
The difference may come from the fact that the failure is detected at 
startup - if you start with the DB server down, opensips will not 
connect at all at that DB.

Have you tried to start opensips with all DB servers up and simple stop 
the primary one ? does this case work ?
>
> 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?
I would rather say there is something wrong in the DB virtual...

I will try asap to make a test setup to see what exactly is going on

Regards,
Bogdan
>
> My many thanks;
>
>  - Jock
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list