Skip to content

Commit

Permalink
MEDIUM: cfgparse: warn about deprecated use of duplicate server names
Browse files Browse the repository at this point in the history
As discussed below, there are too many problems and limitations caused
by still supporting duplicate server names. That's already particularly
complicated and dissuasive to use since it requires these servers to
have explicit IDs to be accept. Let's now warn on any duplicate, even
with explicit IDs and remind that this will become forbidden in 3.3.

Link: https://www.mail-archive.com/[email protected]/msg45185.html
  • Loading branch information
wtarreau committed Sep 20, 2024
1 parent 029d75d commit e77c733
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cfgparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3772,6 +3772,11 @@ int check_config_validity()
cfgerr++;
break;
}

ha_warning("parsing [%s:%d] : %s '%s', another server named '%s' was already defined at line %d. This is dangerous and will not be supported anymore in version 3.3. Please use distinct names.\n",
newsrv->conf.file, newsrv->conf.line,
proxy_type_str(curproxy), curproxy->id,
newsrv->id, other_srv->conf.line);
}
}

Expand Down

0 comments on commit e77c733

Please sign in to comment.