Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End2End: Increase logs in case of failures #323

Merged
merged 18 commits into from
May 27, 2020
5 changes: 4 additions & 1 deletion end2end/dockernetes_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ while ! systemctl is-active --quiet multi-user.target; do
sleep 2
if [ "$SECONDS" -gt "$K8S_TIMEOUT" ]; then
echo "ERROR: timed out waiting for kubernetes to start."
exit 1
kubectl get all --all-namespaces
kubectl describe nodes
# exit 1
EngHabu marked this conversation as resolved.
Show resolved Hide resolved
break
fi
done

Expand Down
1 change: 1 addition & 0 deletions end2end/execute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fi

# This is a separate function so that we can potentially reuse in the future when we have more than one test
function wait_for_flyte_deploys() {
df -H
SECONDS=0
echo ""
echo "waiting for flyte deploy to complete..."
Expand Down
1 change: 1 addition & 0 deletions end2end/launch_dockernetes.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -e

df -H
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

# stop any existing test container that might be running
Expand Down
12 changes: 10 additions & 2 deletions end2end/print_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -ex

df -H
kubectl get all --all-namespaces

echo "print_logs kubectl describe nodes"
kubectl describe nodes

function get_flyte_pods() {
echo $(kubectl -n flyte get pods | awk '{print $1}' | grep -v NAME)
}
Expand All @@ -11,10 +17,12 @@ echo $pods | while read -a podarray; do
for i in "${podarray[@]}"; do
echo "Logs for ${i}"
echo "------------------------------------------"

kubectl -n flyte describe pod $i || true
if [[ $i == *"flyteadmin"* ]]; then
kubectl -n flyte logs $i -c flyteadmin
kubectl -n flyte logs $i -c flyteadmin || true
else
kubectl -n flyte logs $i
kubectl -n flyte logs $i || true
fi
done
done
Expand Down
2 changes: 1 addition & 1 deletion end2end/tests/endtoend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
name: flytetester
resources:
requests:
cpu: "1"
cpu: "0.2"
memory: 500Mi
dnsPolicy: ClusterFirst
priority: 0
Expand Down