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 161F2200B17 for ; Tue, 21 Jun 2016 18:01:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 14D76160A4F; Tue, 21 Jun 2016 16:01:03 +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 5CCC4160A07 for ; Tue, 21 Jun 2016 18:01:02 +0200 (CEST) Received: (qmail 86617 invoked by uid 500); 21 Jun 2016 16:00:56 -0000 Mailing-List: contact user-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@mesos.apache.org Delivered-To: mailing list user@mesos.apache.org Received: (qmail 86607 invoked by uid 99); 21 Jun 2016 16:00:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 16:00:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DF0F5C0849 for ; Tue, 21 Jun 2016 16:00:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.821 X-Spam-Level: X-Spam-Status: No, score=-0.821 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id FOzuHtIYxbVS for ; Tue, 21 Jun 2016 16:00:55 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id ACE5B5F239 for ; Tue, 21 Jun 2016 16:00:54 +0000 (UTC) Received: by mail-vk0-f54.google.com with SMTP id u64so26299084vkf.3 for ; Tue, 21 Jun 2016 09:00:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=LxE04+9WrrzenZqZu0mD6YLl2suGospz9cKokBn0AqE=; b=T43LcEztkDclOXq5Sy0fMnWh0Wp9JBXGNrjvelLdrNvAgYTHLpxKLvVy65xdYUQPAa 9df7KSzBIsQie4ALEIKAYCGSrZFsMibNHpRpwCxTU0hUCr8P1Zs+4Kn59CzX4a1T9AeP dhavgVBm2tpMI8v5p7yED2vtmDyow0ZV3iUc8nTNDThqsKRAMptJKf/jFfhwpBqsc6Ct 5NL+6cenKe6tkPDKoTFQ6gCkqeT1Q4r8Cs0+QTjZ+y+6ai2kOigw7VMWudhJPVieOlVp y+Y51vdRjqxN2a+46mbLy5eOLt1ySze6u2p1BBI6JMHP1hujlOUYnKTPXqYjNPeY+Gxk YSZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=LxE04+9WrrzenZqZu0mD6YLl2suGospz9cKokBn0AqE=; b=X3KwO806wTd+nRTXUWjUA0owqbdJ8GDmIXiW5xNnoJHSEiYsEpWQEHonY3zeX7Fpgk 5ASBSIWCMHySslbqL0Gjg1AXlq+k/TTsYWyOUvBqw+no7gaGGVc9gUS3ll1G5hznEP1U XuhG7ld4l2YoItU8ofOa5OE/CDedE23kn39msKUXcpPFajS7OhHkcTOprv7OdIVojYxQ khRF0SE2RBD3/OEQjQmITSkVek1g9w+93ntYa+ywdVk6t+uez6Og6DRWoaj3ZI7rpIMn EnpFZaoA+J2V3l1LVVcqNYPuKDpQH/hie8gOg2xbjXYMG6UEeCCMkyCNZVg0NGV72aZs 8gTw== X-Gm-Message-State: ALyK8tJC6b3hCy0rQoMR2x12HskYYnL4bIw/pDhE1V6/uZHhMGiZBghCxBRokHEJKacs4XJ79Bl9RwD+7TjUxg== X-Received: by 10.159.34.19 with SMTP id 19mr9932186uad.21.1466524853053; Tue, 21 Jun 2016 09:00:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.38.104 with HTTP; Tue, 21 Jun 2016 09:00:52 -0700 (PDT) In-Reply-To: References: From: James Peach Date: Tue, 21 Jun 2016 09:00:52 -0700 Message-ID: Subject: Re: Persistent volume ownership issue To: user@mesos.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Tue, 21 Jun 2016 16:01:03 -0000 Non-recursive chown is an improvement over recursive chown which seems fraught and should be avoided. For an interim fix, could you make the volume root world writeable with the sticky bit set? Then you wouldn't have to chown and volume users would still be able to create files. I wonder whether ACLs are the right solution to volume ownership? Certainly I think inherited ACLs are a good solution for expressing a consistent access control policy over a hierarchy (at least in the Windows/Darwin/SMB/NFSv4/RichAcl ACL model). On 20 June 2016 at 23:25, Jie Yu wrote: > Hi folks, > > Currently, the ownership of the persistent volumes are set to be the same as > the sandbox. In the implementation, we call `chown -R` on the persistent > volume to match that of the sandbox each time before we mount it into the > container. > > Recently, we realized that this behavior is not ideal. Especially, if a task > created some files in the persistent volume, and the owner of those file > might be different than the task's user. For instance, a task is running > under root and it creates some database files under user 'database' and > launch the database process under user 'database'. When the database process > is restarted by the scheduler, the current behavior is that the we'll do a > 'chown -R root.root' on the persistent volume, causes database files to be > chown to 'root'. > > The true fix of this problem is to allow frameworks to explicit specify > owner of persistent volumes during creation. THis is captured in this > ticket: > https://issues.apache.org/jira/browse/MESOS-4893 > > In the short-term (for 1.0), I propose that, instead of doing a recursive > chown, we do a non-recursive chown. That'll allow the new task to at least > create new files under the persistent volume, but do not change ownership of > files created by previous tasks. It should be a very simple fix which we can > ship in 1.0. We'll ship MESOS-4893 after 1.0. What do you guys think? > > Thanks, > - Jie -- James Peach | jorgar@gmail.com