Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
pertsevds committed Mar 30, 2024
1 parent ab73272 commit 355aeea
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/dns_srv_cluster/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ defmodule DNSSRVCluster.Worker do
""")
end

defp warn_node_not_running_with_longnames do

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-20.04, Erlang/OTP 24 Elixir 1.12

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-20.04, Erlang/OTP 24 Elixir 1.13

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-20.04, Erlang/OTP 25 Elixir 1.13

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-20.04, Erlang/OTP 24 Elixir 1.14

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-20.04, Erlang/OTP 25 Elixir 1.14

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-22.04, Erlang/OTP 26 Elixir 1.14

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-20.04, Erlang/OTP 24 Elixir 1.15

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-20.04, Erlang/OTP 25 Elixir 1.15

function warn_node_not_running_with_longnames/0 is unused

Check warning on line 126 in lib/dns_srv_cluster/worker.ex

View workflow job for this annotation

GitHub Actions / ubuntu-22.04, Erlang/OTP 26 Elixir 1.15

function warn_node_not_running_with_longnames/0 is unused
Logger.warning("""
Node not running with longnames which are required for DNS discovery.
Ensure the following exports are set in your rel/env.sh.eex file:
export RELEASE_DISTRIBUTION="${RELEASE_DISTRIBUTION:-"name"}"
export RELEASE_NODE="${RELEASE_NODE:-"<%= @release.name %>"}"
""")
end

defp warn_on_invalid_dist do
release? = is_binary(System.get_env("RELEASE_NAME"))
net_state = get_net_state()
Expand All @@ -137,19 +147,9 @@ defmodule DNSSRVCluster.Worker do
%{started: :no} = _state ->
warn_node_not_running_distributed_mode_with_longnames()

%{started: started, name_domain: :shortnames} = _state when started != :no ->
%{started: started, name_domain: :shortnames} = _state when not release? and started != :no ->
warn_node_not_running_distributed_mode_with_longnames()

# !release? and state.started != :no and state[:name_domain] != :longnames ->
# warn_node_not_running_distributed_mode_with_longnames()

# net_state.started == :no or (!release? and net_state.started != :no and net_state[:name_domain] != :longnames) ->
# Logger.warning("""
# Node not running in distributed mode. When running outside of a release, you must start net_kernel manually with
# longnames.
# https://www.erlang.org/doc/man/net_kernel.html#start-2
# """)

# net_state[:name_domain] != :longnames and release? ->
# Logger.warning("""
# Node not running with longnames which are required for DNS discovery.
Expand Down

0 comments on commit 355aeea

Please sign in to comment.