From daa834162df1f43c76419d575f4cea6d6f83b077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Tue, 18 Feb 2025 14:26:45 +0100 Subject: [PATCH] Work around pdnsmysql connection freezes --- lib/functions.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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