Skip to content

Commit

Permalink
Specify seconds for CONN_TIMEOUT in connector Pods
Browse files Browse the repository at this point in the history
`ncat -w` defaults to seconds but gives a warning when unit
not explicitly specified. This causes errors in msg exchanged
between listener and connect pods.

Explicitly specify unit as seconds when passing arg to `ncat -w`
to avoid the warning and resulting errors.

Signed-off-by: Vishal Thapar <[email protected]>
  • Loading branch information
vthapar committed Dec 17, 2024
1 parent 0708006 commit 7c379ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/framework/network_pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func (np *NetworkPod) buildTCPCheckListenerPod() {
"for i in $(seq 1 $BUFS_NUM);" +
" do echo [dataplane] listener says $SEND_STRING;" +
" done" +
" | nc -w $CONN_TIMEOUT -l -v -p $LISTEN_PORT -s 0.0.0.0 >/dev/termination-log 2>&1",
" | nc -w ${CONN_TIMEOUT}s -l -v -p $LISTEN_PORT -s 0.0.0.0 >/dev/termination-log 2>&1",
},
Env: []v1.EnvVar{
{Name: "LISTEN_PORT", Value: strconv.FormatInt(int64(np.Config.Port), 10)},
Expand Down Expand Up @@ -328,7 +328,7 @@ func (np *NetworkPod) buildTCPCheckConnectorPod() {
"for in in $(seq 1 $BUFS_NUM);" +
" do echo [dataplane] connector says $SEND_STRING; done" +
" | for i in $(seq $CONN_TRIES);" +
" do if nc -v $REMOTE_IP $REMOTE_PORT -w $CONN_TIMEOUT;" +
" do if nc -v $REMOTE_IP $REMOTE_PORT -w ${CONN_TIMEOUT}s;" +
" then break;" +
" else sleep $RETRY_SLEEP;" +
" fi; done >/dev/termination-log 2>&1",
Expand Down

0 comments on commit 7c379ea

Please sign in to comment.