Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse reuse-grpc-port and reuse-http-port as booleans #6511

Merged
merged 7 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions qa/L0_socket/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@ SERVER2_LOG="./inference_server2.log"
for p in http grpc; do
# error if servers bind to the same http/grpc port without setting the reuse flag
if [ "$p" == "http" ]; then
SERVER_ARGS="--model-repository=$DATADIR --metrics-port 8002 --reuse-grpc-port=1"
SERVER0_ARGS="--model-repository=$DATADIR --metrics-port 8003 --reuse-grpc-port=1"
SERVER1_ARGS="--model-repository=$DATADIR --metrics-port 8004 --reuse-grpc-port=1"
SERVER_ARGS="--model-repository=$DATADIR --metrics-port 8002 --reuse-grpc-port=true"
SERVER0_ARGS="--model-repository=$DATADIR --metrics-port 8003 --reuse-grpc-port=true"
SERVER1_ARGS="--model-repository=$DATADIR --metrics-port 8004 --reuse-grpc-port=true"
else
SERVER_ARGS="--model-repository=$DATADIR --metrics-port 8002 --reuse-http-port=1"
SERVER0_ARGS="--model-repository=$DATADIR --metrics-port 8003 --reuse-http-port=1"
SERVER1_ARGS="--model-repository=$DATADIR --metrics-port 8004 --reuse-http-port=1"
SERVER_ARGS="--model-repository=$DATADIR --metrics-port 8002 --reuse-http-port=true"
SERVER0_ARGS="--model-repository=$DATADIR --metrics-port 8003 --reuse-http-port=true"
SERVER1_ARGS="--model-repository=$DATADIR --metrics-port 8004 --reuse-http-port=true"
fi
# make sure the first server is launched successfully, then run the other
# two servers and expect them to fail
Expand Down Expand Up @@ -357,9 +357,9 @@ for p in http grpc; do
# (a) Test default metrics-address being same as http-address
# (b) Test setting metrics-address explicitly to 0.0.0.0
# (c) Test setting metrics-address explicitly to 127.0.0.1
SERVER0_ARGS="--model-repository=$DATADIR --metrics-port 8002 --reuse-http-port=1 --reuse-grpc-port=1"
SERVER1_ARGS="--model-repository=$DATADIR --metrics-address 0.0.0.0 --metrics-port 8003 --reuse-http-port=1 --reuse-grpc-port=1"
SERVER2_ARGS="--model-repository=$DATADIR --metrics-address 127.0.0.2 --metrics-port 8004 --reuse-http-port=1 --reuse-grpc-port=1"
SERVER0_ARGS="--model-repository=$DATADIR --metrics-port 8002 --reuse-http-port=true --reuse-grpc-port=true"
SERVER1_ARGS="--model-repository=$DATADIR --metrics-address 0.0.0.0 --metrics-port 8003 --reuse-http-port=1 --reuse-grpc-port=true"
dyastremsky marked this conversation as resolved.
Show resolved Hide resolved
SERVER2_ARGS="--model-repository=$DATADIR --metrics-address 127.0.0.2 --metrics-port 8004 --reuse-http-port=1 --reuse-grpc-port=true"
dyastremsky marked this conversation as resolved.
Show resolved Hide resolved
run_multiple_servers_nowait 3
sleep 15
if [ "$SERVER0_PID" == "0" ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/command_line_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ TritonParser::Parse(int argc, char** argv)
lparams.http_port_ = ParseOption<int>(optarg);
break;
case OPTION_REUSE_HTTP_PORT:
lparams.reuse_http_port_ = ParseOption<int>(optarg);
lparams.reuse_http_port_ = ParseOption<bool>(optarg);
break;
case OPTION_HTTP_ADDRESS:
lparams.http_address_ = optarg;
Expand Down Expand Up @@ -1330,7 +1330,7 @@ TritonParser::Parse(int argc, char** argv)
lgrpc_options.socket_.port_ = ParseOption<int>(optarg);
break;
case OPTION_REUSE_GRPC_PORT:
lgrpc_options.socket_.reuse_port_ = ParseOption<int>(optarg);
lgrpc_options.socket_.reuse_port_ = ParseOption<bool>(optarg);
break;
case OPTION_GRPC_ADDRESS:
lgrpc_options.socket_.address_ = optarg;
Expand Down
Loading