Re: [nfsv4] NFS4ERR_ADMIN_REVOKE and edge conditions

Spencer Shepler <spencer.shepler@sun.com> Fri, 01 October 2004 22:56 UTC

Received: from ietf-mx.ietf.org (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id SAA05638 for <nfsv4-web-archive@ietf.org>; Fri, 1 Oct 2004 18:56:11 -0400 (EDT)
Received: from megatron.ietf.org ([132.151.6.71]) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CDWSV-0006PU-OL for nfsv4-web-archive@ietf.org; Fri, 01 Oct 2004 19:05:04 -0400
Received: from localhost.localdomain ([127.0.0.1] helo=megatron.ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CDVwf-0003RQ-Bh; Fri, 01 Oct 2004 18:32:09 -0400
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CDVhK-00065U-Bj for nfsv4@megatron.ietf.org; Fri, 01 Oct 2004 18:16:18 -0400
Received: from ietf-mx.ietf.org (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id SAA00803 for <nfsv4@ietf.org>; Fri, 1 Oct 2004 18:16:15 -0400 (EDT)
Received: from nwkea-mail-1.sun.com ([192.18.42.13]) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CDVpr-0000oI-6a for nfsv4@ietf.org; Fri, 01 Oct 2004 18:25:07 -0400
Received: from centralmail1brm.Central.Sun.COM ([129.147.62.1]) by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id i91MGG4d024352 for <nfsv4@ietf.org>; Fri, 1 Oct 2004 15:16:16 -0700 (PDT)
Received: from nfsclient.central.sun.com (nfsclient.Central.Sun.COM [129.153.128.2]) by centralmail1brm.Central.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL, v2.2) with ESMTP id i91MGFjW003094 for <nfsv4@ietf.org>; Fri, 1 Oct 2004 16:16:15 -0600 (MDT)
Received: from nfsclient.central.sun.com (localhost [127.0.0.1]) by nfsclient.central.sun.com (8.13.1+Sun/8.13.1) with ESMTP id i91MGFXO025526 for <nfsv4@ietf.org>; Fri, 1 Oct 2004 17:16:15 -0500 (CDT)
Received: (from shepler@localhost) by nfsclient.central.sun.com (8.13.1+Sun/8.13.1/Submit) id i91MGF2o025525 for nfsv4@ietf.org; Fri, 1 Oct 2004 17:16:15 -0500 (CDT)
Date: Fri, 01 Oct 2004 17:16:15 -0500
From: Spencer Shepler <spencer.shepler@sun.com>
To: nfsv4@ietf.org
Subject: Re: [nfsv4] NFS4ERR_ADMIN_REVOKE and edge conditions
Message-ID: <20041001221615.GG25304@nfsclient.central.sun.com>
Mail-Followup-To: Spencer Shepler <spencer.shepler@sun.com>, nfsv4@ietf.org
References: <200410011941.PAA82051@snowhite.cis.uoguelph.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <200410011941.PAA82051@snowhite.cis.uoguelph.ca>
User-Agent: Mutt/1.4.1i
X-Spam-Score: 1.1 (+)
X-Scan-Signature: bdc523f9a54890b8a30dd6fd53d5d024
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: spencer.shepler@sun.com
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/nfsv4>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
Sender: nfsv4-bounces@ietf.org
Errors-To: nfsv4-bounces@ietf.org
X-Spam-Score: 1.1 (+)
X-Scan-Signature: 3002fc2e661cd7f114cb6bae92fe88f1

Rick,

Sorry for coming in late on this....

The intent of NFS4ERR_ADMIN_REVOKED, as mentioned in section 8.8 that
referenced previously, is for administrative revocation of state.  The
best analogy to NFSv3 is when a client was "turned off" and file
locking state was left over at the server.  Most implementations allow
for revocation of all of the client's file locking state for cases
like this.  The addition of NFS4ERR_ADMIN_REVOKED was added because it
was assumed that similar adminstrative commands would exist for NFSv4
state (even thought it was leased based state).  These commands would
not necessarily remove all client state but may be targeted at
open/lock state for a particular file or filesystem.  

The cases considered were the file lock held but could not associate
with the proper application to kill to release the file lock; the
other was a broken client implementation that did not release the lock
properly and continued to renew its lease.

In these cases, not all client state would be removed ot need to be
removed.  However, the client should be told of the revocation and
hence the NFS4ERR_ADMIN_REVOKED.  The reason for returning this error
on RENEW is similar to the NFS4ERR_CB_PATH_DOWN such that the client
is active on other parts of the server's resources but not the part
where the state has been revoked.  The client could be told earlier of
the ADMIN_REVOKED than later and it could then in turn notify the
client environment as per its policies.  The idea was that the client
could "check" its state to determine what had been revoked; no clear
guidance was obviously given but something like a zero length read on
open files may suffice.

So for the specific questions....

On Fri, rick@snowhite.cis.uoguelph.ca wrote:
> I've been trying to figure out when the server can safely assume that the
> client has seen the NFS4ERR_ADMIN_REVOKED, so it can be allowed to reclaim
> state after a server reboot. (Related to the edge conditions discussed in
> Sec. 8.6.3)

If the server has rebooted, it just needs to return things like
NFS4ERR_STALE_CLIENTID/NFS4ERR_STALE_STATEID.  The ADMIN_REVOKED is
not required because all state has been removed for the client.

> When the server revokes all state for a client, it seems pretty straight
> forward:
> - clientid plus all stateids get NFS4ERR_ADMIN_REVOKED when used

See above, appropriate _STALE_ errors should be returned or
NFS4ERR_EXPIRED in the case where the server has not rebooted.

> - unless the client is partitioned, it will see the errors and presumably
>   do a setclientid/setclientid_confirm to get new state:
>   - the server can then note the client has seen the loss of state and
>     can again be allowed to recover state, noted in stable storage used
>     for server reboot
> - if it doesn't do a setclientid/setclientid_confirm, it won't be allowed
>   to recover state, but since there isn't any valid state for it to
>   recover (it was all revoked), that seems fine
> 
> But, when the server only revokes some state for the client (one lockowner
> and associated locks or ...), how can the server know that the client
> recognizes it has lost the state, so it can allow it to do reclaims after
> a server reboot?
> - it is tempting to say it would be ok once NFS4ERR_ADMIN_REVOKED is replied
>   to use of the stateid, but can it be certain the client received the
>   reply? (If another Op in sequence by seqid number was done for the stateid,
>   it could then be certain, but a client isn't likely to continue to use a
>   stateid after it gets NFS4ERR_ADMIN_REVOKED for it.)
> 
> It seems that, after revoking state, the server can only allow reclaims after
> a server reboot if the client does a subsequent setclientid/setclientid_confirm.
> But, if only some state was revoked, will it do that?

In the case of server reboot, all of this is moot.  The server doesn't
need to worry about partial revocation before the reboot because all
of it is gone now.

Spencer

_______________________________________________
nfsv4 mailing list
nfsv4@ietf.org
https://www1.ietf.org/mailman/listinfo/nfsv4