mirror of
https://github.com/systemd/systemd.git
synced 2024-11-26 19:53:45 +08:00
coredump: rename AccessContainer= to EnterNamespace=
This commit is contained in:
parent
b8fe1b1dc8
commit
e26a7e08f5
@ -110,14 +110,14 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>AccessContainer=</varname></term>
|
||||
<term><varname>EnterNamespace=</varname></term>
|
||||
|
||||
<listitem><para>Controls whether <command>systemd-coredump</command> will attempt to use the mount tree of
|
||||
a process that crashed within a container. Access to the container's filesystem might be necessary to generate
|
||||
a process that crashed in PID namespace. Access to the namespace's mount tree might be necessary to generate
|
||||
a fully symbolized backtrace. If set to <literal>yes</literal>, then <command>systemd-coredump</command> will
|
||||
obtain the mount tree from corresponding mount namespace and will try to generate the stack trace using the
|
||||
binary and libraries from the mount namespace. Note that the coredump of the containerized process might
|
||||
still be saved in <filename>/var/lib/systemd/coredump/</filename> even if <varname>AccessContainer=</varname>
|
||||
binary and libraries from the mount namespace. Note that the coredump of the namespaced process might
|
||||
still be saved in <filename>/var/lib/systemd/coredump/</filename> even if <varname>EnterNamespace=</varname>
|
||||
is set to <literal>no</literal>. Defaults to <literal>no</literal>.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v257"/>
|
||||
|
@ -173,7 +173,9 @@ static uint64_t arg_external_size_max = EXTERNAL_SIZE_MAX;
|
||||
static uint64_t arg_journal_size_max = JOURNAL_SIZE_MAX;
|
||||
static uint64_t arg_keep_free = UINT64_MAX;
|
||||
static uint64_t arg_max_use = UINT64_MAX;
|
||||
static bool arg_access_container = false;
|
||||
#if HAVE_DWFL_SET_SYSROOT
|
||||
static bool arg_enter_namespace = false;
|
||||
#endif
|
||||
|
||||
static int parse_config(void) {
|
||||
static const ConfigTableItem items[] = {
|
||||
@ -185,9 +187,9 @@ static int parse_config(void) {
|
||||
{ "Coredump", "KeepFree", config_parse_iec_uint64, 0, &arg_keep_free },
|
||||
{ "Coredump", "MaxUse", config_parse_iec_uint64, 0, &arg_max_use },
|
||||
#if HAVE_DWFL_SET_SYSROOT
|
||||
{ "Coredump", "AccessContainer", config_parse_bool, 0, &arg_access_container },
|
||||
{ "Coredump", "EnterNamespace", config_parse_bool, 0, &arg_enter_namespace },
|
||||
#else
|
||||
{ "Coredump", "AccessContainer", config_parse_warn_compat, DISABLED_CONFIGURATION, 0 },
|
||||
{ "Coredump", "EnterNamespace", config_parse_warn_compat, DISABLED_CONFIGURATION, 0 },
|
||||
#endif
|
||||
{}
|
||||
};
|
||||
@ -1669,7 +1671,7 @@ static int gather_pid_mount_tree_fd(const Context *context, int *ret_fd) {
|
||||
assert(context);
|
||||
assert(ret_fd);
|
||||
|
||||
if (!arg_access_container) {
|
||||
if (!arg_enter_namespace) {
|
||||
*ret_fd = -EHOSTDOWN;
|
||||
log_debug("EnterNamespace=no so we won't use mount tree of the crashed process for generating backtrace.");
|
||||
return 0;
|
||||
|
@ -25,4 +25,4 @@
|
||||
#JournalSizeMax=767M
|
||||
#MaxUse=
|
||||
#KeepFree=
|
||||
#AccessContainer=no
|
||||
#EnterNamespace=no
|
||||
|
Loading…
Reference in New Issue
Block a user