Return-Path: X-Original-To: apmail-aurora-dev-archive@minotaur.apache.org Delivered-To: apmail-aurora-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 58EB118478 for ; Fri, 14 Aug 2015 19:17:59 +0000 (UTC) Received: (qmail 17257 invoked by uid 500); 14 Aug 2015 19:17:59 -0000 Delivered-To: apmail-aurora-dev-archive@aurora.apache.org Received: (qmail 17216 invoked by uid 500); 14 Aug 2015 19:17:59 -0000 Mailing-List: contact dev-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list dev@aurora.apache.org Received: (qmail 17189 invoked by uid 99); 14 Aug 2015 19:17:58 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2015 19:17:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 68240C20C8 for ; Fri, 14 Aug 2015 19:17:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id z-1IgPPbqUp4 for ; Fri, 14 Aug 2015 19:17:49 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 2A0B021044 for ; Fri, 14 Aug 2015 19:17:49 +0000 (UTC) Received: by vkaw128 with SMTP id w128so3082419vka.1 for ; Fri, 14 Aug 2015 12:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Fg7vTAfuCiz8ZMXfTVTBmVqC/5jZhv3c9J8Mst6Ao/4=; b=RakuJs9pD5HJnOTj9rAHy68Uql7cKOw8yF5oih/7E2RLzV5KX/ldpzZJxryNFB+i9x ABse7yG33STh7qAuqMmTRs50/9X6kyF3pH6qt7gVnNY4j8tbN7WA4fgf0UN3cFPeXTp7 4XANO0fxbjEfehuclPa3eeH8GHrwpfP4BKCEdu9Qp8Dk6KLCc4CX2zLxKnGyxJw63IPG D8P6hFPPVWfix2zW9fbXgxFak0P5KgpdqtYcR8jj0WRWe+UqQYKQ+9YKpFVClafroo8p k2ZWrQ2V3w+cdbZLv8DW7kScVGFuDvYwsybMfEFWrEncOi/cXBHEDrzDGYVfbU295cWv E1Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Fg7vTAfuCiz8ZMXfTVTBmVqC/5jZhv3c9J8Mst6Ao/4=; b=fwl2npdu2wsDeu8HwM5kKZMyha4pHwEFfksAUzUo+8sUUo6CxY3SNdkwiRsGyagwzx S/fnUh8QzQ/7o2A8IVGaTkK0nOmMddJ4Q3duztlpj2fCJZl7xfkbIcTLGrPxVbQazpZd oHNcZc1v0t+JUb/KWkmk1MZjsv4/hIcYdbYInNh/jFyatbGiH40jg191UgkVwxFS7zEA 1EalT3v96fUwyS30ce0kES8S46dkOGnqJLfKOxEE6WtZPJ9ef7iQfMBuUeNJWQDSjbGV y2O2AiRT+SMXgvnx7qZheLjxQb9H+T18qcOd7Z34r68wA5mhqwLebnfRo1q8T1+EbLGR r8Cg== X-Received: by 10.52.106.201 with SMTP id gw9mr52153290vdb.10.1439579868240; Fri, 14 Aug 2015 12:17:48 -0700 (PDT) Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com. [209.85.213.48]) by smtp.gmail.com with ESMTPSA id yn8sm359380vdc.3.2015.08.14.12.17.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 12:17:47 -0700 (PDT) Received: by vkfi73 with SMTP id i73so33849893vkf.2 for ; Fri, 14 Aug 2015 12:17:47 -0700 (PDT) X-Gm-Message-State: ALoCoQnQ1BzDpUrIF4uv4ElNcMoJt3EKiXsijyTN2zhVAddUn7Qrsd5v8O1BTXi9Ps3yszHuWgMU MIME-Version: 1.0 X-Received: by 10.52.153.9 with SMTP id vc9mr55774571vdb.67.1439579867106; Fri, 14 Aug 2015 12:17:47 -0700 (PDT) Received: by 10.31.146.84 with HTTP; Fri, 14 Aug 2015 12:17:47 -0700 (PDT) In-Reply-To: References: Date: Fri, 14 Aug 2015 12:17:47 -0700 Message-ID: Subject: Re: Improvements to container support with custom executor From: Jie Yu To: dev@aurora.apache.org Cc: "user@mesos.apache.org" , Tim Chen Content-Type: multipart/alternative; boundary=bcaec51b9dbb9aecfd051d4a4e39 --bcaec51b9dbb9aecfd051d4a4e39 Content-Type: text/plain; charset=UTF-8 Kevin, Thanks for bringing this up! This question is related to the work we are currently doing for Filesystem Isolation (MESOS-2386 ) and Unified Container ( MESOS-2840 ). In fact, if you think about using Mesos containerizer and want to run a task (using command executor) under a specified image, we have the same issue for Mesos' own command executor (MESOS-3004 ). I've proposed a solution in this doc . The main idea is that we allow the custom executor to still run under the host filesystem (so that it does not have to deal with dependency issues). Mesos will provision the image (the image requested by the user), and mount in as a Volume in the container. The custom executor is responsible for chrooting (or pivot_root if it has root privilege) into the user specified image before execing the user process. The above proposal is for only Mesos containerizer currently. But with the Unified Container (MESOS-2840 ) work, Mesos containerizer is going to support Docker images as well. cc Tim Chen - Jie On Fri, Aug 14, 2015 at 11:39 AM, Kevin Sweeney < ksweeney@twitter.com.invalid> wrote: > (cross-posting for a wider audience) > > Hi folks, > > With mesos-0.23.0 it looks like a new dependency made it in for TLS > support. While this is fine in theory it actually makes the Docker > Containerizer story very difficult to reason about. > > Here's the situation: Aurora uses a custom Python executor for its tasks. > Because of the design of the containerizer the executor runs in the context > of the container. This means that the container has to be able to run the > executor (in practice this means it needs a python2.7 installation and some > shared libraries libmesos links to). Since most containers don't contain > Aurora's executor, Aurora hacked around this by using the executor in > $MESOS_SANDBOX plus a requirement that hosted containers be able to run the > executor. However, with the upgrade to mesos-0.23.0 the containers that > could run the 0.22.0 executor no longer work due to the new dependency on > libcurl-nss. > > This is not a problem limited to Docker - I don't see how this design will > work with *any* container runtime - we can never upgrade the executor > without upgrading all the containers to contain its new dependencies, which > at a minimum means we must rebuild them whenever mesos gains a new > dependency. > > Does anyone with more experience with these APIs have a suggestion here? It > seems we need to make the executor run in the context of the host OS and > aware of the container (or maybe we have mesos launch a container with the > executor+its dependencies and have it launch a child container). > -- > Kevin Sweeney > @kts > --bcaec51b9dbb9aecfd051d4a4e39--