Inaccurate message for errors on bind parsing

2012-10-24 Thread Holger Just

Hi there,

after half a day of debugging (and subsequently kicking myself), I 
finally noticed that whenever HAProxy (1.5-dev12 in this case) 
encounters an unknown option on a bind line, it will error out with this 
message irregardless of OpenSSL being enabled or not:


[ALERT] 296/194609 (6625) : parsing [/etc/haproxy/haproxy.cfg:40] : 
'bind' only supports the 'transparent', 'accept-proxy', 'defer-accept', 
'name', 'id', 'mss', 'mode', 'uid', 'gid', 'user', 'group' and 
'interface' options.


I thought I went crazy, thinking somehow OpenSSL support would not 
properly compile on a certain system when I only misconfigured it. It 
would be awesome if you could fix that message the cfgparse.c to reflect 
the actually available options. Unfortunately, I'm not versed enough in 
writing C to fix it myself :(


--Holger



Re: Inaccurate message for errors on bind parsing

2012-10-27 Thread Willy Tarreau
Hi Holger,

On Wed, Oct 24, 2012 at 11:52:59AM +0200, Holger Just wrote:
> Hi there,
> 
> after half a day of debugging (and subsequently kicking myself), I 
> finally noticed that whenever HAProxy (1.5-dev12 in this case) 
> encounters an unknown option on a bind line, it will error out with this 
> message irregardless of OpenSSL being enabled or not:
> 
> [ALERT] 296/194609 (6625) : parsing [/etc/haproxy/haproxy.cfg:40] : 
> 'bind' only supports the 'transparent', 'accept-proxy', 'defer-accept', 
> 'name', 'id', 'mss', 'mode', 'uid', 'gid', 'user', 'group' and 
> 'interface' options.

This is known and has since been fixed. All "bind" and "server" options
were hard-coded in cfgparse.c, then adding SSL made it a nightmare to
update the list so we thought we'd change this later on. Now in the latest
snapshot, "bind" and "server" keywords are registered, and when you use
the wrong one, the whole list is dumped with its scope of application.

I'm sorry you got hit by this but we can't improve in all areas at once
unfortunately.

Regards,
Willy