<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Bogdan,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yes it would appear K8s implementations would be a very good topic at the Summit that is for sure!
</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I understand your comments on dispatcher, its unfortunate as everything else is working fine.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There was a suggestion to add a loopback address for example and then update when DNS has updated and records resolve?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there any benefit in using dr_routing instead or will this behaviour be the same in the event of a dns lookup failure?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for the response!</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:bogdan@opensips.org">Bogdan-Andrei Iancu</a><br>
<b>Sent: </b>24 August 2022 12:29<br>
<b>To: </b><a href="mailto:users@lists.opensips.org">OpenSIPS users mailling list</a>;
<a href="mailto:hunterj91@hotmail.com">Jonathan Hunter</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within a K8s environment</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">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>
<br>
</span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu</pre>
<pre><o:p> </o:p></pre>
<pre>OpenSIPS Founder and Developer</pre>
<pre> <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7C%7C84ee92014c7c4c0ea33e08da85c3dd19%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637969373523562738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vMcA8Ti1ZgupioV7%2BV%2Fn6MxoklfjuxJ8BGcqWEWDHmE%3D&reserved=0">https://www.opensips-solutions.com</a></pre>
<pre>OpenSIPS Summit 27-30 Sept 2022, Athens</pre>
<pre> <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7C%7C84ee92014c7c4c0ea33e08da85c3dd19%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637969373523562738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9VF4udkoaGT%2FBFooWi8eyPaFOzq3c7yeYoxJDXgL5C4%3D&reserved=0">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div>
<p class="MsoNormal">On 8/24/22 12:24 AM, Jonathan Hunter wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi All,<o:p></o:p></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.<o:p></o:p></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.<o:p></o:p></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.<o:p></o:p></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;<o:p></o:p></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<o:p></o:p></p>
<p class="MsoNormal">Aug 23 21:22:01 [55] WARNING:dispatcher:ds_load_data: failed to add destination
<a 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<o:p></o:p></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.<o:p></o:p></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?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">My dispatcher settings are;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">#### Dynamic routing<o:p></o:p></p>
<p class="MsoNormal">loadmodule "dispatcher.so"<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "db_url", "postgres://x.x.x.x/opensips")<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "ds_probing_mode", 1)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "ds_probing_threshhold", 1)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "persistent_state", 0)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "ds_ping_interval", 5)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "table_name", "dispatcher")<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "cluster_id", 1)<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Hope that makes sense!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Many thanks<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Jon<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________</pre>
<pre>Users mailing list</pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a></pre>
<pre><a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7C%7C84ee92014c7c4c0ea33e08da85c3dd19%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637969373523562738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Vx2tfVcw2FLjKQOd5KZAwKVEfBs04rTdHqR7VD05wJs%3D&reserved=0">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>