<div dir="auto">I believe you can also tweak k8s to make this scenario work. Use services instead, I think is the best option. It’s been a while since I implemented it.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 6 Sep 2022 at 09:50, Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<font face="monospace">Hi Jon,<br>
<br>
just a feature request on github.<br>
<br>
Regards,<br>
</font></div><div>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
<a href="https://www.opensips.org/events/Summit-2022Athens/" target="_blank">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div>On 9/1/22 9:01 PM, Jonathan Hunter
wrote:<br>
</div>
<blockquote type="cite">
<div>
<p class="MsoNormal">Hi Bogdan,</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Ok cool shall whats the best way to do
this? </p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is it just a change request in GitHub? Or
request for feature?</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Also realistically when do you think
something like this could be completed?</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks!</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">
Mail</a> for Windows</p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="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" target="_blank">Bogdan-Andrei Iancu</a><br>
<b>Sent: </b>30 August 2022 08:52<br>
<b>To: </b><a href="mailto:hunterj91@hotmail.com" target="_blank">Jonathan Hunter</a>; <a href="mailto:users@lists.opensips.org" target="_blank">
OpenSIPS users mailling list</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within a
K8s environment</p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span>Hi Jonathan,<br>
<br>
You mean something similar to that option in drouting ? If
so, yes, it would make sense IMO.<br>
<br>
Regards,<br>
<br>
</span><u></u><u></u></p>
<pre>Bogdan-Andrei Iancu</pre>
<pre><u></u> <u></u></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%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427420952414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FMOAoJ8bvkJYB%2BO%2B6WjL5vq7zhzZdMxOhNJNl3NeT%2Fw%3D&reserved=0" target="_blank">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%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427420952414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7P9%2BRI%2BIxCfmddnUntpf5JooWm%2BXUtAFjb2xkZJZGBU%3D&reserved=0" target="_blank">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div>
<p class="MsoNormal">On 8/26/22 5:36 PM, Jonathan Hunter
wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi Ben,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Great thank you for that I may well
switch for now to drouting.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><a id="m_-5769042162471187276OWAAM74C247A63A914AEEAA00C487B682771DZ" href="mailto:bogdan@opensips.org" target="_blank"><span style="font-family:"Calibri",sans-serif;text-decoration:none">@Bogdan-Andrei
Iancu</span></a> is it worth me raising anything against
dispatcher in terms of a change request for dns behaviour?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Many thanks both.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Jon<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Sent from <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=05%7C01%7C%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427420952414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=z9ZEj1kZZJOf%2BiBAEn8aC2H4cG%2B5Qc90poMgOQINcxA%3D&reserved=0" target="_blank">
Mail</a> for Windows<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From: </b><a href="mailto:Ben.Newlin@genesys.com" target="_blank">Ben Newlin</a><br>
<b>Sent: </b>25 August 2022 18:57<br>
<b>To: </b><a href="mailto:users@lists.opensips.org" target="_blank">OpenSIPS users mailling list</a>;
<a href="mailto:bogdan@opensips.org" target="_blank">Bogdan-Andrei Iancu</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within a
K8s environment<u></u><u></u></p>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">The drouting module
has a parameter that allows you to disable the DNS lookup.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopensips.org%2Fdocs%2Fmodules%2F3.2.x%2Fdrouting.html%23param_force_dns&data=05%7C01%7C%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427420952414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=GZrbX5DA3ysulFcE8M151urxjYbNe7yzPh17xkWFnFs%3D&reserved=0" target="_blank">https://opensips.org/docs/modules/3.2.x/drouting.html#param_force_dns</a></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="color:black" lang="EN-US">Ben Newlin </span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Users
<a href="mailto:users-bounces@lists.opensips.org" target="_blank">
<users-bounces@lists.opensips.org></a> on behalf
of Jonathan Hunter <a href="mailto:hunterj91@hotmail.com" target="_blank">
<hunterj91@hotmail.com></a><br>
<b>Date: </b>Thursday, August 25, 2022 at 4:54 AM<br>
<b>To: </b>Bogdan-Andrei Iancu <a href="mailto:bogdan@opensips.org" target="_blank"><bogdan@opensips.org></a>,
OpenSIPS users mailling list
<a href="mailto:users@lists.opensips.org" target="_blank"><users@lists.opensips.org></a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within
a K8s environment</span><u></u><u></u></p>
</div>
<div>
<div>
<table style="border-collapse:collapse" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="border:solid #b60000 1.0pt;background:white;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:#b60000"> EXTERNAL
EMAIL - Please use caution with links and
attachments </span></b><u></u><u></u></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black"> </span><u></u><u></u></p>
<p class="MsoNormal" style="text-align:center" align="center"><img src="cid:18311f3964bce44d6481" border="0" style="width:707px;max-width:100%"><u></u><u></u></p>
</div>
<p class="MsoNormal">Hi Bogdan,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Yes it would appear K8s implementations
would be a very good topic at the Summit that is for sure!
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I understand your comments on dispatcher,
its unfortunate as everything else is working fine.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></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?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></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?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks for the response!<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Jon<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Sent from <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=05%7C01%7C%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427420952414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=z9ZEj1kZZJOf%2BiBAEn8aC2H4cG%2B5Qc90poMgOQINcxA%3D&reserved=0" target="_blank">
Mail</a> for Windows<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From: </b><a href="mailto:bogdan@opensips.org" target="_blank">Bogdan-Andrei
Iancu</a><br>
<b>Sent: </b>24 August 2022 12:29<br>
<b>To: </b><a href="mailto:users@lists.opensips.org" target="_blank">OpenSIPS users mailling list</a>;
<a href="mailto:hunterj91@hotmail.com" target="_blank">Jonathan Hunter</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within a
K8s environment<u></u><u></u></p>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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>
<br>
</span><u></u><u></u></p>
<pre>Bogdan-Andrei Iancu</pre>
<pre> </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%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427420952414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FMOAoJ8bvkJYB%2BO%2B6WjL5vq7zhzZdMxOhNJNl3NeT%2Fw%3D&reserved=0" target="_blank">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%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427420952414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7P9%2BRI%2BIxCfmddnUntpf5JooWm%2BXUtAFjb2xkZJZGBU%3D&reserved=0" target="_blank">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div>
<p class="MsoNormal">On 8/24/22 12:24 AM, Jonathan Hunter
wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi All,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I have a query around dispatcher
behaviour, I am running 3.2 in a k8s environment.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I have 2 freeswitch instances defined
in a destination set, both of which are pods.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></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.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></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;<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></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<u></u><u></u></p>
<p class="MsoNormal">Aug 23 21:22:01 [55]
WARNING:dispatcher:ds_load_data: failed to add destination
<a>
<sip:freeswitch-opensips-deployment-1.freeswitch-opensips:5070;transport=tcp></a>
in group 10<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I therefore don’t see it listed in
cache when I run ds_list.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></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?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">My dispatcher settings are;<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">#### Dynamic routing<u></u><u></u></p>
<p class="MsoNormal">loadmodule "dispatcher.so"<u></u><u></u></p>
<p class="MsoNormal">modparam("dispatcher", "db_url",
"postgres://x.x.x.x/opensips")<u></u><u></u></p>
<p class="MsoNormal">modparam("dispatcher",
"ds_probing_mode", 1)<u></u><u></u></p>
<p class="MsoNormal">modparam("dispatcher",
"ds_probing_threshhold", 1)<u></u><u></u></p>
<p class="MsoNormal">modparam("dispatcher",
"persistent_state", 0)<u></u><u></u></p>
<p class="MsoNormal">modparam("dispatcher",
"ds_ping_interval", 5)<u></u><u></u></p>
<p class="MsoNormal">modparam("dispatcher", "table_name",
"dispatcher")<u></u><u></u></p>
<p class="MsoNormal">modparam("dispatcher", "cluster_id", 1)<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Hope that makes sense!<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Many thanks<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Jon<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<br>
<u></u><u></u></p>
<pre>_______________________________________________</pre>
<pre>Users mailing list</pre>
<pre><a href="mailto:Users@lists.opensips.org" target="_blank">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%7Cdb99d78253b542300c5308da8a5c90a7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637974427421264839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=LKR6uBkT%2Fhlgj4hHLtJSq%2BnM0PRUyExgSFIygaSTkf8%3D&reserved=0" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt"> </span><u></u><u></u></p>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</blockquote>
<br>
</div>
_______________________________________________<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></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>