-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S2S DNS discovery fix #4278
S2S DNS discovery fix #4278
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4278 +/- ##
==========================================
+ Coverage 84.42% 84.46% +0.04%
==========================================
Files 553 553
Lines 33582 33591 +9
==========================================
+ Hits 28352 28374 +22
+ Misses 5230 5217 -13 ☔ View full report in Codecov by Sentry. |
This comment was marked as outdated.
This comment was marked as outdated.
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / edf9530 small_tests_25 / small_tests / edf9530 small_tests_26 / small_tests / edf9530 small_tests_26_arm64 / small_tests / edf9530 ldap_mnesia_25 / ldap_mnesia / edf9530 dynamic_domains_mysql_redis_26 / mysql_redis / edf9530 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / edf9530 ldap_mnesia_26 / ldap_mnesia / edf9530 dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / edf9530 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / edf9530 internal_mnesia_26 / internal_mnesia / edf9530 pgsql_cets_26 / pgsql_cets / edf9530 pgsql_mnesia_25 / pgsql_mnesia / edf9530 mysql_redis_26 / mysql_redis / edf9530 mssql_mnesia_26 / odbc_mssql_mnesia / edf9530 pgsql_mnesia_26 / pgsql_mnesia / edf9530 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thank you so much for fixing this!
This PR fixes an issue with S2S connections using DNS discovery where connecting to another server would fail. The root cause was that
inet_res:getbyname/3
returns a DNS type instead of the expectedinet
type needed for establishing connection. The updated logic now includes a proper lookup for the correctinet
type to ensure successful connections.Previously, the Erlang documentation did not clearly specify this behavior, which could be misleading. More details can be found here: erlang/otp#5803.
Testing was performed by mocking the appropriate
inet
functions. An alternative solution could involve setting up a local DNS server or using external tools likednsmasq
to set up a lightweight DNS resolver. However, this would require installing additional dependencies in the CI environment, so mocking was chosen as a simpler solution.