Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-02 Thread Andrew Vagin
On Fri, Jul 29, 2016 at 01:05:48PM -0500, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > > > Hi Eric, > > > > On 07/28/2016 02:56 PM, Eric W. Biederman wrote: > >> "Michael Kerrisk (man-pages)" writes: > >> > >>> On 07/26/2016

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-02 Thread Andrew Vagin
On Fri, Jul 29, 2016 at 01:05:48PM -0500, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > > > Hi Eric, > > > > On 07/28/2016 02:56 PM, Eric W. Biederman wrote: > >> "Michael Kerrisk (man-pages)" writes: > >> > >>> On 07/26/2016 10:39 PM, Andrew Vagin wrote: > On Tue, Jul

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-01 Thread Andrew Vagin
On Mon, Aug 01, 2016 at 08:20:27PM +0200, Alban Crequy wrote: > Hi, > > On 14 July 2016 at 20:20, Andrey Vagin wrote: > > Each namespace has an owning user namespace and now there is not way > > to discover these relationships. > > > > Pid and user namepaces are hierarchical.

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-01 Thread Andrew Vagin
On Mon, Aug 01, 2016 at 08:20:27PM +0200, Alban Crequy wrote: > Hi, > > On 14 July 2016 at 20:20, Andrey Vagin wrote: > > Each namespace has an owning user namespace and now there is not way > > to discover these relationships. > > > > Pid and user namepaces are hierarchical. There is no way to

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-01 Thread Alban Crequy
Hi, On 14 July 2016 at 20:20, Andrey Vagin wrote: > Each namespace has an owning user namespace and now there is not way > to discover these relationships. > > Pid and user namepaces are hierarchical. There is no way to discover > parent-child relationships too. > > Why we may

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-01 Thread Alban Crequy
Hi, On 14 July 2016 at 20:20, Andrey Vagin wrote: > Each namespace has an owning user namespace and now there is not way > to discover these relationships. > > Pid and user namepaces are hierarchical. There is no way to discover > parent-child relationships too. > > Why we may want to know

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-31 Thread Michael Kerrisk (man-pages)
Hi Eric, On 07/29/2016 08:05 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: Hi Eric, On 07/28/2016 02:56 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: On 07/26/2016 10:39 PM, Andrew Vagin wrote: On

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-31 Thread Michael Kerrisk (man-pages)
Hi Eric, On 07/29/2016 08:05 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: Hi Eric, On 07/28/2016 02:56 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: On 07/26/2016 10:39 PM, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-29 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > Hi Eric, > > On 07/28/2016 02:56 PM, Eric W. Biederman wrote: >> "Michael Kerrisk (man-pages)" writes: >> >>> On 07/26/2016 10:39 PM, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 09:17:31PM +0200,

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-29 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > Hi Eric, > > On 07/28/2016 02:56 PM, Eric W. Biederman wrote: >> "Michael Kerrisk (man-pages)" writes: >> >>> On 07/26/2016 10:39 PM, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: >> If we

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-28 Thread Michael Kerrisk (man-pages)
Hi Eric, On 07/28/2016 02:56 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: On 07/26/2016 10:39 PM, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: If we want to compare two file descriptors of

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-28 Thread Michael Kerrisk (man-pages)
Hi Eric, On 07/28/2016 02:56 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: On 07/26/2016 10:39 PM, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: If we want to compare two file descriptors of the current process, it

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-28 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > On 07/26/2016 10:39 PM, Andrew Vagin wrote: >> On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: >> If we want to compare two file descriptors of the current process, >> it is one of cases for which kcmp

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-28 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > On 07/26/2016 10:39 PM, Andrew Vagin wrote: >> On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: >> If we want to compare two file descriptors of the current process, >> it is one of cases for which kcmp can be used. We can call

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-28 Thread Michael Kerrisk (man-pages)
On 07/26/2016 10:39 PM, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: Hello Andrew, On 26 July 2016 at 20:25, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: On

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-28 Thread Michael Kerrisk (man-pages)
On 07/26/2016 10:39 PM, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: Hello Andrew, On 26 July 2016 at 20:25, Andrew Vagin wrote: On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: On 07/26/2016 04:54 AM, Andrew

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 11:32:25AM -0700, W. Trevor King wrote: > On Tue, Jul 26, 2016 at 11:25:24AM -0700, Andrew Vagin wrote: > > Sure. If a process wants to compare two namespaces, it needs to get file > > descriptors for them (open /proc/PID/ns/XXX, use new ioctl-s, find a > > process which

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 11:32:25AM -0700, W. Trevor King wrote: > On Tue, Jul 26, 2016 at 11:25:24AM -0700, Andrew Vagin wrote: > > Sure. If a process wants to compare two namespaces, it needs to get file > > descriptors for them (open /proc/PID/ns/XXX, use new ioctl-s, find a > > process which

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > On 07/26/2016 04:54 AM, Andrew Vagin wrote: > > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > > > "Michael Kerrisk (man-pages)" writes: > > > > [snip] > > > > > [snip] >

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > On 07/26/2016 04:54 AM, Andrew Vagin wrote: > > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > > > "Michael Kerrisk (man-pages)" writes: > > > > [snip] > > > > > [snip] > > > > > > So, from my

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: > Hello Andrew, > > On 26 July 2016 at 20:25, Andrew Vagin wrote: > > On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > >> On 07/26/2016 04:54 AM, Andrew Vagin wrote: >

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: > Hello Andrew, > > On 26 July 2016 at 20:25, Andrew Vagin wrote: > > On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > >> On 07/26/2016 04:54 AM, Andrew Vagin wrote: > >> > On Mon, Jul 25,

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Eric W. Biederman
Andrew Vagin writes: > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: >> "Michael Kerrisk (man-pages)" writes: > > [snip] > >> [snip] >> >>> So, from my point of view, the important piece that was missing from >> >>> your commit

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Eric W. Biederman
Andrew Vagin writes: > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: >> "Michael Kerrisk (man-pages)" writes: > > [snip] > >> [snip] >> >>> So, from my point of view, the important piece that was missing from >> >>> your commit message was the note to use

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Michael Kerrisk (man-pages)
Hello Andrew, On 26 July 2016 at 20:25, Andrew Vagin wrote: > On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: >> On 07/26/2016 04:54 AM, Andrew Vagin wrote: >> > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: >> > > "Michael

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Michael Kerrisk (man-pages)
Hello Andrew, On 26 July 2016 at 20:25, Andrew Vagin wrote: > On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: >> On 07/26/2016 04:54 AM, Andrew Vagin wrote: >> > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: >> > > "Michael Kerrisk (man-pages)"

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread W. Trevor King
On Tue, Jul 26, 2016 at 11:25:24AM -0700, Andrew Vagin wrote: > Sure. If a process wants to compare two namespaces, it needs to get file > descriptors for them (open /proc/PID/ns/XXX, use new ioctl-s, find a > process which has them), > and then it calls kcmp(pid1, pid2, KCMP_NSFD, ns_fd1, ns_fd2)

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread W. Trevor King
On Tue, Jul 26, 2016 at 11:25:24AM -0700, Andrew Vagin wrote: > Sure. If a process wants to compare two namespaces, it needs to get file > descriptors for them (open /proc/PID/ns/XXX, use new ioctl-s, find a > process which has them), > and then it calls kcmp(pid1, pid2, KCMP_NSFD, ns_fd1, ns_fd2)

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Michael Kerrisk (man-pages)
On 07/26/2016 04:54 AM, Andrew Vagin wrote: On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: [snip] [snip] So, from my point of view, the important piece that was missing from your commit message was the note

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Michael Kerrisk (man-pages)
On 07/26/2016 04:54 AM, Andrew Vagin wrote: On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: [snip] [snip] So, from my point of view, the important piece that was missing from your commit message was the note to use

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: [snip] > [snip] > >>> So, from my point of view, the important piece that was missing from > >>> your commit message was the note to use

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: [snip] > [snip] > >>> So, from my point of view, the important piece that was missing from > >>> your commit message was the note to use readlink("/proc/self/fd/%d") > >>> on the returned

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:10:21AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Hello, > > > > I forgot to add --cc-cover for git send-email, so everyone who is in > > Cc got only a cover letter. All messages were sent in mail lists. > > > > Sorry for

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:10:21AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Hello, > > > > I forgot to add --cc-cover for git send-email, so everyone who is in > > Cc got only a cover letter. All messages were sent in mail lists. > > > > Sorry for inconvenience. > > Mostly

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Eric W. Biederman
"Serge E. Hallyn" writes: > Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): >> Hi Eric, >> >> On 07/25/2016 03:18 PM, Eric W. Biederman wrote: >> >"Michael Kerrisk (man-pages)" writes: >> > >> >>Hi Andrey, >> >> >> >>On 07/22/2016 08:25

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Eric W. Biederman
"Serge E. Hallyn" writes: > Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): >> Hi Eric, >> >> On 07/25/2016 03:18 PM, Eric W. Biederman wrote: >> >"Michael Kerrisk (man-pages)" writes: >> > >> >>Hi Andrey, >> >> >> >>On 07/22/2016 08:25 PM, Andrey Vagin wrote: >> >>Perhaps add

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > Hi Eric, > > On 07/25/2016 03:18 PM, Eric W. Biederman wrote: >> "Michael Kerrisk (man-pages)" writes: >> >>> Hi Andrey, >>> >>> On 07/22/2016 08:25 PM, Andrey Vagin wrote: On Thu, Jul 21, 2016 at 11:48

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > Hi Eric, > > On 07/25/2016 03:18 PM, Eric W. Biederman wrote: >> "Michael Kerrisk (man-pages)" writes: >> >>> Hi Andrey, >>> >>> On 07/22/2016 08:25 PM, Andrey Vagin wrote: On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) wrote:

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Serge E. Hallyn
Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): > Hi Eric, > > On 07/25/2016 03:18 PM, Eric W. Biederman wrote: > >"Michael Kerrisk (man-pages)" writes: > > > >>Hi Andrey, > >> > >>On 07/22/2016 08:25 PM, Andrey Vagin wrote: > >>>On Thu, Jul 21, 2016 at

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Serge E. Hallyn
Quoting Michael Kerrisk (man-pages) (mtk.manpa...@gmail.com): > Hi Eric, > > On 07/25/2016 03:18 PM, Eric W. Biederman wrote: > >"Michael Kerrisk (man-pages)" writes: > > > >>Hi Andrey, > >> > >>On 07/22/2016 08:25 PM, Andrey Vagin wrote: > >>>On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Michael Kerrisk (man-pages)
Hi Eric, On 07/25/2016 03:18 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: Hi Andrey, On 07/22/2016 08:25 PM, Andrey Vagin wrote: On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) wrote: Hi Andrey, On

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Michael Kerrisk (man-pages)
Hi Eric, On 07/25/2016 03:18 PM, Eric W. Biederman wrote: "Michael Kerrisk (man-pages)" writes: Hi Andrey, On 07/22/2016 08:25 PM, Andrey Vagin wrote: On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) wrote: Hi Andrey, On 07/21/2016 11:06 PM, Andrew Vagin wrote: On Thu,

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > Hi Andrey, > > On 07/22/2016 08:25 PM, Andrey Vagin wrote: >> On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) >> wrote: >>> Hi Andrey, >>> >>> >>> On 07/21/2016 11:06 PM, Andrew Vagin wrote:

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > Hi Andrey, > > On 07/22/2016 08:25 PM, Andrey Vagin wrote: >> On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) >> wrote: >>> Hi Andrey, >>> >>> >>> On 07/21/2016 11:06 PM, Andrew Vagin wrote: On Thu, Jul 21, 2016 at 04:41:12PM

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Michael Kerrisk (man-pages)
Hi Andrey, On 07/22/2016 08:25 PM, Andrey Vagin wrote: On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) wrote: Hi Andrey, On 07/21/2016 11:06 PM, Andrew Vagin wrote: On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) wrote: Hi

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Michael Kerrisk (man-pages)
Hi Andrey, On 07/22/2016 08:25 PM, Andrey Vagin wrote: On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) wrote: Hi Andrey, On 07/21/2016 11:06 PM, Andrew Vagin wrote: On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) wrote: Hi Andrey, On 07/14/2016 08:20

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread Eric W. Biederman
Andrey Vagin writes: > Hello, > > I forgot to add --cc-cover for git send-email, so everyone who is in > Cc got only a cover letter. All messages were sent in mail lists. > > Sorry for inconvenience. Mostly the code looked sensible. But I had a couple of issues. Resend this

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread Eric W. Biederman
Andrey Vagin writes: > Hello, > > I forgot to add --cc-cover for git send-email, so everyone who is in > Cc got only a cover letter. All messages were sent in mail lists. > > Sorry for inconvenience. Mostly the code looked sensible. But I had a couple of issues. Resend this in September (when

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread Eric W. Biederman
"W. Trevor King" writes: > On Sat, Jul 23, 2016 at 04:56:44PM -0500, Eric W. Biederman wrote: >> "W. Trevor King" writes: >> > On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: >> >> On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: >>

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread Eric W. Biederman
"W. Trevor King" writes: > On Sat, Jul 23, 2016 at 04:56:44PM -0500, Eric W. Biederman wrote: >> "W. Trevor King" writes: >> > On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: >> >> On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: >> >> > namespaces(7) and clone(2) both

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread W. Trevor King
On Sat, Jul 23, 2016 at 04:56:44PM -0500, Eric W. Biederman wrote: > "W. Trevor King" writes: > > On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: > >> On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: > >> > namespaces(7) and clone(2) both have: > >> > >

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread W. Trevor King
On Sat, Jul 23, 2016 at 04:56:44PM -0500, Eric W. Biederman wrote: > "W. Trevor King" writes: > > On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: > >> On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: > >> > namespaces(7) and clone(2) both have: > >> > > >> > When a

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread Eric W. Biederman
"W. Trevor King" writes: 2> On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: >> On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: >> > namespaces(7) and clone(2) both have: >> > >> > When a network namespace is freed (i.e., when the last process >> >

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread Eric W. Biederman
"W. Trevor King" writes: 2> On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: >> On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: >> > namespaces(7) and clone(2) both have: >> > >> > When a network namespace is freed (i.e., when the last process >> > in the namespace

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread W. Trevor King
On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: > On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: > > namespaces(7) and clone(2) both have: > > > > When a network namespace is freed (i.e., when the last process > > in the namespace terminates), its physical network

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread W. Trevor King
On Sat, Jul 23, 2016 at 02:38:56PM -0700, James Bottomley wrote: > On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: > > namespaces(7) and clone(2) both have: > > > > When a network namespace is freed (i.e., when the last process > > in the namespace terminates), its physical network

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread James Bottomley
On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: > On Thu, Jul 14, 2016 at 11:20:14AM -0700, Andrey Vagin wrote: > > Pid and user namepaces are hierarchical. There is no way to > > discover parent-child relationships too. > > It bothers me that network namespaces are not hierarchical too

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread James Bottomley
On Sat, 2016-07-23 at 14:14 -0700, W. Trevor King wrote: > On Thu, Jul 14, 2016 at 11:20:14AM -0700, Andrey Vagin wrote: > > Pid and user namepaces are hierarchical. There is no way to > > discover parent-child relationships too. > > It bothers me that network namespaces are not hierarchical too

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread W. Trevor King
On Thu, Jul 14, 2016 at 11:20:14AM -0700, Andrey Vagin wrote: > Pid and user namepaces are hierarchical. There is no way to discover > parent-child relationships too. It bothers me that network namespaces are not hierarchical too ;). namespaces(7) and clone(2) both have: When a network

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-23 Thread W. Trevor King
On Thu, Jul 14, 2016 at 11:20:14AM -0700, Andrey Vagin wrote: > Pid and user namepaces are hierarchical. There is no way to discover > parent-child relationships too. It bothers me that network namespaces are not hierarchical too ;). namespaces(7) and clone(2) both have: When a network

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-22 Thread Andrey Vagin
On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) wrote: > Hi Andrey, > > > On 07/21/2016 11:06 PM, Andrew Vagin wrote: >> >> On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) >> wrote: >>> >>> Hi Andrey, >>> >>> On 07/14/2016 08:20 PM,

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-22 Thread Andrey Vagin
On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages) wrote: > Hi Andrey, > > > On 07/21/2016 11:06 PM, Andrew Vagin wrote: >> >> On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) >> wrote: >>> >>> Hi Andrey, >>> >>> On 07/14/2016 08:20 PM, Andrey Vagin wrote: >> >> >>

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-21 Thread Andrew Vagin
On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Andrey, > > On 07/14/2016 08:20 PM, Andrey Vagin wrote: > > Could you add here an of the API in detail: what do these FDs refer to, > and how do you use them to solve the use case? And could you you add > that

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-21 Thread Andrew Vagin
On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Andrey, > > On 07/14/2016 08:20 PM, Andrey Vagin wrote: > > Could you add here an of the API in detail: what do these FDs refer to, > and how do you use them to solve the use case? And could you you add > that

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-21 Thread Michael Kerrisk (man-pages)
Hi Andrey, On 07/14/2016 08:20 PM, Andrey Vagin wrote: Each namespace has an owning user namespace and now there is not way to discover these relationships. Pid and user namepaces are hierarchical. There is no way to discover parent-child relationships too. Why we may want to know

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-21 Thread Michael Kerrisk (man-pages)
Hi Andrey, On 07/14/2016 08:20 PM, Andrey Vagin wrote: Each namespace has an owning user namespace and now there is not way to discover these relationships. Pid and user namepaces are hierarchical. There is no way to discover parent-child relationships too. Why we may want to know

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-14 Thread Andrey Vagin
Hello, I forgot to add --cc-cover for git send-email, so everyone who is in Cc got only a cover letter. All messages were sent in mail lists. Sorry for inconvenience. On Thu, Jul 14, 2016 at 11:20 AM, Andrey Vagin wrote: > Each namespace has an owning user namespace and now

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-14 Thread Andrey Vagin
Hello, I forgot to add --cc-cover for git send-email, so everyone who is in Cc got only a cover letter. All messages were sent in mail lists. Sorry for inconvenience. On Thu, Jul 14, 2016 at 11:20 AM, Andrey Vagin wrote: > Each namespace has an owning user namespace and now there is not way >

[PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-14 Thread Andrey Vagin
Each namespace has an owning user namespace and now there is not way to discover these relationships. Pid and user namepaces are hierarchical. There is no way to discover parent-child relationships too. Why we may want to know relationships between namespaces? One use would be visualization, in

[PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-14 Thread Andrey Vagin
Each namespace has an owning user namespace and now there is not way to discover these relationships. Pid and user namepaces are hierarchical. There is no way to discover parent-child relationships too. Why we may want to know relationships between namespaces? One use would be visualization, in