summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2021-02-26 12:36:09 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2021-02-26 12:36:43 +0000
commitcd5d573fc8efd29c3b0ae4bf2879d860c1960a23 (patch)
tree717c1ad15e2d38ffe8f89557a2bcc4a715eca123
parent2ca54e350a95bd06149c1d7c59c9502f5b40e35c (diff)
downloadinfrastructure-cd5d573fc8efd29c3b0ae4bf2879d860c1960a23.tar.gz
HAProxy; Configure init-addr to avoid startup failures
Sometimes, DNS don't resolve when the system is starting, and resolving basreock.gitlab.io is needed in order to start HAProxy. By configuring with , we ignore DNS issues upon startup. More information here: - https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#5.2-init-addr
-rw-r--r--baserock_frontend/haproxy.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/baserock_frontend/haproxy.cfg b/baserock_frontend/haproxy.cfg
index 193effd5..1217e957 100644
--- a/baserock_frontend/haproxy.cfg
+++ b/baserock_frontend/haproxy.cfg
@@ -29,6 +29,9 @@ defaults
log global
option httplog
+ # never fail on address resolution
+ default-server init-addr last,libc,none
+
frontend http-in
# All HTTP traffic is redirected to HTTPS using the '301 Moved' HTTP code.
bind *:80