From 13d3c2054dfb3dfebe694ad38562bfcb97d0d857 Mon Sep 17 00:00:00 2001 From: David Yastremsky Date: Mon, 30 Oct 2023 15:36:41 -0700 Subject: [PATCH 1/6] Use boolean parsing for reuse-http-port --- qa/L0_socket/test.sh | 4 ++-- src/command_line_parser.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/L0_socket/test.sh b/qa/L0_socket/test.sh index 228eec3f2a..859cc8392f 100755 --- a/qa/L0_socket/test.sh +++ b/qa/L0_socket/test.sh @@ -312,11 +312,11 @@ for p in http grpc; do 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" + 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" + 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 diff --git a/src/command_line_parser.cc b/src/command_line_parser.cc index 409b423896..cc9de127c0 100644 --- a/src/command_line_parser.cc +++ b/src/command_line_parser.cc @@ -1276,7 +1276,7 @@ TritonParser::Parse(int argc, char** argv) lparams.http_port_ = ParseOption(optarg); break; case OPTION_REUSE_HTTP_PORT: - lparams.reuse_http_port_ = ParseOption(optarg); + lparams.reuse_http_port_ = ParseOption(optarg); break; case OPTION_HTTP_ADDRESS: lparams.http_address_ = optarg; From 1e1036c9b720cc66d985120b3516b9046ec05638 Mon Sep 17 00:00:00 2001 From: David Yastremsky Date: Tue, 31 Oct 2023 14:29:31 -0700 Subject: [PATCH 2/6] Fix L0_socket to use bool --- qa/L0_socket/test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/L0_socket/test.sh b/qa/L0_socket/test.sh index 859cc8392f..ff97f00612 100755 --- a/qa/L0_socket/test.sh +++ b/qa/L0_socket/test.sh @@ -310,12 +310,12 @@ 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" + 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" + 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 From 9394924a9522b39c9fa497ad8888fd4aaa08888d Mon Sep 17 00:00:00 2001 From: David Yastremsky Date: Wed, 1 Nov 2023 15:33:08 -0700 Subject: [PATCH 3/6] Update http open --- src/command_line_parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command_line_parser.cc b/src/command_line_parser.cc index cc9de127c0..5ec18841dc 100644 --- a/src/command_line_parser.cc +++ b/src/command_line_parser.cc @@ -1330,7 +1330,7 @@ TritonParser::Parse(int argc, char** argv) lgrpc_options.socket_.port_ = ParseOption(optarg); break; case OPTION_REUSE_GRPC_PORT: - lgrpc_options.socket_.reuse_port_ = ParseOption(optarg); + lgrpc_options.socket_.reuse_port_ = ParseOption(optarg); break; case OPTION_GRPC_ADDRESS: lgrpc_options.socket_.address_ = optarg; From bb02cff3aaccab9b42b0293530a3713b2950432a Mon Sep 17 00:00:00 2001 From: David Yastremsky Date: Wed, 1 Nov 2023 15:36:01 -0700 Subject: [PATCH 4/6] Use bools in test --- qa/L0_socket/test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/L0_socket/test.sh b/qa/L0_socket/test.sh index ff97f00612..14eaf790ba 100755 --- a/qa/L0_socket/test.sh +++ b/qa/L0_socket/test.sh @@ -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" + SERVER2_ARGS="--model-repository=$DATADIR --metrics-address 127.0.0.2 --metrics-port 8004 --reuse-http-port=1 --reuse-grpc-port=true" run_multiple_servers_nowait 3 sleep 15 if [ "$SERVER0_PID" == "0" ]; then From 6181c1e3b27afd8aa8bd3a028d65cdccf540d1dd Mon Sep 17 00:00:00 2001 From: dyastremsky <58150256+dyastremsky@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:14:01 -0700 Subject: [PATCH 5/6] Fix flag to boolean Co-authored-by: Francesco Petrini --- qa/L0_socket/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/L0_socket/test.sh b/qa/L0_socket/test.sh index 14eaf790ba..36fa3811ea 100755 --- a/qa/L0_socket/test.sh +++ b/qa/L0_socket/test.sh @@ -358,7 +358,7 @@ for p in http grpc; do # (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=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" + SERVER1_ARGS="--model-repository=$DATADIR --metrics-address 0.0.0.0 --metrics-port 8003 --reuse-http-port=true --reuse-grpc-port=true" SERVER2_ARGS="--model-repository=$DATADIR --metrics-address 127.0.0.2 --metrics-port 8004 --reuse-http-port=1 --reuse-grpc-port=true" run_multiple_servers_nowait 3 sleep 15 From e865b47d9e9e1beaca12c51fd6b6ab925bc8cd96 Mon Sep 17 00:00:00 2001 From: dyastremsky <58150256+dyastremsky@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:14:07 -0700 Subject: [PATCH 6/6] Fix flag to boolean Co-authored-by: Francesco Petrini --- qa/L0_socket/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/L0_socket/test.sh b/qa/L0_socket/test.sh index 36fa3811ea..2fd37bd054 100755 --- a/qa/L0_socket/test.sh +++ b/qa/L0_socket/test.sh @@ -359,7 +359,7 @@ for p in http grpc; do # (c) Test setting metrics-address explicitly to 127.0.0.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=true --reuse-grpc-port=true" - SERVER2_ARGS="--model-repository=$DATADIR --metrics-address 127.0.0.2 --metrics-port 8004 --reuse-http-port=1 --reuse-grpc-port=true" + SERVER2_ARGS="--model-repository=$DATADIR --metrics-address 127.0.0.2 --metrics-port 8004 --reuse-http-port=true --reuse-grpc-port=true" run_multiple_servers_nowait 3 sleep 15 if [ "$SERVER0_PID" == "0" ]; then