On 03/26/2018 12:00 PM, Thierry Fournier wrote:
Hi list,
Hi Thierry,
The name of the "server" directive allows [A-Za-Z0-9_.:-] (see function invalid_char()). The name allowed for the "server-template" directive only allows [A-Za-Z_.-], the chars [0-9:] disappear.
I do not remember if there was any valid reason to forbid digit characters in server template prefixes.
Let's say it is natural to use non digits for a prefix, followed by digits.
This limitation forces the modifications of all the server names which contains numbers and forces to review the monitoring system. This is not great.
I see. I guess you configured haproxy with a configuration file with server IDs (not created by a server-template) with digits that you replaced by a server-template?
It have a good reason to reject chars [0-9:] ?
I guess that we thought that it was more readable to format server IDs concatenating non-digits, then digits to form numbers to distinguish the server IDs. Something like that, not sure.
I have no objection to accept your patch (have a look to the comments).
If it is not a case, I join a patch which fix the syntax for [0-9], not for ':'
Regards. Fred.

