Skip to content

Commit

Permalink
[VOL-2950][VOL-3110][AETHER-457] Make sure apps are all activated bef…
Browse files Browse the repository at this point in the history
…ore marking the pod as ready
  • Loading branch information
charlesmcchan committed Aug 2, 2020
1 parent fd63176 commit 8626760
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion onos-classic/Chart.yaml
@@ -1,7 +1,7 @@
---
apiVersion: v1
name: onos-classic
version: 0.1.4
version: 0.1.5
kubeVersion: ">=1.10.0"
appVersion: 2.2.2
description: ONOS cluster
Expand Down
26 changes: 23 additions & 3 deletions onos-classic/templates/configmap-probe.yaml
Expand Up @@ -13,6 +13,26 @@ data:
#!/bin/bash
set -e
host=$(hostname -s)
config=$(curl -s http://$host:8181/onos/v1/cluster/$host --user onos:rocks)
echo $config
printf '%q' $config | grep -q "READY"
result=$(curl -s -f http://$host:8181/onos/v1/cluster/$host --user onos:rocks)
echo $result
printf '%q' $result | grep -q "READY"
if [ ! $? ]; then
echo "Cluster is not yet ready"
return -1
fi
apps=()
{{- range .Values.apps }}
apps+=("{{ . }}")
{{- end }}
for app in ${apps[@]}; do
result=$(curl -s -f http://$host:8181/onos/v1/applications/$app --user onos:rocks)
echo $result
printf %q $result | grep -q "ACTIVE"
if [ ! $? ]; then
echo "$app is not yet activated"
return -1
fi
done

0 comments on commit 8626760

Please sign in to comment.