Subject: [nfsv4] Issue with EXCHANGE_ID case 4

From: <[email-masked]>
Date: Mon, 19 Jul 2010 12:57:06 -0400

There seems to be a problem with the way case 4 of section 18.35.4 is
written, as it affects trunking (also retry,  although that isn't the
focus of this message).

Color code:
*	Blue is material from RFC 5661
*	Red is material that I'm thinking addresses an issue in RFC 5661
and might potentially be text to be incorporated in an errata or other
explanation of how to deal with this issue.
*	Black is for ordinary discussion and asides

The context is that when trunking is potentially in effect the same
client may be issuing multiple EXCHANGE_ID requests to the same server
at the same time, so that there can be more than one outstanding at
once.  Once the EXCHANGE_ID is completed (i.e. the client has received
the response), then the client can serialize these using the clientid
sequence, but until it gets the server_owner values, he can't, since he
doesn't know that the two destinations are the same server.  This can
occur both when multiple IP's are able to be session-trunked or when
they can only clientid-trunked.

I think this issue needs to be explained, and my approach to this issue
would be described by the following paragraph, which would make sense
appearing following the sixth paragraph of section 18.35.3

	Note that because the client doing EXCHANGE_ID does not possess
the 
	server-owner information at the time the request is issued, it
is 
	possible that the client will issue multiple EXCHANGE_ID
requests to 
	the same server (as evidenced by eir_server_owner) before a
response
	is received for any.  In this situation, the server will send
multiple 
   responses containing zero in the EXCHGID4_FLAG_CONFIRMED_R flag and 
   the same seqid and clientid values.  Note that in this situation, the

   requirement that the clientid be confirmed applies to the clientid as
   whole and is not something that must be done for every EXCHANGE_ID 
   response.  In the case in which the eir_server_owner values of the 
   two responses differ as to so_minor_id (clientid trunking), there
will 
   be multiple CREATE_SESSION operations done and the first of these
will 
   confirm the clientid and be done with the eir_sequenceid value
returned
   in the EXCHANGE_ID responses, while the second, which can only be 
   done after the response for the first request is received, will be
done 
   with immediately following seqid value for the clientid.

Assuming that this is not prevented by something else that I'm not
thinking of, then let's look at case 4 in RFC 5661 section 18.35.4.

  4.  Replacement of Unconfirmed Record

          If the EXCHGID4_FLAG_UPD_CONFIRMED_REC_A flag is not set, and
          the server has the following unconfirmed record, then the
          client is attempting EXCHANGE_ID again

"again" suggests that we are dealing with something that happened after
he got the response to the first which isn't necessarily true.

                                                 on an unconfirmed
          client ID, perhaps due to a retry, 

If this is the case of a retry, then creating a new clientid seems like
the wrong thing to do.  If we have initial try A and retry B, we don't
know for sure which response will be processed.  Normally, it is B but
it can be A, and if it is A, the client will get a clientid that has
been stepped on.  Generally, we work to make sure that two retries of
the same request have the same effect as one and that the response is
the same for both.  Normally this is done via a response cache but where
you don't have that, you should do what you can to make handling fit
that paradigm.

          a client restart before
          client ID confirmation (i.e., before CREATE_SESSION was
          called),

That case can be clearly distinguished by looking for a different
verifier value. 

          or some other reason.

What is discussed above for instance.

          { ownerid_arg, *, *, old_clientid_ret, unconfirmed }

          It is possible that the properties of old_clientid_ret are
          different than those specified in the current EXCHANGE_ID.

And it's also possible that they are the same as in the case of a retry.

          Whether or not the properties are being updated, to eliminate
          ambiguity, the server deletes the unconfirmed record,
          generates a new client ID (clientid_ret), and establishes the
          following unconfirmed record:

          { ownerid_arg, verifier_arg, principal_arg, clientid_ret,
          unconfirmed }

I'm suggesting that this action is only right for a subset of the
situations and that it would be better divided up as follows:

  4a.  Request Matching Unconfirmed Record

          If the EXCHGID4_FLAG_UPD_CONFIRMED_REC_A flag is not set, and
          the server has the following unconfirmed record, then the
          client has issues another EXCHANGE_ID on an unconfirmed client
          ID, perhaps due to a retry or to multiple EXCHANGE_ID requests
          being issued to different IP addresses in a situation in which
          trunking causes them to be handled by the same server. 

          { ownerid_arg, verifier_arg, principal_arg, clientid_ret, 
            unconfirmed }

          If the properties of clientid_ret are different from those 
          specified in the current EXCHANGE_ID, then this case does not 
          apply and the handling is as indicated below for case 4b.  
          Otherwise, the unconfirmed record is left as is and
clientid_ret 
          returned to the caller.

  4b.  Replacement of Unconfirmed Record

          If the EXCHGID4_FLAG_UPD_CONFIRMED_REC_A flag is not set, and
          the server has the following unconfirmed record, then the
          client is attempting EXCHANGE_ID again on an unconfirmed
          client ID, perhaps due to a client restart before client ID 
          confirmation (i.e., before CREATE_SESSION was called), or 
          some other reason.

          { ownerid_arg, *, *, old_clientid_ret, unconfirmed }

          It is possible that the properties of old_clientid_ret are
          different than those specified in the current EXCHANGE_ID.
          Whether or not the properties are being updated, to eliminate
          ambiguity, the server deletes the unconfirmed record,
          generates a new client ID (clientid_ret), and establishes the
          following unconfirmed record:

          { ownerid_arg, verifier_arg, principal_arg, clientid_ret,
          unconfirmed }

Alternative ways of dealing with this issue?  Other comments?

---

From: <[email-masked]>
Date: Mon, 19 Jul 2010 13:38:31 -0400

Given that my last attempt to communicate has gotten gable by someone
stepping on fonts and colors, I've attached the message as an html file.
Let me know if this is not readable either.

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf
Of [email-masked]
Sent: Monday, July 19, 2010 12:57 PM
To: [email-masked]
Subject: [nfsv4] Issue with EXCHANGE_ID case 4

Color code:

                                                 on an unconfirmed

          a client restart before

          or some other reason.

_______________________________________________
nfsv4 mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/nfsv4