From reviews-return-73370-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Tue Feb 13 12:35:31 2018 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 AB5A817B2A for ; Tue, 13 Feb 2018 12:35:31 +0000 (UTC) Received: (qmail 24124 invoked by uid 500); 13 Feb 2018 12:35:31 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 24088 invoked by uid 500); 13 Feb 2018 12:35:31 -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 24077 invoked by uid 99); 13 Feb 2018 12:35:30 -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; Tue, 13 Feb 2018 12:35:30 +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 52BE9C04E1; Tue, 13 Feb 2018 12:35:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.391 X-Spam-Level: ** X-Spam-Status: No, score=2.391 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] 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 WYEXZ3RZnBzr; Tue, 13 Feb 2018 12:35:29 +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 315285F17F; Tue, 13 Feb 2018 12:35:29 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C36BEE00C9; Tue, 13 Feb 2018 12:35:28 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id D6466C40017; Tue, 13 Feb 2018 12:35:27 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1947266352368271525==" MIME-Version: 1.0 Subject: Re: Review Request 65570: Attached/detached volume directory for task which has volume specified. From: Qian Zhang To: Gilbert Song , Vinod Kone Cc: Mesos Reviewbot , Mesos Reviewbot Windows , Qian Zhang , mesos Date: Tue, 13 Feb 2018 12:35:26 -0000 Message-ID: <20180213123526.2831.98095@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Qian Zhang X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/65570/ X-Sender: Qian Zhang References: <20180213013851.6750.7667@reviews-vm2.apache.org> In-Reply-To: <20180213013851.6750.7667@reviews-vm2.apache.org> Reply-To: Qian Zhang X-ReviewRequest-Repository: mesos --===============1947266352368271525== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Feb. 13, 2018, 9:38 a.m., Vinod Kone wrote: > > Can you add tests for this in a subsequent review please? Yes, here it is: https://reviews.apache.org/r/65630/ > On Feb. 13, 2018, 9:38 a.m., Vinod Kone wrote: > > src/slave/slave.cpp > > Lines 1109-1111 (patched) > > > > > > I don't think we need this check. We want to show non PV directories too in the UI. That was actually my original solution, but after more consideration and testing, I found we still need this check. The reason is, if we do not have this check, that means we will do attach as long as the task's ContainerInfo has a `SANDBOX_PATH` volume with type `PARENT`, but such attach will fail (see below) because the executor's volume directory is not created yet at the moment when `attachTaskVolumeDirectory` is called, it will actually be created by the `volume/sandbox_path` isolator when launching the nested container. ``` E0212 22:23:08.905462 10350 slave.cpp:1009] Failed to attach '/home/qzhang/opt/mesos/slaves/54de35d5-250f-4bf9-9444-3633c5e66e7d-S0/frameworks/54de35d5-250f-4bf9-9444-3633c5e66e7d-0000/executors/default-executor/runs/0ea4dc53-e543-42c4-8bb5-c5b667eee4c0/foo' to virtual path '/home/qzhang/opt/mesos/slaves/54de35d5-250f-4bf9-9444-3633c5e66e7d-S0/frameworks/54de35d5-250f-4bf9-9444-3633c5e66e7d-0000/executors/default-executor/runs/0ea4dc53-e543-42c4-8bb5-c5b667eee4c0/tasks/test/xxx': Failed to get realpath of '/home/qzhang/opt/mesos/slaves/54de35d5-250f-4bf9-9444-3633c5e66e7d-S0/frameworks/54de35d5-250f-4bf9-9444-3633c5e66e7d-0000/executors/default-executor/runs/0ea4dc53-e543-42c4-8bb5-c5b667eee4c0/foo': No such file or directory ``` So I think we still need this check which will ensure the executor's volume directory exists before we do the attach, the executor's volume directory will actually be created by the `filesystem/linux` isolator when launching the executor. - Qian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65570/#review197359 ----------------------------------------------------------- On Feb. 13, 2018, 5:20 p.m., Qian Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65570/ > ----------------------------------------------------------- > > (Updated Feb. 13, 2018, 5:20 p.m.) > > > Review request for mesos, Gilbert Song and Vinod Kone. > > > Bugs: MESOS-8565 > https://issues.apache.org/jira/browse/MESOS-8565 > > > Repository: mesos > > > Description > ------- > > Attached/detached volume directory for task which has volume specified. > > > Diffs > ----- > > src/slave/slave.hpp 30151c4886e12e9183a971b86b854e28a8ca1b39 > src/slave/slave.cpp f98f37321872d090176b7cc50873fc3c627773f5 > > > Diff: https://reviews.apache.org/r/65570/diff/3/ > > > Testing > ------- > > > Thanks, > > Qian Zhang > > --===============1947266352368271525==--