From c3c17b2bc30f24a6940523fad743bf57321705de Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 5 Apr 2024 09:40:57 +0200 Subject: [PATCH] Increase DNS timeout for CoreDNS users (#5000) * Increase DNS timeout for CoreDNS users CoreDNS forward plug-in fails in ~6s, then fallback triggers. However, the default timeout of glibc and musl is 5s. Increase default timeout to make sure CoreDNS fallback is working on first query. * Pass option as list --- supervisor/docker/manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/supervisor/docker/manager.py b/supervisor/docker/manager.py index 7eddc912b..faec88993 100644 --- a/supervisor/docker/manager.py +++ b/supervisor/docker/manager.py @@ -177,6 +177,11 @@ class DockerAPI: if dns: kwargs["dns"] = [str(self.network.dns)] kwargs["dns_search"] = [DNS_SUFFIX] + # CoreDNS forward plug-in fails in ~6s, then fallback triggers. + # However, the default timeout of glibc and musl is 5s. Increase + # default timeout to make sure CoreDNS fallback is working + # on first query. + kwargs["dns_opt"] = ["timeout:10"] if hostname: kwargs["domainname"] = DNS_SUFFIX