On Mon, Nov 20, 2017 at 12:55:06PM +0100, Tim Düsterhus wrote:
> William,
> 
> Am 20.11.2017 um 12:01 schrieb William Lallemand:
> >> The only difference I can see is that haproxy will fail to start for a
> >> different reason (use of undefined option, instead of not sending the
> >> READY=1 notification) if one uses the provided unit file *without*
> >> compiling with USE_SYSTEMD.
> >> Thus in my opinion a separate -Ws option will increase cognitive load 
> >> (which
> >> option should I use?) for next to no benefit.
> > 
> > 
> > Well, it's a matter of documentation, and a line to add in the usage() 
> > function
> > IMO.
> > 
> > This option ensures one thing, if the -Ws option is used in the unit file by
> > default, and if by any chance a binary was not built with the right
> > USE_SYSTEMD=1 option, it won't work at all preventing useless bug reports. 
> > We
> > can even put a Warning when trying to use this option when it's not built.
> > 
> 
> May I suggest the following: If haproxy is *not* compiled with the
> `USE_SYSTEMD` option it checks for the existence of the `NOTIFY_SOCKET`
> environment variable and refuses start up, if it is defined.
> 
> Then `Type=notify` will "just work" if haproxy is compiled with the
> option and will emit a proper error message if it is not.
> 

If you're suggesting of doing this with -W, it's not a good idea, sometimes you
just want to start HAProxy for tests or development independently of any init
system.

-- 
William Lallemand

Reply via email to