Maybe too strict check for frontend/backend name conflicts

From: Willy Tarreau <w#1wt.eu>
Date: Thu, 1 Nov 2007 23:45:29 +0100


Hi Krzysztof !

I've passed several old configs from a customer through "haproxy -c -f" on the latest versions. Interestingly, it warned about some missing timeouts and such incoherencies, and it detected many duplicate names.

In fact, for a long time I've been telling users that the name after the "listen" keyword was not used for anything except logs, and some of the users who have several hundreds of "listen" entries in one single file tend to copy/paste them. Also, they could argue that their configs are not fundamentally wrong since they put the application's name as the listen's name, and the conflicts occur when an application uses multiple ports. Since those configs are for haproxy 1.1 and 1.2, they all rely on simple "listen" entries, and there's no content switching involved.

So I was thinking that we could relax the conflict checking so that it only complains if a backend designated in use_backend/default_backend appears more than once. In case the listen entries are duplicated and never referenced anywhere, we would only yell a big fat warning about the risks involved, but still accept to start up. This will considerably smoothen the transition from listen-mode to frontend+backend.

I will see if I find a way to do that test very easily, but I think I have an idea.

Best regards,
Willy Received on 2007/11/01 23:45

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