Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding connection timeout to probe script #367

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion onos-classic/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v1
name: onos-classic
version: 0.1.13
version: 0.1.14
kubeVersion: ">=1.10.0"
appVersion: 2.2.6
description: ONOS cluster
Expand Down
4 changes: 2 additions & 2 deletions onos-classic/templates/configmap-probe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data:
# Wait for {{ .Values.probe_timeout }}s before timing out
host=`hostname -s`
id=onos-`hostname -s | awk -F '-' '{print $NF}'`
result=$(curl -m {{ .Values.probe_timeout }} -s -f http://$host:8181/onos/v1/cluster/$id --user onos:rocks)
result=$(curl --connect-timeout {{ .Values.probe_timeout }} -m {{ .Values.probe_timeout }} -s -f http://$host:8181/onos/v1/cluster/$id --user onos:rocks)
echo $result

if ! printf '%q' $result | grep -q -i "READY"; then
Expand All @@ -29,7 +29,7 @@ data:
{{- end }}

for app in ${apps[@]}; do
result=$(curl -m {{ .Values.probe_timeout }} -s -f http://$host:8181/onos/v1/applications/$app/health --user onos:rocks)
result=$(curl --connect-timeout {{ .Values.probe_timeout }} -m {{ .Values.probe_timeout }} -s -f http://$host:8181/onos/v1/applications/$app/health --user onos:rocks)
echo $result
if ! printf %q $result | grep -q -i "READY"; then
echo "$app is not yet ready"
Expand Down