mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: server: implement init-addr none
The server is put into the "no address" maintenance state in this case.
This commit is contained in:
parent
25e515235a
commit
37ebe1212b
1 changed files with 8 additions and 1 deletions
|
|
@ -1182,8 +1182,11 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
|||
else if (!strcmp(p, "last")) {
|
||||
done = srv_append_initaddr(&newsrv->init_addr_methods, SRV_IADDR_LAST);
|
||||
}
|
||||
else if (!strcmp(p, "none")) {
|
||||
done = srv_append_initaddr(&newsrv->init_addr_methods, SRV_IADDR_NONE);
|
||||
}
|
||||
else {
|
||||
Alert("parsing [%s:%d]: '%s' : unknown init-addr method '%s', supported methods are 'libc', 'last'.\n",
|
||||
Alert("parsing [%s:%d]: '%s' : unknown init-addr method '%s', supported methods are 'libc', 'last', 'none'.\n",
|
||||
file, linenum, args[cur_arg], p);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
|
|
@ -3255,6 +3258,10 @@ static int srv_iterate_initaddr(struct server *srv)
|
|||
return_code |= err_code;
|
||||
break;
|
||||
|
||||
case SRV_IADDR_NONE:
|
||||
srv_set_admin_flag(srv, SRV_ADMF_RMAINT, NULL);
|
||||
return return_code;
|
||||
|
||||
default: /* unhandled method */
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue