All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Serge Hallyn <serge.hallyn@ubuntu.com>
Cc: containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, eparis@redhat.com,
	linux-audit@redhat.com, ebiederm@xmission.com, sgrubb@redhat.com
Subject: Re: [PATCH 0/2] namespaces: log namespaces per task
Date: Mon, 05 May 2014 21:59:10 -0700	[thread overview]
Message-ID: <1399352350.2164.91.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <20140506032732.GD6508@ubuntumail>

On Tue, 2014-05-06 at 03:27 +0000, Serge Hallyn wrote:
> Quoting James Bottomley (James.Bottomley@HansenPartnership.com):
> > >> Right, but when the contaner has an audit namespace, that namespace
> > >has
> > >> a name,
> > >
> > >What ns has a name?
> > 
> > The netns for instance.
> 
> And what is its name?

As I think you know ip netns list will show you all of them.  The way
they're applied is via mapped files in /var/run/netns/ which hold the
names.

>   The only name I know that we could log in an
> audit message is the /proc/self/ns/net inode number (which does not
> suffice)

OK, so I think this is the confusion: You're thinking the container
itself doesn't know what name the namespace has been given by the
system, all it knows is the inode number corresponding to a file which
it may or may not be able to see, right?  I'm thinking that the system
that set up the container gave those files names and usually they're the
same name for all the namespaces.  The point is that the orchestration
system (whatever set up the container) will be responsible for the
migration.  It will be the thing that has a unique handle for the
container.  The handle is usually ascii representable, either a human
readable name or some uuid/guid.  It's that handle that we should be
using to prefix the audit message, so when you set up an audit
namespace, it gets supplied with a prefix string corresponding to the
well known name for the container.  This is the string we'd preserve
across migration as part of the audit namespace state ... so the audit
messages all correlate to the container wherever it's migrated to; no
need to do complex tracking of changes to serial numbers.

> > >  The audit ns can be tied to 50 pid namespaces, and
> > >we
> > >want to log which pidns is responsible for something.
> > >
> > >If you mean the pidns has a name, that's the problem...  it does not,
> > >it
> > >only has a inode # which may later be re-use.
> > 
> > I still think there's a miscommunication somewhere: I believe you just need a stable id to tie the audit to, so why not just give the audit namespace a name like net?  The id would then be durable across migrations.
> 
> Maybe this is where we're confusing each other - I'm not talking
> about giving the audit ns a name.  I'm talking about being able to
> identify the other namespaces inside an audit message.  In a way
> that (a) is unique across bare metals' entire uptime, and (b)
> can be tracked across migrations.

OK, so that is different from what I'm thinking.  I'm thinking unique
name for migrateable entity, you want a unique name for each component
of the migrateable entity?  My instinct still tells me the orchestration
system is going to have a unique identifier for each different sub
container.

However, I have to point out that a serial number isn't what you want
either if you really mean bare metal.  We do a lot of deployments where
the containers run in a hypervisor, there the serial numbers won't be
unique per box (only per vm) and we'll have to do vm correlation
separately.  whereas a scheme which allows the orchestration system to
supply the names would still be unique in that situation.

James



  reply	other threads:[~2014-05-06  4:59 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 18:12 [PATCH 0/2] namespaces: log namespaces per task Richard Guy Briggs
2014-04-22 18:12 ` Richard Guy Briggs
     [not found] ` <cover.1398176489.git.rgb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-04-22 18:12   ` [PATCH 1/2] namespaces: give each namespace a serial number Richard Guy Briggs
2014-04-22 18:12     ` Richard Guy Briggs
     [not found]     ` <be1358c6da51252cd79c51a51bb30bf157624ccd.1398176489.git.rgb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-01 22:51       ` Serge E. Hallyn
2014-05-01 22:51         ` Serge E. Hallyn
     [not found]         ` <20140501225116.GB25669-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2014-05-02 14:15           ` Richard Guy Briggs
2014-05-02 14:15             ` Richard Guy Briggs
     [not found]             ` <20140502141530.GB24111-bcJWsdo4jJjeVoXN4CMphl7TgLCtbB0G@public.gmane.org>
2014-05-02 20:50               ` Serge Hallyn
2014-05-02 20:50                 ` Serge Hallyn
2014-04-22 18:12   ` [PATCH 2/2] audit: log namespace serial numbers Richard Guy Briggs
2014-04-22 18:12     ` Richard Guy Briggs
     [not found]     ` <644ef842bae19c55ae11af07e9fd7ac0ec9c74a1.1398176489.git.rgb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-01 23:01       ` Serge E. Hallyn
2014-05-01 23:01         ` Serge E. Hallyn
2014-05-01 22:32   ` [PATCH 0/2] namespaces: log namespaces per task Serge E. Hallyn
2014-05-01 22:32     ` Serge E. Hallyn
     [not found]     ` <20140501223212.GA25669-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2014-05-02 14:28       ` Richard Guy Briggs
2014-05-02 14:28         ` Richard Guy Briggs
     [not found]         ` <20140502142851.GC24111-bcJWsdo4jJjeVoXN4CMphl7TgLCtbB0G@public.gmane.org>
2014-05-02 21:00           ` Serge Hallyn
2014-05-02 21:00             ` Serge Hallyn
2014-05-05 21:29             ` Richard Guy Briggs
2014-05-05  9:23         ` Nicolas Dichtel
     [not found]           ` <5367587B.20801-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-05-06 21:15             ` Richard Guy Briggs
2014-05-06 21:15               ` Richard Guy Briggs
     [not found]               ` <20140506211530.GB15100-bcJWsdo4jJjeVoXN4CMphl7TgLCtbB0G@public.gmane.org>
2014-05-07  9:35                 ` Nicolas Dichtel
2014-05-07  9:35                   ` Nicolas Dichtel
2014-05-03 21:58   ` James Bottomley
2014-05-03 21:58     ` James Bottomley
2014-05-05  3:48     ` Serge E. Hallyn
2014-05-05 21:48       ` Richard Guy Briggs
2014-05-05 21:51         ` James Bottomley
2014-05-05 22:11           ` Richard Guy Briggs
2014-05-05 22:24             ` James Bottomley
2014-05-05 22:27           ` Serge Hallyn
2014-05-05 22:30             ` James Bottomley
2014-05-05 22:36               ` Serge Hallyn
2014-05-05 23:23                 ` James Bottomley
2014-05-05 23:23                   ` James Bottomley
2014-05-06  3:27                   ` Serge Hallyn
2014-05-06  3:27                     ` Serge Hallyn
2014-05-06  4:59                     ` James Bottomley [this message]
     [not found]                       ` <1399352350.2164.91.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2014-05-06 14:50                         ` Serge Hallyn
2014-05-06 14:50                           ` Serge Hallyn
2014-05-06 21:59                         ` Richard Guy Briggs
2014-05-06 21:59                           ` Richard Guy Briggs
2014-05-06 12:35                   ` Nicolas Dichtel
2014-05-06 12:35                     ` Nicolas Dichtel
     [not found]                   ` <a09ed85b-d6ef-4472-853b-84057d5957c2-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2014-05-06 12:35                     ` Nicolas Dichtel
2014-05-06 21:41                     ` Richard Guy Briggs
2014-05-06 21:41                       ` Richard Guy Briggs
2014-05-06 21:41                       ` Richard Guy Briggs
     [not found]                       ` <20140506214129.GC15100-bcJWsdo4jJjeVoXN4CMphl7TgLCtbB0G@public.gmane.org>
2014-05-06 23:57                         ` James Bottomley
2014-05-06 23:57                           ` James Bottomley
2014-05-05 21:44     ` Richard Guy Briggs
2014-05-06  3:33       ` Serge Hallyn
2014-05-06 14:03         ` Richard Guy Briggs
2014-05-06 14:03         ` Richard Guy Briggs
2014-05-06 14:03           ` Richard Guy Briggs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399352350.2164.91.camel@dabdike.int.hansenpartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge.hallyn@ubuntu.com \
    --cc=sgrubb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.