dockercloud-haproxy icon indicating copy to clipboard operation
dockercloud-haproxy copied to clipboard

Resolution too early

Open blop opened this issue 8 years ago • 0 comments
trafficstars

Sometimes, when scaling a service, HAProxy gets restarted with a new configuration but the docker dns seems not ready it to resolve the container name.

This makes HAProxy to fail starting properly. I added : EXTRA_DEFAULT_SETTINGS: "default-server init-addr last\\,libc\\,none"

So that even if the backend hostname does not resolve, it would resolve to none and start anyway. But then HAProxy keeps that backend in a "MAINTanance" status, and it won't come up after by itself, unless HAProxy is restarted. I'll create an issue for this to be fixed in HAProxy as well.

I suggest you setup the "default-server init-addr" with the none fallback ("last,libc,none") per default in the dockercloud-haproxy image.

blop avatar Aug 24 '17 14:08 blop