Re: BUG/MINOR : wrong error message during 'default-server' lines
Hi Frederic. Am 16-04-2017 17:44, schrieb Frederic Lecaille: On 04/16/2017 05:40 PM, Frederic Lecaille wrote: On 04/15/2017 12:13 AM, Aleksandar Lazic wrote: Hi. Hello Aleksandar, Am 14-04-2017 15:59, schrieb Frederic Lecaille: Hello, This patch fixes a minor bug, a wrong error message during 'usesrc' keyword parsing on 'default-server' lines. 'usesrc' was displayed as unknown if not used after 'source' keyword. When I take a look into the docs I see that the source and therefore the usesrc is not supported in default-server http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#5.2-source --- Supported in default-server: No --- This is the current doc. Indeed both 'source' and 'usesrc' keywords are not supported by haprox 1.7. I meant not supported on 'default-server' lines ;) Thank you for the clarification. Regards Aleks
Re: BUG/MINOR : wrong error message during 'default-server' lines
On 04/16/2017 05:40 PM, Frederic Lecaille wrote: On 04/15/2017 12:13 AM, Aleksandar Lazic wrote: Hi. Hello Aleksandar, Am 14-04-2017 15:59, schrieb Frederic Lecaille: Hello, This patch fixes a minor bug, a wrong error message during 'usesrc' keyword parsing on 'default-server' lines. 'usesrc' was displayed as unknown if not used after 'source' keyword. When I take a look into the docs I see that the source and therefore the usesrc is not supported in default-server http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#5.2-source --- Supported in default-server: No --- This is the current doc. Indeed both 'source' and 'usesrc' keywords are not supported by haprox 1.7. I meant not supported on 'default-server' lines ;)
Re: BUG/MINOR : wrong error message during 'default-server' lines
On 04/15/2017 12:13 AM, Aleksandar Lazic wrote: Hi. Hello Aleksandar, Am 14-04-2017 15:59, schrieb Frederic Lecaille: Hello, This patch fixes a minor bug, a wrong error message during 'usesrc' keyword parsing on 'default-server' lines. 'usesrc' was displayed as unknown if not used after 'source' keyword. When I take a look into the docs I see that the source and therefore the usesrc is not supported in default-server http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#5.2-source --- Supported in default-server: No --- This is the current doc. Indeed both 'source' and 'usesrc' keywords are not supported by haprox 1.7. But when I look into the "Alphabetically sorted keywords reference" then it is supported on the default server. http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#source%20%28Alphabetically%20sorted%20keywords%20reference%29 supported in *defaults* sections... this is what I see, or have I missed something? What's true? Regards, Fred Regards Aleks Regards, Fred.
Re: BUG/MINOR : wrong error message during 'default-server' lines
On Fri, Apr 14, 2017 at 03:59:40PM +0200, Frederic Lecaille wrote: > Hello, > > This patch fixes a minor bug, a wrong error message during 'usesrc' keyword > parsing on 'default-server' lines. > > 'usesrc' was displayed as unknown if not used after 'source' keyword. Applied, thank you Fred. Willy
Re: BUG/MINOR : wrong error message during 'default-server' lines
Hi. Am 14-04-2017 15:59, schrieb Frederic Lecaille: Hello, This patch fixes a minor bug, a wrong error message during 'usesrc' keyword parsing on 'default-server' lines. 'usesrc' was displayed as unknown if not used after 'source' keyword. When I take a look into the docs I see that the source and therefore the usesrc is not supported in default-server http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#5.2-source --- Supported in default-server: No --- But when I look into the "Alphabetically sorted keywords reference" then it is supported on the default server. http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#source%20%28Alphabetically%20sorted%20keywords%20reference%29 What's true? Regards, Fred Regards Aleks
BUG/MINOR : wrong error message during 'default-server' lines
Hello, This patch fixes a minor bug, a wrong error message during 'usesrc' keyword parsing on 'default-server' lines. 'usesrc' was displayed as unknown if not used after 'source' keyword. Regards, Fred >From a9d8045bbc3858607aa0f5d8ab5e1c4c353cce14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Fri, 14 Apr 2017 15:19:56 +0200 Subject: [PATCH] BUG/MINOR: server: Fix a wrong error message during 'usesrc' keyword parsing. 'usesrc' setting is not permitted on 'server' lines if not provided after 'source' setting. This is now also the case on 'default-server' lines. Without this patch parse_server() parser displayed that 'usersrc' is an unknown keyword. Should have come with dba9707 commit. --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index b5d8890..40a8d7f 100644 --- a/src/server.c +++ b/src/server.c @@ -2207,7 +2207,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr } cur_arg += 2; } - else if (!defsrv && !strcmp(args[cur_arg], "usesrc")) { /* address to use outside: needs "source" first */ + else if (!strcmp(args[cur_arg], "usesrc")) { /* address to use outside: needs "source" first */ Alert("parsing [%s:%d] : '%s' only allowed after a '%s' statement.\n", file, linenum, "usesrc", "source"); err_code |= ERR_ALERT | ERR_FATAL; -- 2.1.4