[OpenSIPS-Users] dlg_sharing_tag behaviour in an active/backup setup

Kingsley Tart kingsley at dns99.co.uk
Wed Jul 14 10:27:32 EST 2021


If you maintain the VIP with keepalived for example, then in your VIP
config for keepalived you could configure a notify_master script which
keepalived would then run when the node picks up the VIP, eg:

    notify_master /path/to/script/notify-up.sh

and then in that script run something like this (assuming OpenSIPS
3.x):

    opensips-cli -x mi clusterer_shtag_set_active your-tagname

which would make the node that now has the VIP set the tag active on
itself and as far as I understand it, OpenSIPS clusterer would make set
it to "backup" on other node.

Cheers,
Kingsley.


On Tue, 2021-07-13 at 14:08 +0100, solarmon wrote:
> Hi Liviu,
> 
> I took and used the 'recommended' config as advised at 
> https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/
> 
> Having to rely on an(other) script to 'fix' the issue does not sound
> like a good idea, but I'll look into it further and try to understand
> it.
> 
> Thank you.
> 
> On Tue, 13 Jul 2021 at 12:59, Liviu Chircu <liviu at opensips.org>
> wrote:
> > On 25.06.2021 15:12, solarmon wrote:
> > > The typical recommended configuration for an active/standby setup
> > > would be:
> > > 
> > > node1:
> > > modparam("dialog", "dlg_sharing_tag", "vip=active")
> > > 
> > > node2:
> > > modparam("dialog", "dlg_sharing_tag", "vip=backup")
> > > 
> > > How can this be properly resolved or managed for these situations
> > > where you want to take down an opensips node for maintenance?
> > 
> > Hi,
> > Actually, I would recommend starting with "backup / backup" (!!) to
> > prevent exactly the scenario you described above, where you take
> > down the former-active node for maintenance, yet it boots in
> > "active" mode, completely opposite to the state of the VIP.
> > Now, in order to fix the state where both tags are in "backup"
> > mode, you'd deploy an external check-script that periodically scans
> > the tag statuses and fixes a "backup" tag to "active" whenever a
> > box owns the VIP.
> > Best Regards,
> > -- 
> > Liviu Chircu
> > www.twitter.com/liviuchircu | www.opensips-solutions.com
> > OpenSIPS Summit 2021 Distributed | www.opensips.org/events
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list