From: Sage Weil Subject: Re: quota change restriction Date: Mon, 20 Feb 2017 16:47:31 +0000 (UTC) Message-ID: References: <461205975.109214419.1487599948474.JavaMail.zimbra@redhat.com> <1228164616.109276923.1487608022780.JavaMail.zimbra@redhat.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56088 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752846AbdBTQre (ORCPT ); Mon, 20 Feb 2017 11:47:34 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 944BF7E9DB for ; Mon, 20 Feb 2017 16:47:34 +0000 (UTC) In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: John Spray Cc: Ramana Raja , Ceph Development On Mon, 20 Feb 2017, John Spray wrote: > (taking to ceph-devel) > > On Mon, Feb 20, 2017 at 4:27 PM, Ramana Raja wrote: > > Would it be possible or make sense to disallow clients having > > path restricted caps (OpenStack clients) from modifying quota > > (change share size) of the root of the exported subtree (manila share)? > > > > Currently, an OpenStack client can mount a share and modify > > its size, by modifying the quota xattr value at the mount point, > > without Manila service knowing about the size change. > > Right, I think this came up before at some point. I think I didn't > think hard about it because it wouldn't be an issue so much with NFS > clients, but we should at least decide what direction we want to go > in. > > We had kind of the same issue with layouts, which is why the 'p' part > of 'allow rwp' MDS auth caps was introduced. A few options spring to > mind: > A) Apply the 'p' flag rules quotas as well as layouts: generalise it > into a "this is a client that isn't allowed to modify the special > ceph.* attrs". Is this too Manila-specific? Not sure. > B) Special case the client's mount root, and never let it modify the > quotas on its own root. This is probably reasonable in practice as I > would expect someone to only be mounting a subpath at the point they > had configured their quotas elsewhere, but it seems like quite a > quirky move. > C) Introduce another flag to the mds auth caps that controls ability > to set quota. Downside: additional complexity in the auth caps. > D) Do nothing > > Anyone have other thoughts on this, and/or a preference from those > options? I'm leaning towards A but just because I can't readily > imagine use cases where you want to permit layout changes but ban > quotas, doesn't mean they don't exist. I like A too. s