mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
MINOR: server: enable slowstart for dynamic server
Enable the 'slowstart' keyword for dynamic servers. The slowstart task is allocated in 'add server' handler if slowstart is used. As the server is created in disabled state, there is no need to start the task. The slowstart task will be automatically started on the first 'enable server' invocation.
This commit is contained in:
parent
29d1ac1330
commit
cd8a6f28c6
@ -1548,6 +1548,7 @@ add server <backend>/<server> [args]*
|
||||
- send-proxy-v2
|
||||
- send-proxy-v2-ssl
|
||||
- send-proxy-v2-ssl-cn
|
||||
- slowstart
|
||||
- sni
|
||||
- source
|
||||
- ssl
|
||||
|
@ -1673,7 +1673,7 @@ static struct srv_kw_list srv_kws = { "ALL", { }, {
|
||||
{ "resolvers", srv_parse_resolvers, 1, 1, 0 }, /* Configure the resolver to use for name resolution */
|
||||
{ "send-proxy", srv_parse_send_proxy, 0, 1, 1 }, /* Enforce use of PROXY V1 protocol */
|
||||
{ "send-proxy-v2", srv_parse_send_proxy_v2, 0, 1, 1 }, /* Enforce use of PROXY V2 protocol */
|
||||
{ "slowstart", srv_parse_slowstart, 1, 1, 0 }, /* Set the warm-up timer for a previously failed server */
|
||||
{ "slowstart", srv_parse_slowstart, 1, 1, 1 }, /* Set the warm-up timer for a previously failed server */
|
||||
{ "source", srv_parse_source, -1, 1, 1 }, /* Set the source address to be used to connect to the server */
|
||||
{ "stick", srv_parse_stick, 0, 1, 0 }, /* Enable stick-table persistence */
|
||||
{ "tfo", srv_parse_tfo, 0, 1, 1 }, /* enable TCP Fast Open of server */
|
||||
@ -4660,6 +4660,10 @@ static int cli_parse_add_server(char **args, char *payload, struct appctx *appct
|
||||
srv->agent.state &= ~CHK_ST_ENABLED;
|
||||
}
|
||||
|
||||
/* Init slowstart if needed. */
|
||||
if (init_srv_slowstart(srv))
|
||||
goto out;
|
||||
|
||||
/* Attach the server to the end of the proxy linked list. Note that this
|
||||
* operation is not thread-safe so this is executed under thread
|
||||
* isolation.
|
||||
|
Loading…
Reference in New Issue
Block a user