[nfsv4] replication and fs_locations

Tom Haynes <tom.haynes@oracle.com> Thu, 24 June 2010 23:25 UTC

Return-Path: <tom.haynes@oracle.com>
X-Original-To: nfsv4@core3.amsl.com
Delivered-To: nfsv4@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id F30383A69DC for <nfsv4@core3.amsl.com>; Thu, 24 Jun 2010 16:25:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.109
X-Spam-Level:
X-Spam-Status: No, score=-3.109 tagged_above=-999 required=5 tests=[AWL=-0.104, BAYES_50=0.001, FS_REPLICA=0.994, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Xfkfa8X7tEP for <nfsv4@core3.amsl.com>; Thu, 24 Jun 2010 16:25:08 -0700 (PDT)
Received: from rcsinet10.oracle.com (rcsinet10.oracle.com [148.87.113.121]) by core3.amsl.com (Postfix) with ESMTP id EFEA13A6881 for <nfsv4@ietf.org>; Thu, 24 Jun 2010 16:25:07 -0700 (PDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o5ONPEJM031207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <nfsv4@ietf.org>; Thu, 24 Jun 2010 23:25:16 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o5OJLVCY019583 for <nfsv4@ietf.org>; Thu, 24 Jun 2010 23:25:13 GMT
Received: from abhmt015.oracle.com by acsmt355.oracle.com with ESMTP id 372347801277421853; Thu, 24 Jun 2010 16:24:13 -0700
Received: from [192.168.2.6] (/98.184.164.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Jun 2010 16:24:13 -0700
Message-ID: <4C23E913.20305@oracle.com>
Date: Thu, 24 Jun 2010 18:24:03 -0500
From: Tom Haynes <tom.haynes@oracle.com>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: nfsv4@ietf.org
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090203.4C23E95A.0095:SCFMA4539814,ss=1,fgs=0
Subject: [nfsv4] replication and fs_locations
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/nfsv4>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Jun 2010 23:25:09 -0000

3530 has this to say about replication:

6.1.  Replication

   It is expected that filesystem replication will be used in the case
   of read-only data.  Typically, the filesystem will be replicated on
   two or more servers.  The fs_locations attribute will provide the
   list of these locations to the client.  On first access of the
   filesystem, the client should obtain the value of the fs_locations
   attribute.  If, in the future, the client finds the server
   unresponsive, the client may attempt to use another server specified
   by fs_locations.


The implication is that any server filesystem should be prepared to 
receive a GETATTR {fs_locations}
inquiry.

But if the filesystem is not replicated, what should the server return 
to the client?

1) The empty set?
    - Not sure clients would understand the bitmap being set and no data 
in the results.

2) An error?
    - How do you convey the only error was that there was no other location?
    - Forces client to retransmit compound to get other attributes on 
the filesystem.

3) A set of locations comprised of all the names/IPs assigned to this 
server and the path to the root?
    - This is palatable, but doesn't convey the fact that the only 
location is on this server.

4) We don't error out, we simply do not set the corresponding bit in the 
bitmap.

The last is pretty sane, but I'm not sure how well it balances with the 
language in the description of
GETATTR:

   The GETATTR operation will obtain attributes for the filesystem
   object specified by the current filehandle.  The client sets a bit in
   the bitmap argument for each attribute value that it would like the
   server to return.  The server returns an attribute bitmap that
   indicates the attribute values for which it was able to return,
   followed by the attribute values ordered lowest attribute number
   first.

   The server must return a value for each attribute that the client
   requests if the attribute is supported by the server.  If the server
   does not support an attribute or cannot approximate a useful value
   then it must not return the attribute value and must not set the
   attribute bit in the result bitmap.  The server must return an error
   if it supports an attribute but cannot obtain its value.  In that
   case no attribute values will be returned.

   All servers must support the mandatory attributes as specified in the
   section "File Attributes".

So, assume we have other filesystems on the server which are replicated.

Then we do *support* fs_locations and while we *could* approximate
a useful value, we'd prefer not to do so.

Thus to indicate to the client that there are no replicas, we could simply
not return the attribute value and not set the attribute bit in the result
bitmap.

However, could doing so actually confuse clients?

I.e., a client mounts the root of a server and does a GETATTR with fs_locations.
The server does not set the attribute bit. Does the client understand this
to mean that there are no location information or does it mean that the
server does not support fs_locations as an attribute?

I'm proposing that we agree that if GETATTR {fs_locations} does not set the
attribute bit in the result, we interpret that to solely mean that there
is no location information for the corresponding filesystem at this time.
There could be later or there could be existing location information for
another filesystem on the server.


On a related note, I don't see a separate means to determine if an attribute
is supported or not. On the surface, a GETATTR with a single attribute would
seem to work, but GETATTR is not allowed to return NFS4ERR_NOTSUPP.