BUG/MEDIUM: server: extend thread-isolate over much of CLI 'add server'

Some config parsing handlers were designed to be run at startup on a
single-thread. When executing at runtime for dynamic servers,
thread-safety is not guaranteed. This is the case for example in
srv_parse_id which manipulates backend used_ids tree.

One solution could be to add locks but it might be tricky to found all
affected functions and it can be an easy source of deadlock. The other
solution which has been chosen is to use thread-isolation over almost
all of the cli_parse_add_server CLI handler.

For now this solution is sufficient. If some users make heavy use of the
'add server', hurting the overall performance, it will be necessary to
design a much thinner solution.

This must be backported up to 2.4.

(cherry picked from commit 31ddd76fef720c35c22acc39016feea5604e5b39)
[wt: ctx adjustments around error messages]
Signed-off-by: Willy Tarreau <w@1wt.eu>
1 file changed