Work around pdnsmysql connection freezes

This commit is contained in:
Bernhard "bero" Rosenkränzer (Boggins) 2025-02-18 14:26:45 +01:00
parent 30bdb3148a
commit daa834162d

View File

@ -396,6 +396,16 @@ start_service() {
kill -9 $SPINPID &> /dev/null
fail "There was a problem starting service /federated/apps/$SERVICE\nCheck the output of 'docker logs $SERVICE' or turn on\ndebug with set -x"
fi
if [ "$SERVICE" = "pdnsmysql" ]; then
# Workaround for an obscure bug where network connections from the outside aren't
# accepted until a network connection has been created from the inside.
# Seems to occur at semi-random, more frequently with docker 27.5.1
# A simple ping -c1 1.1.1.1 would probably be sufficient, but ping and
# friends don't exist in the mariadb container
# FIXME we should fix this properly instead of applying this workaround
# some time.
docker exec -ti $SERVICE apt update
fi
((RETRY--))
sleep 7
fi