@@ -366,15 +366,31 @@ function validate_cortex() {
366366
367367 operator_load_balancer=" waiting"
368368 api_load_balancer=" waiting"
369- operator_endpoint_reachable=" waiting "
369+ operator_endpoint_reachable=" false "
370370 operator_pod_ready_cycles=0
371371 operator_endpoint=" "
372+ operator_pod_name=" "
373+ operator_pod_is_ready=" "
372374
373375 while true ; do
374376 # 30 minute timeout
375377 now=" $( date +%s) "
376378 if [ " $now " -ge " $(( $validation_start_time + 1800 )) " ]; then
377379 echo -e " \n\ntimeout has occurred when validating your cortex cluster"
380+ echo -e " \ndebugging info:"
381+ echo " operator pod name: $operator_pod_name "
382+ echo " operator pod is ready: $operator_pod_is_ready "
383+ echo " operator pod ready cycles: $operator_pod_ready_cycles "
384+ echo " api load balancer status: $api_load_balancer "
385+ echo " operator load balancer status: $operator_load_balancer "
386+ echo " operator endpoint: $operator_endpoint "
387+ if [ " $CORTEX_OPERATOR_LOAD_BALANCER_SCHEME " == " internet-facing" ]; then
388+ echo " operator endpoint reachable: $operator_endpoint_reachable "
389+ fi
390+ if [ " $operator_endpoint " != " " ]; then
391+ echo " operator curl response (404 is expected):"
392+ curl --max-time 3 $operator_endpoint
393+ fi
378394 exit 1
379395 fi
380396
@@ -385,8 +401,8 @@ function validate_cortex() {
385401 if [ " $operator_pod_name " == " " ]; then
386402 operator_pod_ready_cycles=0
387403 else
388- is_ready =$( kubectl -n=default get " $operator_pod_name " -o jsonpath=' {.status.containerStatuses[0].ready}' )
389- if [ " $is_ready " == " true" ]; then
404+ operator_pod_is_ready =$( kubectl -n=default get " $operator_pod_name " -o jsonpath=' {.status.containerStatuses[0].ready}' )
405+ if [ " $operator_pod_is_ready " == " true" ]; then
390406 (( operator_pod_ready_cycles++ ))
391407 else
392408 operator_pod_ready_cycles=0
@@ -414,11 +430,11 @@ function validate_cortex() {
414430 fi
415431
416432 if [ " $CORTEX_OPERATOR_LOAD_BALANCER_SCHEME " == " internet-facing" ]; then
417- if [ " $operator_endpoint_reachable " != " ready " ]; then
433+ if [ " $operator_endpoint_reachable " != " true " ]; then
418434 if ! curl --max-time 3 $operator_endpoint > /dev/null 2>&1 ; then
419435 continue
420436 fi
421- operator_endpoint_reachable=" ready "
437+ operator_endpoint_reachable=" true "
422438 fi
423439 fi
424440
0 commit comments