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 61AC4200C7F for ; Tue, 9 May 2017 09:57:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 606D9160BB3; Tue, 9 May 2017 07:57:52 +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 A5B3A160BB6 for ; Tue, 9 May 2017 09:57:51 +0200 (CEST) Received: (qmail 86708 invoked by uid 500); 9 May 2017 07:57:50 -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 86520 invoked by uid 99); 9 May 2017 07:57:50 -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, 09 May 2017 07:57:50 +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 2B32FCD54D; Tue, 9 May 2017 07:57:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.201 X-Spam-Level: **** X-Spam-Status: No, score=4.201 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.001] 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 7G47Vhx4M98m; Tue, 9 May 2017 07:57:49 +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 2865D5F4A7; Tue, 9 May 2017 07:57:49 +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 C622DE01D8; Tue, 9 May 2017 07:57:48 +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 97D45C40042; Tue, 9 May 2017 07:57:48 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8762218145686008507==" MIME-Version: 1.0 Subject: Re: Review Request 59061: Fixed provisioner recover blockage by non-existing rootfses dir. From: Jie Yu To: Neil Conway , Jie Yu , Chun-Hung Hsiao , Michael Park , Vinod Kone Cc: Mesos Reviewbot , Gilbert Song , mesos Date: Tue, 09 May 2017 07:57:48 -0000 Message-ID: <20170509075748.23036.7395@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jie Yu X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/59061/ X-Sender: Jie Yu References: <20170508204908.23036.65422@reviews-vm2.apache.org> In-Reply-To: <20170508204908.23036.65422@reviews-vm2.apache.org> Reply-To: Jie Yu X-ReviewRequest-Repository: mesos archived-at: Tue, 09 May 2017 07:57:52 -0000 --===============8762218145686008507== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On May 8, 2017, 8:49 p.m., Jie Yu wrote: > > src/slave/containerizer/mesos/provisioner/paths.cpp > > Lines 210 (patched) > > > > > > Why `isdir`? not os::exists? > > Gilbert Song wrote: > Following the patern in this file. We are only using `stat::isdir` in this helper file. I guess you want me to fix all? > > Chun-Hung Hsiao wrote: > I perfor the more specific `isdir` check here if the `rootfs` file is always a directory in all scenarios we want to ignore. OK. i don't realized that all existence check in this file uses 'isdir' - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/59061/#review174225 ----------------------------------------------------------- On May 8, 2017, 7:51 p.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59061/ > ----------------------------------------------------------- > > (Updated May 8, 2017, 7:51 p.m.) > > > Review request for mesos, Chun-Hung Hsiao, Jie Yu, Michael Park, Neil Conway, and Vinod Kone. > > > Bugs: MESOS-7471 > https://issues.apache.org/jira/browse/MESOS-7471 > > > Repository: mesos > > > Description > ------- > > In provisioner recover, when listing the container rootfses, it is > possible that the 'rootfses' dir does not exist. Because a possible > race between the provisioner destroy and the agent restart. For > instance, while the provisioner is destroying the container dir the > agent restarts. Due to os::rmdir() is recursive by traversing the > FTS tree, it is possible that 'rootfses' dir is removed but the > others (e.g., scratch dir) are not. > > Currently, we are returning an error if the 'rootfses' dir does not > exist, which blocks the agent from recovery. We should skip it if > 'rootfses' does not exist. > > > Diffs > ----- > > src/slave/containerizer/mesos/provisioner/paths.cpp d2de98b66b7cf8331e82c31d0602dfe7e77d2130 > > > Diff: https://reviews.apache.org/r/59061/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Gilbert Song > > --===============8762218145686008507==--