Re: [nfsv4] [FedFS] proposed ADMIN protocol procedure to enumerate server's NSDB store
Chuck Lever <chuck.lever@oracle.com> Thu, 08 July 2010 17:15 UTC
Return-Path: <chuck.lever@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 BD18C3A6AFA for <nfsv4@core3.amsl.com>; Thu, 8 Jul 2010 10:15:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.392
X-Spam-Level:
X-Spam-Status: No, score=-5.392 tagged_above=-999 required=5 tests=[AWL=1.207, 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 rsmCKpiFc0hk for <nfsv4@core3.amsl.com>; Thu, 8 Jul 2010 10:15:03 -0700 (PDT)
Received: from rcsinet10.oracle.com (rcsinet10.oracle.com [148.87.113.121]) by core3.amsl.com (Postfix) with ESMTP id D687A3A6888 for <nfsv4@ietf.org>; Thu, 8 Jul 2010 10:15:02 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o68HF56g020284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Jul 2010 17:15:06 GMT
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o68EMiCv015194; Thu, 8 Jul 2010 17:15:04 GMT
Received: from abhmt021.oracle.com by acsmt355.oracle.com with ESMTP id 410091671278609220; Thu, 08 Jul 2010 10:13:40 -0700
Received: from [141.144.6.228] (/141.144.6.228) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Jul 2010 10:13:40 -0700
Message-ID: <4C36073C.4060109@oracle.com>
Date: Thu, 08 Jul 2010 13:13:32 -0400
From: Chuck Lever <chuck.lever@oracle.com>
Organization: Oracle USA
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100607 Lightning/1.0b1 Thunderbird/3.0.4
MIME-Version: 1.0
To: "Everhart, Craig" <Craig.Everhart@netapp.com>
References: <4C35F555.1060604@oracle.com> <E7372E66F45B51429E249BF556CEFFBC0D0EF9EC@RTPMVEXC1-PRD.hq.netapp.com>
In-Reply-To: <E7372E66F45B51429E249BF556CEFFBC0D0EF9EC@RTPMVEXC1-PRD.hq.netapp.com>
Content-Type: text/plain; charset="iso-8859-1"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090208.4C360799.00B3:SCFMA4539814,ss=1,fgs=0
Cc: nfsv4@ietf.org
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 17:15:04 -0000
On 07/ 8/10 12:35 PM, Everhart, Craig wrote: > 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. See below: "Such a procedure can be used to check for stale NSDB name 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)." The ADMIN server, not the NFSv4 server, maintains the NSDB list. Given that FEDFS_CREATE_JUNCTION must fail if the ADMIN server doesn't have connection information for the presented NSDB, the ADMIN server therefore must keep a permanent list of NSDB names. This has been discussed before, briefly, but I'm not sure the discussion ever made it to meeting minutes. >> -----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
- [nfsv4] [FedFS] proposed ADMIN protocol procedure… Chuck Lever
- Re: [nfsv4] [FedFS] proposed ADMIN protocol proce… Everhart, Craig
- Re: [nfsv4] [FedFS] proposed ADMIN protocol proce… Chuck Lever
- Re: [nfsv4] [FedFS] proposed ADMIN protocol proce… Nicolas Williams
- Re: [nfsv4] [FedFS] proposed ADMIN protocol proce… Nicolas Williams
- Re: [nfsv4] [FedFS] proposed ADMIN protocol proce… Chuck Lever
- Re: [nfsv4] [FedFS] proposed ADMIN protocol proce… Nicolas Williams