Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 738BC200AF6 for ; Sat, 28 May 2016 02:22:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 72759160A37; Sat, 28 May 2016 00:22:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BA916160A12 for ; Sat, 28 May 2016 02:22:13 +0200 (CEST) Received: (qmail 62468 invoked by uid 500); 28 May 2016 00:22:12 -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 62455 invoked by uid 99); 28 May 2016 00:22:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 May 2016 00:22:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C9FA52C14F8 for ; Sat, 28 May 2016 00:22:12 +0000 (UTC) Date: Sat, 28 May 2016 00:22:12 +0000 (UTC) From: "Jie Yu (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MESOS-5350) Add asynchronous hook for validating docker containerizer tasks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 28 May 2016 00:22:14 -0000 [ https://issues.apache.org/jira/browse/MESOS-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jie Yu updated MESOS-5350: -------------------------- Story Points: 5 (was: 2) > Add asynchronous hook for validating docker containerizer tasks > --------------------------------------------------------------- > > Key: MESOS-5350 > URL: https://issues.apache.org/jira/browse/MESOS-5350 > Project: Mesos > Issue Type: Improvement > Components: docker, modules > Reporter: Joseph Wu > Assignee: Joseph Wu > Priority: Minor > Labels: containerizer, hooks, mesosphere > Fix For: 0.29.0 > > > It is possible to plug in custom validation logic for the MesosContainerizer via an {{Isolator}} module, but the same is not true of the DockerContainerizer. > Basic logic can be plugged into the DockerContainerizer via {{Hooks}}, but this has some notable differences compared to isolators: > * Hooks are synchronous. > * Modifications to tasks via Hooks have lower priority compared to the task itself. i.e. If both the {{TaskInfo}} and {{slaveExecutorEnvironmentDecorator}} define the same environment variable, the {{TaskInfo}} wins. > * Hooks have no effect if they fail (short of segfaulting) > i.e. The {{slavePreLaunchDockerHook}} has a return type of {{Try}}: > https://github.com/apache/mesos/blob/628ccd23501078b04fb21eee85060a6226a80ef8/include/mesos/hook.hpp#L90 > But the effect of returning an {{Error}} is a log message: > https://github.com/apache/mesos/blob/628ccd23501078b04fb21eee85060a6226a80ef8/src/hook/manager.cpp#L227-L230 > We should add a hook to the DockerContainerizer to narrow this gap. This new hook would: > * Be called at roughly the same place as {{slavePreLaunchDockerHook}} > https://github.com/apache/mesos/blob/628ccd23501078b04fb21eee85060a6226a80ef8/src/slave/containerizer/docker.cpp#L1022 > * Return a {{Future}} and require splitting up {{DockerContainerizer::launch}}. > * Prevent a task from launching if it returns a {{Failure}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)