Merge "Update APPC OOM appc.properties file"
[oom.git] / kubernetes / consul / resources / config / consul-agent-config / scripts / mr-zookeeper-health.sh
1 zkpod=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "message-router-zookeeper-[^[:space:]]*")
2 if [ -n "$zkpod" ]; then
3    if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $zkpod -- ps ef | grep -i zookeeper; then
4       echo Success. Zookeeper process is running. 2>&1
5       exit 0
6    else
7       echo Failed. Zookeeper is not running. 2>&1
8       exit 1
9    fi
10 else
11    echo Failed. Zookeeper container is offline. 2>&1
12    exit 1
13 fi