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 80E5C200BD3 for ; Tue, 6 Dec 2016 18:11:34 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7F8FC160B1B; Tue, 6 Dec 2016 17:11:34 +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 C91C6160B17 for ; Tue, 6 Dec 2016 18:11:33 +0100 (CET) Received: (qmail 90814 invoked by uid 500); 6 Dec 2016 17:11:32 -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 90800 invoked by uid 99); 6 Dec 2016 17:11:32 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2016 17:11:32 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 072832CAF72; Tue, 6 Dec 2016 17:11:32 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7750958272807776908==" MIME-Version: 1.0 Subject: Re: Review Request 54335: Add os::var() to stout. From: Jie Yu To: Alex Clemmer Cc: Mesos ReviewBot , Jie Yu , mesos Date: Tue, 06 Dec 2016 17:11:31 -0000 Message-ID: <20161206171131.1680.27726@reviews.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/54335/ X-Sender: Jie Yu References: <20161205183136.28536.68565@reviews.apache.org> In-Reply-To: <20161205183136.28536.68565@reviews.apache.org> Reply-To: Jie Yu X-ReviewRequest-Repository: mesos archived-at: Tue, 06 Dec 2016 17:11:34 -0000 --===============7750958272807776908== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Dec. 5, 2016, 6:31 p.m., Jie Yu wrote: > > Flying by. I am checking https://www.gnu.org/prep/standards/html_node/Directory-Variables.html > > > > Looks like, in retrospect, we should call the current `runtime_dir` `runstate_dir` instead. So we probably should use `os::runstatedir`? > > Alex Clemmer wrote: > +1, thanks for the helpful suggestion Jie. We were debating what to call this anyway. :) > > Alex Clemmer wrote: > But, actually, I think I spoke too soon. The idea is actually to use this for all the places we use a directory rooted at `/var`, _i.e._, for all places we're dealing with variable data. I think the final picture of what the disk isolators and persistent volumes stuff will end up looking like is not yet fully developed, but the idea here is that we will want all of the places those things manage variable data to be managed out of a sensible `/var` on Windows, too. This is also why I think it's important to consider the implication of choosing user-specific directories (as I say below). > > Thoughts? Looks like according to GNU standard, this should be `localstatedir` (e.g., /var or /usr/local/var). And `runstatedir` is under `localstatedir` (i.e., `$(localstatedir)/run`). And for volumes which normally under `/var/lib`, should be called `libdir` according to GNU standard. Note that `/var/run` will normally cleared by OS upon reboot, while `/var/lib` contains persisent information across reboot. - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54335/#review158030 ----------------------------------------------------------- On Dec. 5, 2016, 5:38 p.m., Andrew Schwartzmeyer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54335/ > ----------------------------------------------------------- > > (Updated Dec. 5, 2016, 5:38 p.m.) > > > Review request for mesos and Alex Clemmer. > > > Bugs: MESOS-6677 > https://issues.apache.org/jira/browse/MESOS-6677 > > > Repository: mesos > > > Description > ------- > > Returns `/var` on POSIX and (usually) `C:\ProgramData` on Windows. > Uses Windows API to look up correct location for persistent, > app-local variable data. Returns standard location on POSIX. > > > Diffs > ----- > > 3rdparty/stout/include/stout/posix/os.hpp c37e64db662ba3cee83d2f55de0f9d71ad72c038 > 3rdparty/stout/include/stout/windows/os.hpp de9b04ad82443038a0f4408bc72cae1540a1beaf > > Diff: https://reviews.apache.org/r/54335/diff/ > > > Testing > ------- > > > Thanks, > > Andrew Schwartzmeyer > > --===============7750958272807776908==--