Skip to content

Commit 85165f8

Browse files
committed
MB-48047: Merge remote-tracking branch 'couchbase/mad-hatter'
* MB-48047:[BP] Introduce inaddr_any/2 * MB-48047:[BP] Add functions which determine the specific os type * MB-48047:[BP] Introduce misc:localhost/2 * MB-48047:[BP] Some refactor of webconfig function * MB-48047:[BP] Remove support for MOCHIWEB_IP wasn't working anyway * MB-48047:[BP] Remove support for MOCHIWEB_PORT * MB-48047:[BP] Introduce new 'strict' cluster encryption level * MB-48047:[BP] Enforce 'strict' encryption level in ns_server * MB-48047:[BP] Make memcached interfaces address family specific * MB-48047:[BP] Enforce 'strict' encryption level for memcached * MB-48047:[BP] Refactor menelaus_web http server start code * MB-48047:[BP] Slight refactor of menelaus_event code * MB-48047:[BP] Separate gen_event and internal functions * MB-48047:[BP] Start menelaus_event before menelaus_web in new sup * MB-48047:[BP] Fix theoretical race in misc:start_event_link * MB-48047:[BP] cb_dist: Disable ipv6 listener when ... * MB-48047:[BP] Make engage cluster wait for web server restart * MB-48047:[BP] cb_dist: Listen on loopback when possible * MB-48047:[BP] cb_dist: Use IPv{4|6} instead of ipv{4|6} * MB-48047:[BP] Enforce 'strict' clusterEncryptionLevel in CAPI * MB-48047:[BP] Make switching to afamily for which we don't ... * MB-48047:[BP] Add endpoint to disable unused cb_dist listeners * MB-48047:[BP] flush accept messages after we kill the acceptor * MB-48047:[BP] Graceful exit of connector won't work till ... * MB-48047:[BP] Optionally register node with epmd. * MB-48047:[BP] Conditionally kill epmd on settings change * MB-48047:[BP] Set appropriate defaults for listeners * MB-48047:[BP] restart cb_config_couch_sync on crash * MB-48047:[BP] Always annouce cluster_encryption_level on start. * MB-48047:[BP] Prevent socket close on clusterEncryptionLevel * MB-48047:[BP] During config reload try connecting to kv on all * MB-48047: Kill epmd when joining cluster if required. * MB-48047:[BP] Make terminate timeout smaller Change-Id: I7a6c2d4319a875925adbfbf369ea3d800c995919
2 parents f304d0f + fc3b6e3 commit 85165f8

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

src/cb_dist.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
-define(family, ?MODULE).
6464
-define(proto, ?MODULE).
65-
-define(TERMINATE_TIMEOUT, 5000).
65+
-define(TERMINATE_TIMEOUT, 1000).
6666
-define(ENSURE_CONFIG_TIMEOUT, 60000).
6767

6868
-type socket() :: any().
@@ -669,7 +669,7 @@ conf(Prop, Conf) ->
669669
%% See comments for how we determine defaults.
670670
proplists:get_value(Prop, Conf, proplists:get_value(Prop, defaults(Conf))).
671671

672-
%% From 7.0,
672+
%% From 6.6.4,
673673
%% 1. we do not start both [inet_tcp_dist, inet6_tcp_dist] protos for
674674
%% local_listeners and external_listeners by default as we introduced the
675675
%% address family only feature.

src/misc.erl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,13 @@ try_with_maybe_ignorant_after(TryBody, AfterBody) ->
14891489
letrec(Args, F) ->
14901490
erlang:apply(F, [F | Args]).
14911491

1492+
%% Artifact of backporting enforce TLS project, MB-48047, to 6.6.4.
1493+
%% This is to workaround the cluster_compat_mode check of 7_0.
1494+
%% Should git rid off when 6.6.x is unsupported.
1495+
-spec is_strict_possible() -> true | false.
1496+
is_strict_possible() ->
1497+
ns_config:read_key_fast(can_enable_strict_encryption, false).
1498+
14921499
-spec is_ipv6() -> true | false.
14931500
is_ipv6() ->
14941501
get_net_family() == inet6.

src/netconfig_updater.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,9 @@ wait_for_exit(Port, Output) ->
415415

416416
maybe_kill_epmd() ->
417417
NoEpmdFile = path_config:component_path(data, "no_epmd"),
418-
case ?CAN_KILL_EPMD andalso cluster_compat_mode:is_cluster_70() andalso
418+
case ?CAN_KILL_EPMD andalso
419+
(misc:is_strict_possible() orelse
420+
cluster_compat_mode:is_cluster_70()) andalso
419421
(misc:get_afamily_only() orelse misc:disable_non_ssl_ports()) of
420422
true ->
421423
try

src/ns_cluster.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,7 @@ perform_actual_join(RemoteNode, NewCookie, ChronicleInfo) ->
14301430
[ns_config_log:sanitize(ns_config:get())]),
14311431

14321432
misc:remove_marker(join_marker_path()),
1433+
netconfig_updater:maybe_kill_epmd(),
14331434

14341435
?cluster_debug("Join succeded, starting ns_server_cluster back", []),
14351436
case ns_server_cluster_sup:start_ns_server() of

0 commit comments

Comments
 (0)