Hi Lukas, On Tue, Dec 05, 2017 at 12:30:17AM +0100, Lukas Tribus wrote: > Hello, > > > as reported by Martin Brauer: > https://discourse.haproxy.org/t/config-frontend-global-has-no-bind-directive/1858 > > If we configure "stats timeout", but no corresponding socket, haproxy > emits a bogus warning at startup about the "frontend GLOBAL" not > having a bind directive: > > global > #stats socket run/admin.sock mode 660 level admin > stats timeout 30s > > > [WARNING] 334/150131 (23086) : config : frontend 'GLOBAL' has no > 'bind' directive. Please declare it as a backend if this was intended. > > > This behavior can be seen since we enabled this warning in f3934b8c > ("MEDIUM: config: emit a warning on a frontend without listener"). > Not sure about the root cause here ...
Interesting corner case. I see what's happening. Any "stats" directive in the global section creates the frontend if it doesn't exist, so that the timeout can be stored. And "stats socket" creates the listeners, hence the similar syntax with "bind" directives. I'll check how the patch above works, but most likely the most efficient solution will consist in ensuring we ignore this for the global frontend. I'm just a bit surprized as I didn't remember that this frontend was present in the global list, but that might also explain why we have this side effect ;-) Thanks, Willy

