<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<font face="monospace">Hi Jonathan,<br>
<br>
I guess this will be a good topic (DS and K8S) for the OpenSIPS
Summit in Athens - I think this is the 3rd time in the last week
coming across it :)<br>
<br>
Unfortunately there is no way to skip at the moment that DNS
failure when loading the destinations :(....even more, there some
code that relies on the fact that there is an "IP" attached to any
destination.....And I just checked, a local error in sending the
ping (like the DNS err) does not results in marking the
destination as failed or so..... so it is not so straight as
ignoring the DNS error.<br>
<br>
Best regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2022Athens/">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div class="moz-cite-prefix">On 8/24/22 12:24 AM, Jonathan Hunter
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:AS8P195MB1287968384C5AA36559CE5E0BD709@AS8P195MB1287.EURP195.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}.MsoChpDefault
{mso-style-type:export-only;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal">Hi All,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a query around dispatcher behaviour,
I am running 3.2 in a k8s environment.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have 2 freeswitch instances defined in a
destination set, both of which are pods.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As people may be aware its fun implementing
in k8s as pods can restart and disappear at times so I ideally
want this reflected in the cache and output of opensips-cli -x
mi ds_list where I was hoping the freeswitch entries would be
defined but with a state of probing or inactive.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With my current setup, when restarting
opensips for example, I have the dispatcher table populated in
postgres db , and if opensips cant resolve the URI it wont
load it into cache, like wise if opensips is running and
freeswitch pod drops, I see this in the logs;</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Aug 23 21:22:01 [55]
ERROR:dispatcher:add_dest2list: could not resolve
freeswitch-opensips-deployment-1.freeswitch-opensips, skipping
it</p>
<p class="MsoNormal">Aug 23 21:22:01 [55]
WARNING:dispatcher:ds_load_data: failed to add destination
<a class="moz-txt-link-rfc2396E" href="sip:freeswitch-opensips-deployment-1.freeswitch-opensips:5070;transport=tcp"><sip:freeswitch-opensips-deployment-1.freeswitch-opensips:5070;transport=tcp></a>
in group 10</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I therefore don’t see it listed in cache
when I run ds_list.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does anyone know if its possible to tweak
dispatcher to always load the database entries into cache at
startup, and also set their status to probing/inactive if not
reachable due to a resolving issue as above?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My dispatcher settings are;</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#### Dynamic routing</p>
<p class="MsoNormal">loadmodule "dispatcher.so"</p>
<p class="MsoNormal">modparam("dispatcher", "db_url",
"postgres://x.x.x.x/opensips")</p>
<p class="MsoNormal">modparam("dispatcher", "ds_probing_mode",
1)</p>
<p class="MsoNormal">modparam("dispatcher",
"ds_probing_threshhold", 1)</p>
<p class="MsoNormal">modparam("dispatcher", "persistent_state",
0)</p>
<p class="MsoNormal">modparam("dispatcher", "ds_ping_interval",
5)</p>
<p class="MsoNormal">modparam("dispatcher", "table_name",
"dispatcher")</p>
<p class="MsoNormal">modparam("dispatcher", "cluster_id", 1)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hope that makes sense!</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>