Re: Maybe too strict check for frontend/backend name conflicts

From: Krzysztof Oledzki <ole#ans.pl>
Date: Fri, 2 Nov 2007 01:06:21 +0100 (CET)

On Thu, 1 Nov 2007, Willy Tarreau wrote:

> Hi Krzysztof !

Hi Willy,

> 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.

But a listen entry has a backand capability, so theoretically it can be used with use_backed/default_backend, etc.

> 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.

Yes, this solution seems to be very reasonable.

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

Actually, I believe one of my patches, I have developed for some time, can be very easily adopted to do this. If you can wait a day or two I can post finished version with this additional improvement.

Best regards,

                                 Krzysztof Olędzki Received on 2007/11/02 01:06

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