mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 08:47:56 +00:00
Merge pull request #9169 from ldoktor/backport-ocp
ci.ocp: Backport service-up detection fixes
This commit is contained in:
commit
df17bf95d5
@ -57,16 +57,26 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
info "Wait for the HTTP server to respond"
|
info "Wait for the HTTP server to respond"
|
||||||
rm -f hello_msg.txt
|
tempfile=$(mktemp)
|
||||||
waitForProcess 60 1 "curl '${host}:${port}${hello_file}' -s -o hello_msg.txt"
|
check_cmd="curl -vvv '${host}:${port}${hello_file}' 2>&1 | tee -a '$tempfile' | grep -q '$hello_msg'"
|
||||||
|
if waitForProcess 60 1 "${check_cmd}"; then
|
||||||
grep "${hello_msg}" hello_msg.txt > /dev/null
|
test_status=0
|
||||||
test_status=$?
|
|
||||||
if [ $test_status -eq 0 ]; then
|
|
||||||
info "HTTP server is working"
|
info "HTTP server is working"
|
||||||
else
|
else
|
||||||
|
test_status=1
|
||||||
|
echo "::error:: HTTP server not working"
|
||||||
|
echo "::group::Output of the \"curl -vvv '${host}:${port}${hello_file}'\""
|
||||||
|
cat "${tempfile}"
|
||||||
|
echo "::endgroup::"
|
||||||
|
echo "::group::Describe kube-system namespace"
|
||||||
|
oc describe -n kube-system all
|
||||||
|
echo "::endgroup::"
|
||||||
|
echo "::group::Descibe current namespace"
|
||||||
|
oc describe all
|
||||||
|
echo "::endgroup::"
|
||||||
info "HTTP server is unreachable"
|
info "HTTP server is unreachable"
|
||||||
fi
|
fi
|
||||||
|
rm -f "$tempfile"
|
||||||
|
|
||||||
# Delete the resources.
|
# Delete the resources.
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user