Skip to content

Commit

Permalink
Add timeout loop to DSC install (trustyai-explainability#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobGeada authored and yhwang committed Oct 21, 2024
1 parent b808a5a commit 08f1009
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,23 @@ else

echo "Creating the following DSC"
cat ./${DSC_FILENAME} > ${ARTIFACT_DIR}/${DSC_FILENAME}
oc apply -f ./odh-core-dsci.yaml
oc apply -f ./${DSC_FILENAME}

kfctl_result=$?
if [ "$kfctl_result" -ne 0 ]; then
start_t=$(date +%s) 2>&1
ready=1 2>&1
while [ "$ready" -ne 0 ]; do
oc apply -f ./odh-core-dsci.yaml
oc apply -f ./${DSC_FILENAME}
ready=$?
if [ $(($(date +%s)-start_t)) -gt 300 ]; then
echo "ODH DSC Installation timeout"
exit 1
fi
sleep 10
done

if [ "$ready" -ne 0 ]; then
echo "The installation failed"
exit $kfctl_result
exit $ready
fi
fi
set +x
Expand Down

0 comments on commit 08f1009

Please sign in to comment.