Re: [PATCH] Implement and use generic findproxy and relax duplicated proxy check

From: Krzysztof Oledzki <ole#ans.pl>
Date: Sun, 4 Nov 2007 15:04:33 +0100 (CET)

On Sun, 4 Nov 2007, Willy Tarreau wrote:

> On Sat, Nov 03, 2007 at 11:48:10PM +0100, Krzysztof Oledzki wrote:
>> Just mailed fixed version, should be ready now. Sorry for previous wrong
>> patch, I have been very busy lately and I was to hurry. :(
>
> Hey as I already told you, there's no problem. You work already helps me
> release faster and fix stupid things, I will not complain if I have to
> wait a bit sometimes :-)
>
> I've merged your patch, and still improved upon it (in another one). I noticed
> this when testing an existing configuration :

Thanks. :)

> $ ./haproxy -V -c -f examples/cttproxy-src.cfg
> [WARNING] 307/071152 (23816) : Parsing [examples/cttproxy-src.cfg:47]: duplicated proxy 'sample1' with conflicting capabilities: listener/listen!
> Configuration file is valid : examples/cttproxy-src.cfg
>
> I realized that the term "listener" I used to describe a "listen" instance
> was more confusing than helping.

Personally I would prefer to simply put here "listen". For me proxy is a general structure, and "listen", "frontend", "backend" and "ruleset" are more detailed instances compliant with cfg keywords.

So, if we put here:
[WARNING] 307/071152 (23816) : Parsing [examples/cttproxy-src.cfg:47]: duplicated proxy 'sample1' with conflicting capabilities: listen/listen! then it should be obvious to search for "listen sample1" definition.

> So I replaced it with "proxy" since it's how it's called everywhere in
> the logs and doc anyway. Also, I realized that "conflicting" was an
> awkward name since there is no real "conflict" here, the capabilities
> are just overlapping. And here, it's more helpful to tell the user that
> the name has been reused :
>
> $ ./haproxy -V -c -f examples/cttproxy-src.cfg
> [WARNING] 307/071411 (24029) : Parsing [examples/cttproxy-src.cfg:47]: proxy 'sample1' has same name as another proxy.
> Configuration file is valid : examples/cttproxy-src.cfg
>
> $ ./haproxy -V -c -f test1.cfg
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:47]: proxy 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:64]: frontend 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:64]: frontend 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:73]: frontend 'sample1' has same name as another frontend.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:73]: frontend 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:73]: frontend 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:82]: backend 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:82]: backend 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:95]: backend 'sample1' has same name as another backend.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:95]: backend 'sample1' has same name as another proxy.
> [WARNING] 307/071427 (24030) : Parsing [test1.cfg:95]: backend 'sample1' has same name as another proxy.
> Configuration file is valid : test1.cfg

I'm not sure about this. Usres may get confused why haproxy sometimes reports "has same name" (listen & listen) and sometimes not (backed & frontend). Maybe we should also put here info about "overlapping capabilities"?

Best regards,

                                 Krzysztof Olędzki Received on 2007/11/04 15:04

This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET