chore(config): do not expose manual rpc peer port config
when using `manual`, all nodes in the cluster should agree to the same port number, so there is no need to make peer port number for clients.
This commit is contained in:
parent
50f4e0617b
commit
7afd4940e7
|
@ -331,25 +331,20 @@ rpc.async_batch_size = 256
|
|||
## Defaults to `stateless`.
|
||||
rpc.port_discovery = stateless
|
||||
|
||||
## TCP server port for RPC.
|
||||
## TCP port number for RPC server to listen on.
|
||||
##
|
||||
## Only takes effect when `rpc.port_discovery` = `manual`.
|
||||
##
|
||||
## NOTE: All nodes in the cluster should agree to this same config.
|
||||
##
|
||||
## Value: Port [1024-65535]
|
||||
#rpc.tcp_server_port = 5369
|
||||
|
||||
## TCP port for outgoing RPC connections.
|
||||
##
|
||||
## Only takes effect when `rpc.port_discovery` = `manual`.
|
||||
##
|
||||
## Value: Port [1024-65535]
|
||||
#rpc.tcp_client_port = 5369
|
||||
|
||||
## Number of outgoing RPC connections.
|
||||
##
|
||||
## Value: Interger [1-256]
|
||||
## Defaults to NumberOfCPUSchedulers / 2
|
||||
#rpc.tcp_client_num = 1
|
||||
## Value: Interger [0-256]
|
||||
## Defaults to NumberOfCPUSchedulers / 2 when set to 0
|
||||
#rpc.tcp_client_num = 0
|
||||
|
||||
## RCP Client connect timeout.
|
||||
##
|
||||
|
|
|
@ -367,13 +367,7 @@ end}.
|
|||
{datatype, integer}
|
||||
]}.
|
||||
|
||||
%% Default TCP port for outgoing connections
|
||||
{mapping, "rpc.tcp_client_port", "gen_rpc.tcp_client_port", [
|
||||
{default, 5369},
|
||||
{datatype, integer}
|
||||
]}.
|
||||
|
||||
%% Default TCP port for outgoing connections
|
||||
%% Number of tcp connections when connecting to RPC server
|
||||
{mapping, "rpc.tcp_client_num", "gen_rpc.tcp_client_num", [
|
||||
{default, 0},
|
||||
{datatype, integer},
|
||||
|
@ -451,6 +445,14 @@ end}.
|
|||
fun(X) -> X >= 0 andalso X < 256 end
|
||||
}.
|
||||
|
||||
%% Force client to use server listening port, because we do no provide
|
||||
%% per-node listening port manual mapping from configs.
|
||||
%% i.e. all nodes in the cluster should agree to the same
|
||||
%% listening port number.
|
||||
{translation, "gen_rpc.tcp_client_port", fun(_, _, Conf) ->
|
||||
cuttlefish:conf_get("rpc.tcp_server_port", Conf)
|
||||
end}.
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Log
|
||||
%%--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue