From issues-return-46715-archive-asf-public=cust-asf.ponee.io@mesos.apache.org Fri Feb 23 02:03:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 89AED18067E for ; Fri, 23 Feb 2018 02:03:03 +0100 (CET) Received: (qmail 84225 invoked by uid 500); 23 Feb 2018 01:03:02 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 84216 invoked by uid 99); 23 Feb 2018 01:03:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2018 01:03:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 0F147C1FCE for ; Fri, 23 Feb 2018 01:03:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 1TpruNO4uPkb for ; Fri, 23 Feb 2018 01:03:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E506F5F24E for ; Fri, 23 Feb 2018 01:03:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 68DDBE018A for ; Fri, 23 Feb 2018 01:03:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 222912713C for ; Fri, 23 Feb 2018 01:03:00 +0000 (UTC) Date: Fri, 23 Feb 2018 01:03:00 +0000 (UTC) From: "Qian Zhang (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-8534) Allow nested containers in TaskGroups to have separate network namespaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-8534?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1637= 3762#comment-16373762 ]=20 Qian Zhang commented on MESOS-8534: ----------------------------------- [~sagar8192] for the use case that you mentioned in the description, I am a= bit confused why you put the containers binding to the same port (8888) in= a pod. I think the principle of pod is, containers for different purposes = (e.g., each of them is serving on a different port) but sharing the same li= fecycle should be put in a pod. So I am wondering if it is possible to put = your containers in different pods or have them bind to different ports? > Allow nested containers in TaskGroups to have separate network namespaces > ------------------------------------------------------------------------- > > Key: MESOS-8534 > URL: https://issues.apache.org/jira/browse/MESOS-8534 > Project: Mesos > Issue Type: Task > Components: containerization > Reporter: Sagar Sadashiv Patwardhan > Priority: Minor > Labels: cni > > As per the discussion with [~jieyu] and [~avinash.mesos] , I am going to = allow nested containers in TaskGroups to have separate namespaces. I am als= o going to retain the existing functionality, where nested containers can s= hare namespaces with the parent/root container. > *Use case:* At Yelp, we have this application called seagull that runs mu= ltiple tasks in parallel. It is mainly used for running tests that depend o= n other containerized internal microservices. It was developed before mesos= =C2=A0had support for docker-executor. So, it uses a custom executor, which= directly talks to docker daemon on the host and run a bunch of service con= tainers along with the process where tests are executed. Resources for all = these containers are not accounted for in mesos. Clean-up of these containe= rs is also a headache. We have a tool called docker-reaper that automatical= ly reaps the orphaned containers once the executor goes away. In addition t= o that, we also run a few cron=C2=A0jobs that clean-up any leftover contain= ers. > We are in the process of containerizing the process that runs the tests. = We also want to delegate the responsibility=C2=A0of lifecycle management of= docker containers to mesos=C2=A0and get rid of the custom executor. We loo= ked at a few alternatives to do this and decided to go with pods because th= ey provide all-or-nothing(atomicity) semantics that we need for our applica= tion. But, we cannot use pods directly because all the containers in a pod = have the same network namespace. The service discovery mechanism requires a= ll the containers to have separate IPs. All of our microservices bind to 88= 88 container port, so we will have port collision unless we are giving sepa= rate namespaces to all the containers in a pod. > *Proposal:* I am planning to allow nested containers to have separate nam= espaces. If NetworkInfo protobuf for nested containers is not empty, then w= e will assign separate mnt and network namespaces to the nested containers.= Otherwise,=C2=A0 they will share the network and mount namepsaces=C2=A0wit= h the parent/root container. -- This message was sent by Atlassian JIRA (v7.6.3#76005)