Hi guys, On Wed, Apr 04, 2018 at 12:32:41PM +0200, Lukas Tribus wrote: > Hello Baptiste, > > > > - (for Lukas) what do you think is better, a configuration option to trigger > > parsing of resolv.conf or as proposed, if no nameserver are found, we use > > resolv.conf as a failback? > > > I don't think we need a config knob for this; currently we don't do > anything when no nameservers are configured; that behavior combined > with the by-default enabled libc resolver at startup can cause some > confusion. > > Transitioning to a resolv.conf fallback is the correct thing to do here imho. > > > Just: > - only fallback if no resolvers are configured in haproxy configuration > - don't fallback if configured resolvers are unresponsive > - update the documentation at the same time > > > I don't think we need a new config know.
Just thinking, is the goal *not to have to* configure "resolve" on server lines in this case, or to avoid having to pre-configure the resolvers themselves when they're the same as the system's ? If the former, that would mean always enabling DNS resolving at runtime which doesn't sound like a good idea at all to me. If the latter, then why not have a special directive in the resolvers section to indicate that it should use resolv.conf instead ? That could avoid some surprizes when you simply comment your all your resolvers and that suddenly the behaviour changes. I'd even say that this directive could serve to populate the resolvers section from resolv.conf (thus possibly several resolvers) which will ensure the exclusivity between the two mechanisms. Cheers, Willy