aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2019-04-15 10:43:43 +0200
committerRickard Green <[email protected]>2019-04-15 10:43:43 +0200
commit8c63320ef787f5748fc8cea64b18bfddb21dc229 (patch)
treeafafa9f6d47c1a69c82d2a3928bc4bf17941e5d0 /lib
parentc281c20efc39a5ca3049157e4ea0554c57c426a3 (diff)
parent82135c10177c9e773b1bc94c327f3744a9025491 (diff)
downloadotp-8c63320ef787f5748fc8cea64b18bfddb21dc229.tar.gz
otp-8c63320ef787f5748fc8cea64b18bfddb21dc229.tar.bz2
otp-8c63320ef787f5748fc8cea64b18bfddb21dc229.zip
Merge branch 'anders/diameter/distribution/OTP-15768' into maint
* anders/diameter/distribution/OTP-15768: Add appup and code_change Fix inadvertently broad monitor
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/src/base/diameter_dist.erl12
-rw-r--r--lib/diameter/src/diameter.appup.src6
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_dist.erl b/lib/diameter/src/base/diameter_dist.erl
index 5c29ea95a4..ed23152b8b 100644
--- a/lib/diameter/src/base/diameter_dist.erl
+++ b/lib/diameter/src/base/diameter_dist.erl
@@ -454,7 +454,8 @@ start_link() ->
init([]) ->
ets:new(?NODE_TABLE, [set, named_table]),
ets:new(?SERVICE_TABLE, [bag, named_table]),
- ok = net_kernel:monitor_nodes(true, [{node_type, all}, nodedown_reason]),
+ ok = net_kernel:monitor_nodes(true, [{node_type, visible},
+ nodedown_reason]),
ets:insert(?NODE_TABLE, [{?B(N), N} || N <- [node() | nodes()]]),
abcast({attach, node()}),
{ok, sets:new()}.
@@ -521,5 +522,14 @@ terminate(_, _) ->
%% code_change/3
+%% Old code inadvertently monitored all nodes: start a new
+%% subscription and remove the old one.
+code_change(_OldVsn, State, "2.2") ->
+ ok = net_kernel:monitor_nodes(true, [{node_type, visible},
+ nodedown_reason]),
+ ok = net_kernel:monitor_nodes(false, [{node_type, all},
+ nodedown_reason]),
+ {ok, State};
+
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
diff --git a/lib/diameter/src/diameter.appup.src b/lib/diameter/src/diameter.appup.src
index 52263633fb..bb2a4a8e92 100644
--- a/lib/diameter/src/diameter.appup.src
+++ b/lib/diameter/src/diameter.appup.src
@@ -61,7 +61,8 @@
{"2.1.4", [{restart_application, diameter}]}, %% 20.3
{"2.1.4.1", [{restart_application, diameter}]}, %% 20.3.8.19
{"2.1.5", [{restart_application, diameter}]}, %% 21.0
- {"2.1.6", [{restart_application, diameter}]} %% 21.1
+ {"2.1.6", [{restart_application, diameter}]}, %% 21.1
+ {"2.2", [{update, diameter_dist, {advanced, "2.2"}}]} %% 21.3
],
[
{"0.9", [{restart_application, diameter}]},
@@ -104,6 +105,7 @@
{"2.1.4", [{restart_application, diameter}]},
{"2.1.4.1", [{restart_application, diameter}]},
{"2.1.5", [{restart_application, diameter}]},
- {"2.1.6", [{restart_application, diameter}]}
+ {"2.1.6", [{restart_application, diameter}]},
+ {"2.2", [{restart_application, diameter}]}
]
}.