From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030810AbdEWPDD (ORCPT ); Tue, 23 May 2017 11:03:03 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:34507 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762701AbdEWPDA (ORCPT ); Tue, 23 May 2017 11:03:00 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: David Howells Cc: Aleksa Sarai , James Bottomley , trondmy@primarydata.com, mszeredi@redhat.com, linux-nfs@vger.kernel.org, jlayton@redhat.com, Linux Containers , linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org References: <149547014649.10599.12025037906646164347.stgit@warthog.procyon.org.uk> <1495472039.2757.19.camel@HansenPartnership.com> <2446.1495551216@warthog.procyon.org.uk> Date: Tue, 23 May 2017 09:56:19 -0500 In-Reply-To: <2446.1495551216@warthog.procyon.org.uk> (David Howells's message of "Tue, 23 May 2017 15:53:36 +0100") Message-ID: <87zie3mxkc.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1dDBKm-000339-NO;;;mid=<87zie3mxkc.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=97.121.81.159;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18G+3QJnmXndBfmvbFdcRbhdtXTUal+Z1A= X-SA-Exim-Connect-IP: 97.121.81.159 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 1.5 XMNoVowels Alpha-numberic number with no vowels * 1.5 TR_Symld_Words too many words that have symbols inside * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;David Howells X-Spam-Relay-Country: X-Spam-Timing: total 5689 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 2.6 (0.0%), b_tie_ro: 1.76 (0.0%), parse: 1.13 (0.0%), extract_message_metadata: 21 (0.4%), get_uri_detail_list: 2.3 (0.0%), tests_pri_-1000: 11 (0.2%), tests_pri_-950: 1.59 (0.0%), tests_pri_-900: 1.43 (0.0%), tests_pri_-400: 32 (0.6%), check_bayes: 31 (0.5%), b_tokenize: 11 (0.2%), b_tok_get_all: 11 (0.2%), b_comp_prob: 3.5 (0.1%), b_tok_touch_all: 2.6 (0.0%), b_finish: 0.64 (0.0%), tests_pri_0: 308 (5.4%), check_dkim_signature: 1.34 (0.0%), check_dkim_adsp: 10 (0.2%), tests_pri_500: 5306 (93.3%), poll_dns_idle: 5299 (93.2%), rewrite_mail: 0.00 (0.0%) Subject: Re: [RFC][PATCH 0/9] Make containers kernel objects X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Howells writes: > Aleksa Sarai wrote: > >> >> The reason I think this is necessary is that the kernel has no idea >> >> how to direct upcalls to what userspace considers to be a container - >> >> current Linux practice appears to make a "container" just an >> >> arbitrarily chosen junction of namespaces, control groups and files, >> >> which may be changed individually within the "container". >> >> Just want to point out that if the kernel APIs for containers massively >> change, then the OCI will have to completely rework how we describe containers >> (and so will all existing runtimes). >> >> Not to mention that while I don't like how hard it is (from a runtime >> perspective) to actually set up a container securely, there are undoubtedly >> benefits to having namespaces split out. The network namespace being separate >> means that in certain contexts you actually don't want to create a new network >> namespace when creating a container. > > Yep, I quite agree. > > However, certain things need to be made per-net namespace that *aren't*. DNS > results, for instance. > > As an example, I could set up a client machine with two ethernet ports, set up > two DNS+NFS servers, each of which think they're called "foo.bar" and attach > each server to a different port on the client machine. Then I could create a > pair of containers on the client machine and route the network in each > container to a different port. Now there's a problem because the names of the > cached DNS records for each port overlap. Please look at ip netns add. It does solve this in userspace rather simply. > Further, the NFS idmapper needs to be able to direct its calls to the > appropriate network. Eric