Welcome! Log In Create A New Profile

Advanced

Possible bug: configuration check is not checking resolvers

Posted by Marcos Moreno 
Marcos Moreno
Possible bug: configuration check is not checking resolvers
August 07, 2018 02:20PM
Dear list members,

I am not sure if this can be filed as a bug, but we are always eager to
contribute, and we had just an issue with a production server and wanted
that more experienced eyes had an opinion:

While creating a config, we have a server with the following configuration:

server myserver1 supercool-dockercontainer:80 check resolvers
docker_resolver resolve-prefer ipv4

Somehow we missed to put the "resolvers docker_resolver" configuration in
the configuration file, so it was totally missing. We mean: the following
was NOT in the config file:
resolvers docker_resolver
nameserver dns 127.0.0.11:53

However, by checking the configuration it was saying that the configuration
was fine. This is the commands we were using (yes, we are sure this is the
config file):
/usr/local/sbin/haproxy -c -V /usr/local/etc/haproxy/haproxy.cfg


First thing after running, haproxy sends an alert and dies:
[ALERT] 218/105233 (1) : config : backend 'mybacken1', server 'myserver1':
unable to find required resolvers 'docker_resolver'

So obviously not having the resolver is an error that kills haproxy.
However, it was not found with a configuration check.

Then the question:
-Was it the right way of checking the configuration? Missing some parameter?
-If it was the right check, should it not be found by the configuration
checker command?--> So we found a small little bug?;-).

Thanks and have a nice day,
Marcos Moreno.
On Tue, Aug 7, 2018 at 2:14 PM, Marcos Moreno <[email protected]>
wrote:

> Dear list members,
>
> I am not sure if this can be filed as a bug, but we are always eager to
> contribute, and we had just an issue with a production server and wanted
> that more experienced eyes had an opinion:
>
> While creating a config, we have a server with the following configuration:
>
> server myserver1 supercool-dockercontainer:80 check resolvers
> docker_resolver resolve-prefer ipv4
>
> Somehow we missed to put the "resolvers docker_resolver" configuration in
> the configuration file, so it was totally missing. We mean: the following
> was NOT in the config file:
> resolvers docker_resolver
> nameserver dns 127.0.0.11:53
>
> However, by checking the configuration it was saying that the
> configuration was fine. This is the commands we were using (yes, we are
> sure this is the config file):
> /usr/local/sbin/haproxy -c -V /usr/local/etc/haproxy/haproxy.cfg
>
>
> First thing after running, haproxy sends an alert and dies:
> [ALERT] 218/105233 (1) : config : backend 'mybacken1', server 'myserver1':
> unable to find required resolvers 'docker_resolver'
>
> So obviously not having the resolver is an error that kills haproxy.
> However, it was not found with a configuration check.
>
> Then the question:
> -Was it the right way of checking the configuration? Missing some
> parameter?
> -If it was the right check, should it not be found by the configuration
> checker command?--> So we found a small little bug?;-).
>
> Thanks and have a nice day,
> Marcos Moreno.
>


Hi Marcos,

Thanks for reporting this!
You're testing procedure is the right one and I'm a bit suprised this is
happening!
I can also confirm I can reproduce this behavior and I will provide a fix
soon.

Baptiste
Sorry, only registered users may post in this forum.

Click here to login