Commit e407e22e authored by Tomas Krizek's avatar Tomas Krizek

Merge branch 'fix-wait-for-ports' into 'master'

job_manager: fix waiting for open ports

See merge request !33
parents 289d5dd0 5d7a5430
Pipeline #40296 passed with stage
in 47 seconds
......@@ -25,7 +25,7 @@ MAX_RETRIES=60
{% for resolver in resolvers.values() -%}
retries=0
{% if resolver['port'] %}
while [ ! -z $(ss --all --no-header '( dport = :{{ resolver["port"] }} or sport = :{{ resolver["port"] }} )') ]; do
while [ ! -z "$(ss --all --no-header '( dport = :{{ resolver["port"] }} or sport = :{{ resolver["port"] }} )')" ]; do
retries=$((retries+1))
if (( $retries > $MAX_RETRIES )); then
echo "ERROR: port {{ resolver['port'] }} not availble" >&2
......@@ -36,7 +36,7 @@ done
{% endif %}
{% if resolver['tls_port'] %}
retries=0
while [ ! -z $(ss --all --no-header '( dport = :{{ resolver["tls_port"] }} or sport = :{{ resolver["tls_port"] }} )') ]; do
while [ ! -z "$(ss --all --no-header '( dport = :{{ resolver["tls_port"] }} or sport = :{{ resolver["tls_port"] }} )')" ]; do
retries=$((retries+1))
if (( $retries > $MAX_RETRIES )); then
echo "ERROR: port {{ resolver['tls_port'] }} not availble" >&2
......@@ -71,7 +71,7 @@ set -o xtrace
# Attempt to build containers (to have stdout/err logs in case of failure)
export KNOT_BRANCH={{ knot_branch }}
time docker-compose up --no-start
time docker-compose up --no-start >&2
# Start and wait for resolvers to be available
./restart-all.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment