From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: Re: [RFC][PATCH 0/9] Make containers kernel objects Date: Tue, 23 May 2017 10:17:26 -0500 Message-ID: <87bmqjmwl5.fsf@xmission.com> References: <87zie3mxkc.fsf@xmission.com> <149547014649.10599.12025037906646164347.stgit@warthog.procyon.org.uk> <1495472039.2757.19.camel@HansenPartnership.com> <2446.1495551216@warthog.procyon.org.uk> <2961.1495552481@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2961.1495552481-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org> (David Howells's message of "Tue, 23 May 2017 16:14:41 +0100") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: David Howells Cc: mszeredi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Linux Containers , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, James Bottomley , viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, trondmy-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org List-Id: containers.vger.kernel.org David Howells writes: > Eric W. Biederman wrote: > >> > 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. > > warthog>man ip | grep setns > warthog1> Not setns netns >> It does solve this in userspace rather simply. > > Ummm... How? The kernel DNS resolver is not namespace aware. But it works fine if called in the proper context and we have a defacto standard for where to put all of the files (the tricky part) if you are dealing with multiple network namespaces simultaneously. Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937521AbdEWPYP (ORCPT ); Tue, 23 May 2017 11:24:15 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:34366 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030992AbdEWPYJ (ORCPT ); Tue, 23 May 2017 11:24:09 -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: <87zie3mxkc.fsf@xmission.com> <149547014649.10599.12025037906646164347.stgit@warthog.procyon.org.uk> <1495472039.2757.19.camel@HansenPartnership.com> <2446.1495551216@warthog.procyon.org.uk> <2961.1495552481@warthog.procyon.org.uk> Date: Tue, 23 May 2017 10:17:26 -0500 In-Reply-To: <2961.1495552481@warthog.procyon.org.uk> (David Howells's message of "Tue, 23 May 2017 16:14:41 +0100") Message-ID: <87bmqjmwl5.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=1dDBfE-0008Hl-JA;;;mid=<87bmqjmwl5.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.121.81.159;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/pz3biR8p2g6Du8gJ1TPOBgTEFwqb6s/s= 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 5841 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 4.6 (0.1%), b_tie_ro: 2.1 (0.0%), parse: 1.00 (0.0%), extract_message_metadata: 15 (0.3%), get_uri_detail_list: 1.32 (0.0%), tests_pri_-1000: 8 (0.1%), tests_pri_-950: 1.39 (0.0%), tests_pri_-900: 1.26 (0.0%), tests_pri_-400: 20 (0.3%), check_bayes: 19 (0.3%), b_tokenize: 6 (0.1%), b_tok_get_all: 6 (0.1%), b_comp_prob: 1.98 (0.0%), b_tok_touch_all: 2.6 (0.0%), b_finish: 0.64 (0.0%), tests_pri_0: 146 (2.5%), check_dkim_signature: 0.74 (0.0%), check_dkim_adsp: 3.2 (0.1%), tests_pri_500: 5641 (96.6%), poll_dns_idle: 5634 (96.4%), 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 in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Howells writes: > Eric W. Biederman wrote: > >> > 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. > > warthog>man ip | grep setns > warthog1> Not setns netns >> It does solve this in userspace rather simply. > > Ummm... How? The kernel DNS resolver is not namespace aware. But it works fine if called in the proper context and we have a defacto standard for where to put all of the files (the tricky part) if you are dealing with multiple network namespaces simultaneously. Eric