This command cannot be used if the reference <acl> is a name also used with
a map. In this case, the "add map" command must be used instead.
-add backend <name> from <defproxy> [mode <mode>] [ EXPERIMENTAL ]
+add backend <name> from <defproxy> [mode <mode>] [guid <guid>] [ EXPERIMENTAL ]
Instantiate a new backend proxy with the name <name>.
Only TCP or HTTP proxies can be created. All of the settings are inherited
from <defproxy> default proxy instance. By default, it is mandatory to
specify the backend mode via the argument of the same name, unless <defproxy>
- already defines it explicitely.
+ already defines it explicitely. It is also possible to use an optional GUID
+ argument if wanted.
Servers can be added via the command "add server". The backend is initialized
in the unpublished state. Once considered ready for traffic, use "publish
static int cli_parse_add_backend(char **args, char *payload, struct appctx *appctx, void *private)
{
struct proxy *px, *defpx;
- const char *be_name, *def_name, *err;
+ const char *be_name, *def_name, *guid = NULL, *err;
char *msg = NULL;
enum pr_mode mode = 0;
return 1;
}
}
+ /* guid */
+ else if (*args[2] && !guid && strcmp(args[1], "guid") == 0) {
+ guid = args[2];
+ }
/* unknown, malformed or duplicate argument */
else {
- cli_err(appctx, "Usage: add backend <name> from <defproxy> [mode <px_mode>].\n");
+ cli_err(appctx, "Usage: add backend <name> from <defproxy> [mode <px_mode>] [guid <val>].\n");
return 1;
}