mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-21 10:00:32 -04:00
MINOR: config: support explicit "on" and "off" for "set-dumpable"
The global "set-dumpable" keyword currently is only positional. Let's extend its syntax to support arguments. For now we support both "on" and "off" to explicitly enable or disable it.
This commit is contained in:
parent
94a4578ccf
commit
6152a4eef5
2 changed files with 17 additions and 7 deletions
|
|
@ -3148,10 +3148,11 @@ server-state-file <file>
|
|||
configuration. See also "server-state-base" and "show servers state",
|
||||
"load-server-state-from-file" and "server-state-file-name"
|
||||
|
||||
set-dumpable
|
||||
set-dumpable [ on | off ]
|
||||
This option is better left disabled by default and enabled only upon a
|
||||
developer's request. If it has been enabled, it may still be forcibly
|
||||
disabled by prefixing it with the "no" keyword. It has no impact on
|
||||
developer's request. By default it is disabled. Without argument, it defaults
|
||||
to "on". If it has been enabled, it may still be forcibly disabled by prefixing
|
||||
it with the "no" keyword or by setting it to "off". It has no impact on
|
||||
performance nor stability but will try hard to re-enable core dumps that were
|
||||
possibly disabled by file size limitations (ulimit -f), core size limitations
|
||||
(ulimit -c), or "dumpability" of a process after changing its UID/GID (such
|
||||
|
|
|
|||
|
|
@ -89,12 +89,21 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
|
|||
global.tune.options |= GTUNE_BUSY_POLLING;
|
||||
}
|
||||
else if (strcmp(args[0], "set-dumpable") == 0) { /* "no set-dumpable" or "set-dumpable" */
|
||||
if (alertif_too_many_args(0, file, linenum, args, &err_code))
|
||||
if (alertif_too_many_args(1, file, linenum, args, &err_code))
|
||||
goto out;
|
||||
if (kwm == KWM_NO)
|
||||
if (kwm == KWM_NO) {
|
||||
global.tune.options &= ~GTUNE_SET_DUMPABLE;
|
||||
else
|
||||
global.tune.options |= GTUNE_SET_DUMPABLE;
|
||||
goto out;
|
||||
}
|
||||
if (!*args[1] || strcmp(args[1], "on") == 0)
|
||||
global.tune.options |= GTUNE_SET_DUMPABLE;
|
||||
else if (strcmp(args[1], "off") == 0)
|
||||
global.tune.options &= ~GTUNE_SET_DUMPABLE;
|
||||
else {
|
||||
ha_alert("parsing [%s:%d] : '%s' only supports 'on' and 'off' as an argument, found '%s'.\n", file, linenum, args[0], args[1]);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
else if (strcmp(args[0], "h2-workaround-bogus-websocket-clients") == 0) { /* "no h2-workaround-bogus-websocket-clients" or "h2-workaround-bogus-websocket-clients" */
|
||||
if (alertif_too_many_args(0, file, linenum, args, &err_code))
|
||||
|
|
|
|||
Loading…
Reference in a new issue