diff --git a/doc/management.txt b/doc/management.txt index 57179611e..ec9e1164d 100644 --- a/doc/management.txt +++ b/doc/management.txt @@ -2130,6 +2130,11 @@ del backend This operation is only possible for TCP or HTTP proxies. To succeed, the backend instance must have been first unpublished. + There is also additional restrictions which prevent backend removal. + Currently, this is the case when deprecated dispatch or option transparent + are used. Also, a backend cannot be removed if there is a stick-table + declared in it. + This command is restricted and can only be issued on sockets configured for level "admin". Moreover, this feature is still considered in development so it also requires experimental mode (see "experimental-mode on"). diff --git a/src/proxy.c b/src/proxy.c index adbbd63f1..7dde62887 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -5014,6 +5014,16 @@ int be_check_for_deletion(const char *bename, struct proxy **pb, const char **pm goto out; } + if (be->options & (PR_O_DISPATCH|PR_O_TRANSP)) { + msg = "Deletion of backend with deprecated dispatch/transparent options is not supported."; + goto out; + } + + if (be->table) { + msg = "Cannot remove a backend with stick-table."; + goto out; + } + if (be->cap & PR_CAP_FE) { msg = "Cannot delete a listen section."; goto out;