From: Alex Bligh <alex-rWA27mgs/Jz10XsdtD+oqA@public.gmane.org>
To: "Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Linux Containers
<containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 0/7] Network namespace manipulation with file descriptors
Date: Sat, 07 May 2011 07:58:28 +0100 [thread overview]
Message-ID: <3A54AB469A0294933EAC2257@nimrod.local> (raw)
In-Reply-To: <m1tyd7p7tq.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
--On 6 May 2011 19:23:29 -0700 "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
wrote:
> This patchset addresses the user interface limitations by introducing
> proc files you can open to get file descriptors that keep alive and
> refer to your a tasks namespaces. Those file descriptors can be passed
> to the new setns system call or the NET_NS_FD argument in netlink
> messages.
This is conceptually very interesting. I am one of those people you
describe with a routing daemon (or more accurately a wrapper around
existing daemons) that does the unshare() and keeps the network
alive. It also has a control socket etc.
You say:
> This addresses three specific problems that can make namespaces hard to
> work with.
> - Namespaces require a dedicated process to pin them in memory.
> - It is not possible to use a namespace unless you are the child
> of the original creator.
> - Namespaces don't have names that userspace can use to talk about
> them.
At least for me, the best way to solve the second blob would be to
be able to unshare to an existing namespace. That way I would be able
to run a daemon (without modification) in a pre-existing namespace.
The user interface here would just be an option to 'unshare'. I
don't think your patch allows this, does it? Right now I'm effectively
doing that by causing the pid concerned to fork() and do my bidding,
but that is far from perfect.
As a secondary issue, ever without your patch, it would be really
useful to be able to read from userspace the current network namespace.
(i.e. the pid concerned, or 1 if not unshared). I would like to
simply modify a routing daemon's init script so it doesn't start
if in the host, e.g. at the top:
[ `cat /proc/.../networknamespace` eq 1 ] && exit 0
--
Alex Bligh
next prev parent reply other threads:[~2011-05-07 6:58 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 2:23 [PATCH 0/7] Network namespace manipulation with file descriptors Eric W. Biederman
2011-05-07 2:24 ` [PATCH 1/7] ns: proc files for namespace naming policy Eric W. Biederman
2011-05-07 2:24 ` [PATCH 3/7] ns proc: Add support for the network namespace Eric W. Biederman
2011-05-07 22:41 ` Daniel Lezcano
2011-05-11 19:21 ` Nathan Lynch
2011-05-11 21:34 ` Eric W. Biederman
2011-05-11 21:42 ` Nathan Lynch
2011-05-07 2:24 ` [PATCH 4/7] ns proc: Add support for the uts namespace Eric W. Biederman
2011-05-07 22:42 ` Daniel Lezcano
2011-05-07 2:24 ` [PATCH 5/7] ns proc: Add support for the ipc namespace Eric W. Biederman
2011-05-07 22:44 ` Daniel Lezcano
[not found] ` <1304735101-1824-1-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2011-05-07 2:24 ` [PATCH 2/7] ns: Introduce the setns syscall Eric W. Biederman
[not found] ` <1304735101-1824-2-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2011-05-07 8:01 ` Rémi Denis-Courmont
2011-05-07 13:57 ` Eric W. Biederman
2011-05-07 22:39 ` Daniel Lezcano
2011-05-08 3:51 ` Matt Helsley
2011-05-11 19:21 ` Nathan Lynch
2011-05-11 20:33 ` Eric W. Biederman
2011-05-07 2:25 ` [PATCH 6/7] net: Allow setting the network namespace by fd Eric W. Biederman
2011-05-07 22:46 ` Daniel Lezcano
2011-05-07 2:25 ` [PATCH 7/7] ns: Wire up the setns system call Eric W. Biederman
2011-05-07 8:27 ` Geert Uytterhoeven
2011-05-07 14:09 ` Eric W. Biederman
2011-05-07 18:22 ` Geert Uytterhoeven
2011-05-07 13:59 ` Mike Frysinger
2011-05-07 20:06 ` James Bottomley
2011-05-08 2:19 ` Eric W. Biederman
2011-05-08 4:02 ` James Bottomley
2011-05-07 22:37 ` [PATCH 1/7] ns: proc files for namespace naming policy Daniel Lezcano
2011-05-11 19:20 ` Nathan Lynch
2011-05-11 22:52 ` Eric W. Biederman
[not found] ` <m1tyd7p7tq.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-05-07 6:58 ` Alex Bligh [this message]
2011-05-07 14:18 ` [PATCH 0/7] Network namespace manipulation with file descriptors Eric W. Biederman
2011-05-08 12:31 ` Alex Bligh
[not found] ` <m1fwoqoapn.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-05-17 11:11 ` David Lamparter
2011-05-17 14:33 ` Eric W. Biederman
2011-05-17 15:35 ` David Lamparter
2011-05-22 4:19 ` Renato Westphal
2011-05-09 19:04 ` David Miller
2011-05-09 19:59 ` Eric W. Biederman
2011-05-09 20:40 ` David Miller
2011-05-09 20:54 ` Eric W. Biederman
2011-05-09 20:55 ` David Miller
2011-05-10 21:56 ` Luck, Tony
2011-05-10 23:02 ` Eric W. Biederman
2011-05-18 12:43 ` Identifying network namespaces (was: Network namespace manipulation with file descriptors) David Lamparter
2011-05-18 13:03 ` Alexey Dobriyan
[not found] ` <BANLkTikmrC86hk=W84UBwhJLe_uGAN4w9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-18 13:33 ` David Lamparter
2011-05-18 14:13 ` Alexey Dobriyan
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=3A54AB469A0294933EAC2257@nimrod.local \
--to=alex-rwa27mgs/jz10xsdtd+oqa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).