Willy,

Am 06.05.19 um 07:23 schrieb Willy Tarreau:
> On Mon, May 06, 2019 at 01:29:20AM +0200, Tim Düsterhus wrote:
>> - What about 'resolution_pool_size'? The only thing it does is emitting
>> a warning (not a fatal error). I believe it can also be removed from the
>> documentation.
> 
> Apparently there is no single stable version with this directive, I
> think it was added during development and removed later. Thus both
> the doc entry and the parsing can be removed.

I opted to make it fatal (because there is no harm in doing so).

>> - What about 'block' and 'redispatch' and the various *timeouts which
>> are deprecated since more than 5 years (with HAProxy 1.5):
>> https://github.com/haproxy/haproxy/commit/de9d2d7b86abb0d7110bc3190aca5b26fec6fd64,
>> https://github.com/haproxy/haproxy/commit/a3c504c032614ee65af434e41c08ebe46855ebd8
>> and
>> https://github.com/haproxy/haproxy/commit/ed44649eb78a8ce5efc203f273c7df774defe2af
>>   Currently they appear to still be functional. Perhaps they can be made
>> non-functional (fatal error) and removed from the documentation.
> 
> While I totally agree with this, I want users of 1.9 to experience the
> least possible friction when upgrading to 2.0 because 1.9 is not LTS.
> However I'm totally OK with removing them from the doc right now and
> removing them completely in 2.1. In addition, I wanted to remove all
> the req* and rsp* directives for 1.9 but I recalled it too late in the
> development cycle. Similarly I'd like to see all these directives emit
> a warning now and be removed in 2.1. Their existence causes too much
> trouble, they are not evaluated in the same order as the other ones,
> and they are totally emulated nowadays (the header block is artificially
> rebuilt, passed to them for regex processing, and the result is parsed
> again and reinjected into the headers block). Thus I would welcome a
> patch adding the warnings and recommendations for alternatives to all
> of them. This along with the legacy HTTP code removal are the things
> that could deserve opening the -next branch if someone is interested in
> starting these cleanups.

Okay, I did a sweep through the configuration parser and:

1. Made deprecated directives fatal and removed them from the docs. The
   error messages speak of "HAProxy 2.1", thus it should be merged into
   some kind of 'next' branch.
2. Made deprecated directives actually warn and remove them from the docs
   as well. No need to document deprecated options, users can simply peek
   into the old docs. Also the error messages are pretty clear on what
   needs to be done to fix it.

What I did not update:

1. Usage of deprecated directives in the 'tests' directory. The fact that
   the tests still use deprecated directives indicates that no one even
   uses them any more. Maybe these tests should outright be removed?
2. 'req*' and 'rsp*'. I remember that they allow some modification that
   cannot easily be replicated otherwise (but I'll have to check that
   first).

What I wasn't sure about: The 'transparent' directive. It is deprecated in
the docs, but it does not warn. When taking a look into the configuration
parser it appears to set different flags compared to 'option transparent'.
Can you please take a look at this and either add an appropriate warning or
remove the deprecated note from the docs?

Best regards

Tim Duesterhus (6):
  CLEANUP: Make 'resolution_pool_size' directive fatal
  CLEANUP: Make 'block' directive fatal
  CLEANUP: Make 'redispatch' directive fatal
  CLEANUP: Make '(cli|con|srv)timeout' directive fatal
  CLEANUP: Make 'option forceclose' actually warn
  CLEANUP: Remove 'option independant-streams'

 doc/configuration.txt  | 212 +----------------------------------------
 examples/haproxy.vim   |   6 +-
 include/types/global.h |  11 ++-
 src/cfgparse-listen.c  |  50 +++-------
 src/cfgparse.c         |   4 +-
 src/proxy.c            |  30 +++---
 6 files changed, 44 insertions(+), 269 deletions(-)

-- 
2.21.0


Reply via email to