Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297543

Re: [Propose] Isolate core_pattern in mnt namespace.

From ebiederm@xmission.com (Eric W. Biederman)
Newsgroups linux.kernel
Subject Re: [Propose] Isolate core_pattern in mnt namespace.
Date 2015-12-23 18:00 +0100
Message-ID <qIUVz-3GD-1@gated-at.bofh.it> (permalink)
References (3 earlier) <qHCo2-39r-13@gated-at.bofh.it> <qHIWu-7l9-5@gated-at.bofh.it> <qI28N-2Sd-7@gated-at.bofh.it> <qIgOu-3Ob-39@gated-at.bofh.it> <qIIhH-4lA-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Dongsheng Yang <yangds.fnst@cn.fujitsu.com> writes:

> On 12/22/2015 05:52 AM, Eric W. Biederman wrote:
>> For your case that sounds like it would work.  Unfortunately for this to
>> be generally applicable and to let the OS in the contianer control it's
>> fate the core dump pattern needs to be supported.
>>
>> Otherwise something clever in userspace that can be written now should
>> be sufficient to fill the gap.  There is enough information for the user
>> mode helper to implement the policy you would like today.
>
> Hi Eric,
>
> To make sure I understand your point correctly:
> 	Do you mean we can write a userspace helper in host such as
> /usr/libexec/docker-pipe to get what I want?
>
> Yes, I would say, for my case, it would work. This helper can get the
> dump data from containers and dispatch them to different path such
> as /var/lib/docker/cores/<ContainerID>/.

Yes.  And there is enough information present at that time it can
save the core dumpes inside the container the application was
running in.

> But there would be two problems in this solution.
> (1). It may affect core dump on host. Normally, other processes in
>  host would not be happy to use a helper of docker-pipe for themselves.
>  But host have to share the core_pattern with containers, can't config
>  it by itself.

So far figuring out how to share the core dump helper appears simpler
than fixing user mode helper.

> (2). If there are some containers don't want to pass the core files
> to host, they can't set the core_pattern in this solution.

Again so far fixing that in user space appears to be more tractable
and easier than anything that has been proposed kernel side.

> IMO, we can get core files on host currently, by either non-pipe way I
> described above or the pipe way you suggested. But the problem is both
> of these methods would affect the core_pattern on host and other
> containers.
>
> So, I think the key point here is just isolating the core dump related
> sysctl in mnt namespace.

You don't have to convince me it would be nice to do.  You have to
convince me it is practical to implement.  Which is an entirely
different problem.

Given the other constraints on an implementation the pid namespace looks
by far the one best suited to host such a sysctl if it is possible to
implement safely.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[Propose] Isolate core_pattern in mnt namespace. Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-12-17 12:40 +0100
  Re: [Propose] Isolate core_pattern in mnt namespace. Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-12-20 03:30 +0100
    Re: [Propose] Isolate core_pattern in mnt namespace. Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-20 03:40 +0100
      Re: [Propose] Isolate core_pattern in mnt namespace. Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-12-20 04:00 +0100
        Re: [Propose] Isolate core_pattern in mnt namespace. ebiederm@xmission.com (Eric W. Biederman) - 2015-12-20 11:00 +0100
          Re: [Propose] Isolate core_pattern in mnt namespace. Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> - 2015-12-21 01:10 +0100
          Re: [Propose] Isolate core_pattern in mnt namespace. Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-12-21 07:30 +0100
            Re: [Propose] Isolate core_pattern in mnt namespace. ebiederm@xmission.com (Eric W. Biederman) - 2015-12-21 23:10 +0100
              Re: [Propose] Isolate core_pattern in mnt namespace. Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> - 2015-12-22 04:20 +0100
                Re: [Propose] Isolate core_pattern in mnt namespace. Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-12-23 04:30 +0100
              Re: [Propose] Isolate core_pattern in mnt namespace. Dongsheng Yang <yangds.fnst@cn.fujitsu.com> - 2015-12-23 04:30 +0100
                Re: [Propose] Isolate core_pattern in mnt namespace. ebiederm@xmission.com (Eric W. Biederman) - 2015-12-23 18:00 +0100

csiph-web