Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't upgrade rest port config for nodes with defined port_meta

If some node already has per-node rest config with port_meta, this
means that somebody already set right value.

But most importantly because we run upgrade code for initial server
startup, previous code always set port_meta to global (because initial
run is always with 1 node). Breaking ./cluster_run badly.

Not upgrading when port_meta is set fixes cluster_run, while
preserving correctness for normal production upgrades.

Change-Id: Iecd627a0576043c91392f111bea1f0fd7673b6ac
Reviewed-by: Aliaksey Artamonau <>
Tested-by: Aliaksey Artamonau <>
  • Loading branch information...
commit 2dc653a76a5149ffaf79f5c6f33c14ceebde9d13 1 parent 4925ee0
@alk alk authored aartamonau committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/ns_config_default.erl
12 src/ns_config_default.erl
@@ -275,6 +275,18 @@ upgrade_config_from_1_7_1_to_1_7_2(Config) ->
do_upgrade_config_from_1_7_1_to_1_7_2(Config, DefaultConfig).
do_upgrade_config_from_1_7_1_to_1_7_2(Config, DefaultConfig) ->
+ RestConfig = case ns_config:search_node(Config, rest) of
+ false -> [];
+ {value, RestConfigX} -> RestConfigX
+ end,
+ NeedRestUpgrade = lists:keysearch(port_meta, 1, RestConfig) =:= false,
+ case NeedRestUpgrade of
+ true -> do_upgrade_rest_port_config_from_1_7_1_to_1_7_2(Config, DefaultConfig);
+ _ -> []
+ end.
+do_upgrade_rest_port_config_from_1_7_1_to_1_7_2(Config, DefaultConfig) ->
Node = node(),
NodesWanted = case ns_config:search(Config, nodes_wanted) of
{value, Nodes} -> lists:usort(Nodes);
Please sign in to comment.
Something went wrong with that request. Please try again.