summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2020-01-22 03:13:10 +0100
committerSuren A. Chilingaryan <csa@suren.me>2020-01-22 03:13:10 +0100
commit09013760d27c32a793b3738833a7beb0e2fdd6ee (patch)
tree745443fc4430eccc40e43b2fb03165257858a73e /service
parent2760dba480083977d179f095f47f28ec1913b9ec (diff)
downloadconky-09013760d27c32a793b3738833a7beb0e2fdd6ee.tar.gz
conky-09013760d27c32a793b3738833a7beb0e2fdd6ee.tar.bz2
conky-09013760d27c32a793b3738833a7beb0e2fdd6ee.tar.xz
conky-09013760d27c32a793b3738833a7beb0e2fdd6ee.zip
Check also performance problems in OpenShift scheduling (pods staying too long in ContainerCreating state)
Diffstat (limited to 'service')
-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"