File tree Expand file tree Collapse file tree
tests/e2e-prow/rhoai/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,6 +426,9 @@ _restart_lightspeed_core() {
426426 fi
427427
428428 oc label pod lightspeed-stack-service pod=lightspeed-stack-service -n " $NAMESPACE " --overwrite
429+ # Grace period: readiness probe passing does not guarantee port 8080 is bound yet.
430+ # Skipping this sleep causes immediate EOF on the first port-forward attempts.
431+ sleep 15
429432
430433 if ! cmd_restart_port_forward; then
431434 echo " ⚠️ Lightspeed port-forward failed"
@@ -469,7 +472,7 @@ cmd_restart_lightspeed() {
469472cmd_restart_port_forward () {
470473 local local_port=" ${LOCAL_PORT:- 8080} "
471474 local remote_port=" ${REMOTE_PORT:- 8080} "
472- local max_attempts=6
475+ local max_attempts=10
473476 local pf_pid
474477 local pf_resource
475478
@@ -496,12 +499,14 @@ cmd_restart_port_forward() {
496499 disown " $pf_pid " 2> /dev/null || true
497500 sleep 3
498501
499- # Bind error or API error: process exits quickly — surface /tmp/port-forward.log every time
502+ # Bind error or API error: process exits quickly — surface /tmp/port-forward.log every time.
503+ # Sleep longer on EOF ("dialing backend: EOF") since it means the container port is not
504+ # bound yet; 2s was too short and caused all retries to be exhausted before the app was ready.
500505 if ! kill -0 " $pf_pid " 2> /dev/null; then
501506 echo " Port-forward process exited immediately:"
502507 e2e_ops_emit_port_forward_immediate_failure_diag
503508 kill_stale_lightspeed_forward " $local_port "
504- sleep 2
509+ sleep 10
505510 continue
506511 fi
507512 sleep 6
You can’t perform that action at this time.
0 commit comments