From 09013760d27c32a793b3738833a7beb0e2fdd6ee Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 22 Jan 2020 03:13:10 +0100 Subject: Check also performance problems in OpenShift scheduling (pods staying too long in ContainerCreating state) --- service/check_kaas.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'service') 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" -- cgit v1.2.3