summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xservice/check_kaas.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/service/check_kaas.sh b/service/check_kaas.sh
index 546bef5..e190e0d 100755
--- a/service/check_kaas.sh
+++ b/service/check_kaas.sh
@@ -72,4 +72,14 @@ if [ $healthy -ne 0 ]; then
fi
fi
+# Find if schedulling takes too long
+if [ $healthy -ne 0 ]; then
+ pods=$(oc get pods --all-namespaces | grep "ContainerCreating" | awk '$6~/d|h/ { print } $6~/s/ { next } int(substr($6, 1, length($6) - 1)) > 3 { print }' | wc -l) #'
+ if [ $pods -gt 0 ]; then
+ healthy=2
+ echo "Scheduling problems for the following pods:"
+ oc get pods --all-namespaces | grep "ContainerCreating" | awk '$6~/d|h/ { print } $6~/s/ { next } int(substr($6, 1, length($6) - 1)) > 3 { print }'
+ fi
+fi
+
echo "$online $healthy $version $nodes"