diff --git a/lib/functions.sh b/lib/functions.sh index 3760a9d..12661c7 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -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