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

From: Willy Tarreau <w#1wt.eu>
Date: Sun, 4 Nov 2007 07:26:26 +0100


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 :

$ ./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. 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've pushed the patch to GIT after yours, and will most likely release 1.3.13.1 at this stage.

Thanks!
Willy Received on 2007/11/04 07:26

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