From reviews-return-50859-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Thu Nov 24 03:38:05 2016 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5904C19999 for ; Thu, 24 Nov 2016 03:38:05 +0000 (UTC) Received: (qmail 49091 invoked by uid 500); 24 Nov 2016 03:38:05 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 49043 invoked by uid 500); 24 Nov 2016 03:38:04 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 49022 invoked by uid 99); 24 Nov 2016 03:38:04 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2016 03:38:04 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 62DA62F5E07; Thu, 24 Nov 2016 03:38:02 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4230608491779224495==" MIME-Version: 1.0 Subject: Re: Review Request 54038: Added new hook for covering executor and task environment. From: Adam B To: Kapil Arya , Adam B , =?utf-8?q?Gast=C3=B3n_Kleiman?= , Joseph Wu Cc: Till Toenshoff , mesos Date: Thu, 24 Nov 2016 03:38:02 -0000 Message-ID: <20161124033802.27387.33734@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Adam B X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/54038/ X-Sender: Adam B X-ReviewBoard-ShipIt: 1 References: <20161123192647.27387.72585@reviews.apache.org> In-Reply-To: <20161123192647.27387.72585@reviews.apache.org> X-ReviewBoard-Diff-For: include/mesos/module/hook.proto Reply-To: Adam B X-ReviewRequest-Repository: mesos --===============4230608491779224495== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54038/#review156809 ----------------------------------------------------------- Fix it, then Ship it! Looks good. I've got some questions/comments, but I'll let you decide which (if any) should be addressed before committing. include/mesos/hook.hpp (line 111) "Deprecated"? Will we ever remove this hook? include/mesos/hook.hpp (line 128) Or TASK_ERROR? I thought FAILED meant that it ran and returned a non-zero exit code. include/mesos/hook.hpp (lines 146 - 147) Is `sandboxDirectory` the host or container path? Absolute or relative? Same question for `mappedDirectory`, also what is it? sandbox container path? include/mesos/module/hook.proto (line 28) Why add this TODO instead of filing a JIRA? We can always add new protobuf fields later, when we're ready. src/hook/manager.cpp (line 221) Update this comment (and others) if you update the proto message name src/hook/manager.cpp (lines 245 - 249) Could save a couple lines if you invert the if statement and push the MergeFrom into it. ``` if (result.isSome()) { info.MergeFrom(result.get()); } ``` src/slave/containerizer/docker.cpp (line 1132) "as soon as possible" isn't very specific. How about "... remove this entire block after Mesos 1.2's deprecation cycle ends." src/slave/containerizer/docker.cpp (line 1173) Redundant `if(hooksAvailable)`, could be merged with statement above. src/slave/containerizer/docker.cpp (lines 1178 - 1179) I still don't understand why `sandboxDirectory = container->directory` and `mappedDirectory = flags.sandbox_directory`. Seems backwards as far as "sandbox directory" goes. src/slave/containerizer/docker.cpp (lines 1193 - 1195) Sounds like a great thing to Warn about in the agent log. Planning on doing this in a subsequent patch? src/slave/containerizer/docker.cpp (lines 1224 - 1225) So, if executorEnvironment and taskEnvironment both have the same keys, then the taskEnvironment will override? - Adam B On Nov. 23, 2016, 11:26 a.m., Till Toenshoff wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54038/ > ----------------------------------------------------------- > > (Updated Nov. 23, 2016, 11:26 a.m.) > > > Review request for mesos, Adam B, Gastón Kleiman, Kapil Arya, and Joseph Wu. > > > Bugs: MESOS-6396 > https://issues.apache.org/jira/browse/MESOS-6396 > > > Repository: mesos > > > Description > ------- > > For being able to supply environment additions for both, a task and > its executor separately we need to introduce a new hook as the > existing ones slavePreLaunchDockerHook (deprecated) as well as > slavePreLaunchDockerEnvironmentDecorator do not allow for this. > > This new hook will likely allow for further additions like e.g. > adding volumes without having to adapt the signature but only the > returned proto message TaskExecutorDecoratorInfo. > > > Diffs > ----- > > include/mesos/hook.hpp f0606e3a68fa179cf7ea036f10563ef47c2aefa7 > include/mesos/module/hook.proto PRE-CREATION > src/Makefile.am 5e0b8406f7f624bd8b03ff76b887f20e22fc66e0 > src/hook/manager.hpp 5ecfcab48da808c84d36f9bcfcb5a8e0ad2167e5 > src/hook/manager.cpp 24885226a788a7abd851e12b527f74fa972ec935 > src/slave/containerizer/docker.cpp ccabf99f305d7874e1c46bc618ea74341eb281ef > > Diff: https://reviews.apache.org/r/54038/diff/ > > > Testing > ------- > > make check > > *WIP - functional test pending - unit tests pending - WIP* > > > Thanks, > > Till Toenshoff > > --===============4230608491779224495==--