Skip to content

Commit 52ddf16

Browse files
authored
Merge pull request #417 from benjaminguttmann-avtq/fix-grafana-bionic
[grafana] Add timeout to nc to prevent it from freezing for bionic st…
2 parents 9cccf94 + 02ad1d6 commit 52ddf16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jobs/grafana/templates/bin/grafana-admin-password

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eu
55
retries=60
66
for ((i=0; i<=retries; i++)); do
77
echo "Waiting for grafana to listen on port <%= p('grafana.server.http_port') %> ($i/$retries)"
8-
if nc 127.0.0.1 <%= p('grafana.server.http_port') %> < /dev/null; then
8+
if nc -w 5 127.0.0.1 <%= p('grafana.server.http_port') %> < /dev/null; then
99
echo "Grafana is ready"
1010
break
1111
fi

0 commit comments

Comments
 (0)