Re: [nfsv4] [FedFS] proposed ADMIN protocol procedure to enumerate server's NSDB store

"Everhart, Craig" <Craig.Everhart@netapp.com> Thu, 08 July 2010 16:35 UTC

Return-Path: <Craig.Everhart@netapp.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 B20A33A6812 for <nfsv4@core3.amsl.com>; Thu, 8 Jul 2010 09:35:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level:
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[AWL=0.001, BAYES_00=-2.599, 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 hphqnz4DGe8H for <nfsv4@core3.amsl.com>; Thu, 8 Jul 2010 09:35:31 -0700 (PDT)
Received: from mx2.netapp.com (mx2.netapp.com [216.240.18.37]) by core3.amsl.com (Postfix) with ESMTP id B32D53A67FA for <nfsv4@ietf.org>; Thu, 8 Jul 2010 09:35:29 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.53,559,1272870000"; d="scan'208";a="398131109"
Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 08 Jul 2010 09:35:30 -0700
Received: from sacrsexc1-prd.hq.netapp.com (sacrsexc1-prd.hq.netapp.com [10.99.115.27]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id o68GZTcC023395; Thu, 8 Jul 2010 09:35:30 -0700 (PDT)
Received: from rtprsexc2-prd.hq.netapp.com ([10.100.161.115]) by sacrsexc1-prd.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jul 2010 09:35:30 -0700
Received: from RTPMVEXC1-PRD.hq.netapp.com ([10.100.161.112]) by rtprsexc2-prd.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jul 2010 12:35:28 -0400
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Date: Thu, 08 Jul 2010 12:35:27 -0400
Message-ID: <E7372E66F45B51429E249BF556CEFFBC0D0EF9EC@RTPMVEXC1-PRD.hq.netapp.com>
In-Reply-To: <4C35F555.1060604@oracle.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [nfsv4] [FedFS] proposed ADMIN protocol procedure to enumerate server's NSDB store
Thread-Index: AcsetoTFqKjli/zBSaCueB88evJotQAA6lmA
References: <4C35F555.1060604@oracle.com>
From: "Everhart, Craig" <Craig.Everhart@netapp.com>
To: Chuck Lever <chuck.lever@oracle.com>, nfsv4@ietf.org
X-OriginalArrivalTime: 08 Jul 2010 16:35:28.0879 (UTC) FILETIME=[9346A7F0:01CB1EBB]
Subject: Re: [nfsv4] [FedFS] proposed ADMIN protocol procedure to enumerate server's NSDB store
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, 08 Jul 2010 16:35:34 -0000

Have I simply forgotten precisely why this is being proposed?  (Wouldn't be a surprise, here in vacation season.)

My naïve mental model for an NFSv4 server would not necessarily include a data structure that would match the thing being queried in this op.  I'm not sure of the value-add of trying to include it.

I'm sure we can discuss later today, but a written record is *so* handy.

		Craig

> -----Original Message-----
> From: Chuck Lever [mailto:chuck.lever@oracle.com]
> Sent: Thursday, July 08, 2010 11:57 AM
> To: nfsv4@ietf.org
> Subject: [nfsv4] [FedFS] proposed ADMIN protocol procedure to enumerate
> server's NSDB store
> 
> For discussion during today's FedFS phone call
> 
> I.     Description of intent for FEDFS_GET_NSDB_NAMES
> 
> The operation will return a list of NSDB information that was
> previously
> sent to the ADMIN server via FEDFS_SET_NSDB_PARAMS.  One list entry is
> returned for each NSDB.  Each list entry is a FedFsNsdbName.
> 
> A maxcount field is used to manage the amount of information that is
> returned in a single RPC.  To obtain the entire NSDB list stored on an
> ADMIN server, clients must potentially send multiple
> FEDFS_GET_NSDB_NAMES requests.  A cookie/verifier pair is used as a
> cursor to iterate over the NSDB list.
> 
> Such a procedure can be used to check for stale NSDB entries or
> misspellings, or to generate a menu of NSDB names in a graphical ADMIN
> client (ie for browsing the NSDB list on a server).
> 
> 
> II.     Proposed new data types, based on draft 05
> 
>     enum FedFsStatus {
>        ...
>      FEDFS_ERR_NSDB_PARAMS       = 24,
>      FEDFS_ERR_NSDB_NOT_SAME     = 25,
>      FEDFS_ERR_NSDB_TOO_SMALL    = 26
>     };
> 
>     typedef opaque                   FedFsVerifier[8];
> 
>     struct FedFsGetNsdbNamesArgs {
>             FedFsVerifier            verifier;
>             unsigned int             cookie;
>             unsigned int             maxcount;
>     };
> 
>     struct FedFsGetNsdbNamesResOk {
>             FedFsVerifier            verifier;
>             unsigned int             cookie;
>             FedFsNsdbName            names<>;
>     };
> 
>     struct FedFsGetNsdbNamesResTS {
>             FedFsVerifier            verifier;
>             unsigned int             cookie;
>             unsigned int             maxcount;
>     };
> 
>     union FedFsGetNsdbNamesRes switch (FedFsStatus status) {
>      case FEDFS_OK:
>             FedFsGetNsdbNamesResOk   resok;
>      case FEDFS_ERR_NSDB_TOO_SMALL:
>             FedFsGetNsdbNamesResTS   restoosmall;
>      default:
>             void;
>     };
> 
>     FedFsGetNsdbNamesRes FEDFS_GET_NSDB_NAMES(
>                  FedFsGetNsdbNamesArgs) = 10;
> 
> 
> III.     Proposed new language, based on draft 05 and RFC 5661
> 
> 3.     Error Values
> 
>       ...
> 
>     FEDFS_ERR_NSDB_PARAMS  The fileserver does not have any connection
>        parameters on record for the specified NSDB.
> 
>     FEDFS_ERR_NSDB_NOT_SAME  The cookie/verifier pair passed in a
>        FEDFS_GET_NSDB_NAMES request is no longer valid.
> 
>     FEDFS_ERR_NSDB_TOO_SMALL  The caller specified a maxcount that is
>        not large enough to hold the next FedFsNsdbName in a
>        FEDFS_GET_NSDB_NAMES result
> 
> 5.10.  FEDFS_GET_NSDB_NAMES
> 
>     This operation retrieves a partial or whole list of NSDBs that are
>     on record with this server.  The server's NSDB list includes NSDBs
>     that were previously registered with this ADMIN server via the
>     FEDFS_SET_NSDB_PARAMS operation.
> 
>     This operation returns only the FedFsNsdbName of each registered
>     NSDB.  Clients can retrieve other information related to any of
>     the returned NSDBs by subsequently issuing FEDFS_GET_NSDB_PARAMS
>     requests for interesting NSDBs.  Viewing the list of on-record
>     NSDBs MAY be a less privileged operation than viewing NSDB
>     connection parameters returned by FEDFS_GET_NSDB_PARAMS.
> 
>     The arguments contain a cookie value that represents where the
>     FEDFS_GET_NSDB_NAMES operation should start in the NSDB list.  For
>     the initial FEDFS_GET_NSDB_NAMES request, both the cookie value and
>     the verifier MUST be set to zero to start reading at the beginning
>     of the server's NSDB list.  For subsequent FEDFS_GET_NSDB_NAMES
>     requests, the client specifies the cookie and verifier values
>     returned by the server from a previous FEDFS_GET_NSDB_NAMES request.
> 
>     The cookie value is meaningful only to the server, which uses it
>     as a cursor for its NSDB name list.  The cookie value may be cached
>     by the client, but the client MUST treat cookie values as entirely
>     opaque.  Ideally, the cookie value SHOULD NOT change if the NSDB
> list
>     is modified, since the client may be caching these values.
> 
>     The server uses the verifier field to validate the cookie value. On
>     subsequent FEDFS_GET_NSDB_NAMES requests, the verifier field in the
>     request's arguments must match the verifier returned by the
>     FEDFS_GET_NSDB_NAMES request in which the cookie was acquired.  If
>     the server determines that the verifier is no longer valid, the
> error
>     FEDFS_ERR_NSDB_NOT_SAME MUST be returned.  To continue reading the
>     list, the client must issue a fresh initial FEDFS_GET_NSDB_NAMES
>     request, as described above.
> 
>     The verifier may be used by the ADMIN server to help manage cookie
>     values that may become stale.  It should be a rare occurrence that
> a
>     server is unable to continue properly reading a directory with the
>     provided cookie/verifier pair.  The server SHOULD make every effort
>     to avoid this condition since the client might be unable to
> properly
>     handle this type of failure.
> 
>     The maxcount field is a hint of the maximum number of bytes of NSDB
>     information that should be returned in the reply.  This value
>     represents the total length of NSDB names, after XDR encoding, and
>     not the length of the native format of the NSDB names on the ADMIN
>     server.  If the server is unable to fit a single name within the
>     maxcount limit, the error FEDFS_ERR_NSDB_TOO_SMALL MUST be returned.
>     The number of XDR bytes needed to return the next name MUST be
> placed
>     in the reply's maxcount field.  The server also returns a
>     cookie/verifier pair that is needed to read this value (usually
>     unchanged from the previous failed FEDFS_GET_NSDB_NAMES request).
> 
>     When there are no more NSDB names to return, the server sets the
>     cookie and verifier reply fields to zero.  If the ADMIN server's
> NSDB
>     list is empty on the initial FEDFS_GET_NSDB_NAMES request, the
> server
>     MUST return an empty names list and set the cookie and verifier
> reply
>     fields to zero.
> 
>     On success, this operation returns FEDFS_OK, a list of
>     FedFsNsdbNames, and a cookie/verifier pair that the client can use
>     to retrieve the next list entries.
> 
>     On failure, an error value indicating the type of error is returned.
>     The operation MAY return FEDFS_ERR_ACCESS if the operation's
>     associated user does not have sufficient permissions to view NSDB
>     names.
> 
> --
> chuck[dot]lever[at]oracle[dot]come
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4