aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mr-zookeeper-health.sh
blob: 3da456c05a92c305d9e26a777eb9e9d1ad230161 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
zkpod=$(/consul/config/bin/kubectl -n onap-message-router get pod | grep -o "zookeeper-[^[:space:]]*")
if [ -n "$zkpod" ]; then
   if /consul/config/bin/kubectl -n onap-message-router exec -it $zkpod -- ps ef | grep -i zookeeper; then
      echo Success. Zookeeper process is running. 2>&1
      exit 0
   else
      echo Failed. Zookeeper is not running. 2>&1
      exit 1
   fi
else
   echo Failed. Zookeeper container is offline. 2>&1
   exit 1
fi