From: Sage Weil Date: Thu, 21 Mar 2019 03:42:31 +0000 (-0500) Subject: msg/async/ProtocolV[12]: add ms_learn_addr_from_peer X-Git-Tag: v15.1.0~3007^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05f56ab67fdd67a0fa4742a9578bacb2948bb8e9;p=ceph.git msg/async/ProtocolV[12]: add ms_learn_addr_from_peer Optionally learn our address based on what our peer (usually the mon) thinks we are connecting from, as opposed to what our local socket used for the outbound connection. This enables us to detect what our NATed address is (as a client) in those environments. Default to true to match the v1 behavior. This is a net change in behavior for v2. Signed-off-by: Sage Weil --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index f17b2f412c69..c36bd6144702 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -101,6 +101,7 @@ OPTION(perf, OPT_BOOL) // enable internal perf counters SAFE_OPTION(ms_type, OPT_STR) // messenger backend. It will be modified in runtime, so use SAFE_OPTION OPTION(ms_public_type, OPT_STR) // messenger backend OPTION(ms_cluster_type, OPT_STR) // messenger backend +OPTION(ms_learn_addr_from_peer, OPT_BOOL) OPTION(ms_tcp_nodelay, OPT_BOOL) OPTION(ms_tcp_rcvbuf, OPT_INT) OPTION(ms_tcp_prefetch_max_size, OPT_U32) // max prefetch size, we limit this to avoid extra memcpy diff --git a/src/common/options.cc b/src/common/options.cc index 5181cf6c48d5..cfc6a3c7530c 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -841,6 +841,11 @@ std::vector