Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Adding restart of marketplace community pod if operator install fails…
Browse files Browse the repository at this point in the history
… and dumping odh operator logs (#205)

* Do Not Merge:  Debugging ci

* Adding an attempt at restarting the marketplace pod also dumping the odh-operator logs on a fail.

* Remove unnecessary restart of community-operators pod
  • Loading branch information
Chad Roberts authored Oct 22, 2020
1 parent 1f591b1 commit 3eb9f51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions tests/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ while [[ $retry -gt 0 ]]; do
./setup.sh -o ~/peak/operatorsetup 2>&1
if [ $? -eq 0 ]; then
retry=-1
fi
else
echo "Trying restart of marketplace community operator pod"
oc delete pod -n openshift-marketplace $(oc get pod -n openshift-marketplace -l marketplace.operatorSource=community-operators -o jsonpath="{$.items[*].metadata.name}")
sleep 3m
fi
retry=$(( retry - 1))
sleep 1m
done
echo "Pausing 20 seconds to allow operator to start"
sleep 20s
popd
## Grabbing and applying the patch in the PR we are testing
pushd ~/src/odh-manifests
Expand Down
4 changes: 3 additions & 1 deletion tests/scripts/installandtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ if [ "$?" -ne 0 ]; then
if [ -z "${SKIP_PODS_OUTPUT}" ]; then
echo "Here's a dump of the pods:"
oc get pods -o json -n ${ODHPROJECT}
echo "Logs from the opendatahub-operator pod"
oc logs -n openshift-operators $(oc get pods -n openshift-operators -l name=opendatahub-operator -o jsonpath="{$.items[*].metadata.name}")
fi
exit 1
fi

## Debugging pause...uncomment below to be able to poke around the test pod post-test
# echo "Debugging pause for 3 hours"
# sleep 180m
#sleep 180m

0 comments on commit 3eb9f51

Please sign in to comment.