<div dir="ltr">Hi Kingsley,<br><div><br></div><div>I use corosync/pacemaker to manage the virtual IP and I already have a resource script to run the "opensipsctl fifo dlg_set_sharing_tag_active vip" command when the virtual IP resource moves to another node.</div><div><br></div><div>However, the issue here is not about when the virtual IP resource moves between nodes. The issue is that node 01 is by default the 'active' and node 02 is by default the 'standby' in terms of vip tag state. But if node 02 is currently the node with the virtual IP (and it would be the active node for the vip tag because of the script) but when you restart the node 01 opensips service, it will then become active for the vip tag - because by design in its config it is set to be 'active' for that vip tag. So now calls are still going to node 02 because it has the virtual IP, but in terms of vip tag status, node 01 is now the active one for that tag.</div><div><br></div><div> I suppose in a two node cluster, the question is: what are the consequences of this vip tag status mismatch?</div><div><br></div><div>Now that I'm aware of issue, we need to make sure we check and set the vip status accordingly whenever we restart the opensips service on any of the two nodes.</div><div><br></div><div>Thank you.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 14 Jul 2021 at 11:30, Kingsley Tart <<a href="mailto:kingsley@dns99.co.uk">kingsley@dns99.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If you maintain the VIP with keepalived for example, then in your VIP<br>
config for keepalived you could configure a notify_master script which<br>
keepalived would then run when the node picks up the VIP, eg:<br>
<br>
notify_master /path/to/script/notify-up.sh<br>
<br>
and then in that script run something like this (assuming OpenSIPS<br>
3.x):<br>
<br>
opensips-cli -x mi clusterer_shtag_set_active your-tagname<br>
<br>
which would make the node that now has the VIP set the tag active on<br>
itself and as far as I understand it, OpenSIPS clusterer would make set<br>
it to "backup" on other node.<br>
<br>
Cheers,<br>
Kingsley.<br>
<br>
<br>
On Tue, 2021-07-13 at 14:08 +0100, solarmon wrote:<br>
> Hi Liviu,<br>
> <br>
> I took and used the 'recommended' config as advised at <br>
> <a href="https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/" rel="noreferrer" target="_blank">https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/</a><br>
> <br>
> Having to rely on an(other) script to 'fix' the issue does not sound<br>
> like a good idea, but I'll look into it further and try to understand<br>
> it.<br>
> <br>
> Thank you.<br>
> <br>
> On Tue, 13 Jul 2021 at 12:59, Liviu Chircu <<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>><br>
> wrote:<br>
> > On 25.06.2021 15:12, solarmon wrote:<br>
> > > The typical recommended configuration for an active/standby setup<br>
> > > would be:<br>
> > > <br>
> > > node1:<br>
> > > modparam("dialog", "dlg_sharing_tag", "vip=active")<br>
> > > <br>
> > > node2:<br>
> > > modparam("dialog", "dlg_sharing_tag", "vip=backup")<br>
> > > <br>
> > > How can this be properly resolved or managed for these situations<br>
> > > where you want to take down an opensips node for maintenance?<br>
> > <br>
> > Hi,<br>
> > Actually, I would recommend starting with "backup / backup" (!!) to<br>
> > prevent exactly the scenario you described above, where you take<br>
> > down the former-active node for maintenance, yet it boots in<br>
> > "active" mode, completely opposite to the state of the VIP.<br>
> > Now, in order to fix the state where both tags are in "backup"<br>
> > mode, you'd deploy an external check-script that periodically scans<br>
> > the tag statuses and fixes a "backup" tag to "active" whenever a<br>
> > box owns the VIP.<br>
> > Best Regards,<br>
> > -- <br>
> > Liviu Chircu<br>
> > <a href="http://www.twitter.com/liviuchircu" rel="noreferrer" target="_blank">www.twitter.com/liviuchircu</a> | <a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">www.opensips-solutions.com</a><br>
> > OpenSIPS Summit 2021 Distributed | <a href="http://www.opensips.org/events" rel="noreferrer" target="_blank">www.opensips.org/events</a><br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>