idnits 2.17.1 draft-ietf-nfsv4-migration-issues-10.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 17, 2016) is 2808 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 5661 (Obsoleted by RFC 8881) == Outdated reference: A later version (-11) exists of draft-ietf-nfsv4-versioning-05 Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NFSv4 D. Noveck, Ed. 3 Internet-Draft HPE 4 Intended status: Informational P. Shivam 5 Expires: February 18, 2017 C. Lever 6 B. Baker 7 ORACLE 8 August 17, 2016 10 NFSv4 migration: Implementation Experience and Specification Issues 11 draft-ietf-nfsv4-migration-issues-10 13 Abstract 15 The migration feature of NFSv4 provides for moving responsibility for 16 a single filesystem from one server to another, without disruption to 17 clients. Recent implementation experience has shown problems in the 18 existing specification for this feature. This document discusses 19 options to cure issues which have arisen. It also explains the 20 choices made in updating the NFSv4.0 specification and those to be 21 made with regard to the NFSv4.1 specification, in order to properly 22 address migration. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on February 18, 2017. 41 Copyright Notice 43 Copyright (c) 2016 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 3. NFSv4.0 Implementation Experience . . . . . . . . . . . . . . 4 61 3.1. Implementation Issues . . . . . . . . . . . . . . . . . . 4 62 3.1.1. Failure to Free Migrated State on Client Reboot . . . 4 63 3.1.2. Server Reboots Resulting in a Confused Lease 64 Situation . . . . . . . . . . . . . . . . . . . . . . 5 65 3.1.3. Client Complexity Issues . . . . . . . . . . . . . . 6 66 3.2. Sources of Protocol Difficulties . . . . . . . . . . . . 7 67 3.2.1. Issues with nfs_client_id4 Generation and Use . . . . 7 68 3.2.2. Issues with Lease Proliferation . . . . . . . . . . . 9 69 4. Issues Requiring Resolution in NFSv4.0 . . . . . . . . . . . 10 70 4.1. Changes to nfs_client_id4 Client-string . . . . . . . . . 10 71 4.2. Changes to Handle Differing nfs_client_id4 String Values 11 72 4.3. Potential Changes to Add a New Operation . . . . . . . . 11 73 4.4. Other Issues Within Migration-state Sections . . . . . . 12 74 4.5. Issues Within Other Sections . . . . . . . . . . . . . . 12 75 5. Resolution of NFSv4.0 Protocol Difficulties . . . . . . . . . 13 76 5.1. Changes Regarding nfs_client_id4 Client-string . . . . . 13 77 5.2. Changes Regarding Merged (vs. Synchronized) Leases . . . 14 78 5.3. Other Changes to Migration-state Sections . . . . . . . . 15 79 5.3.1. Changes Regarding Client ID Migration . . . . . . . . 15 80 5.3.2. Changes Regarding Callback Re-establishment . . . . . 16 81 5.3.3. NFS4ERR_LEASE_MOVED Rework . . . . . . . . . . . . . 16 82 5.4. Changes to Other Sections . . . . . . . . . . . . . . . . 17 83 5.4.1. Callback Update . . . . . . . . . . . . . . . . . . . 17 84 5.4.2. clientid4 Handling . . . . . . . . . . . . . . . . . 17 85 5.4.3. Handling of NFS4ERR_CLID_INUSE . . . . . . . . . . . 19 86 6. Issues for NFSv4.1 . . . . . . . . . . . . . . . . . . . . . 20 87 6.1. Addressing state merger in NFSv4.1 . . . . . . . . . . . 20 88 6.2. Addressing pNFS relationship with migration . . . . . . . 21 89 6.3. Addressing server owner changes in NFSv4.1 . . . . . . . 21 90 7. Security Considerations . . . . . . . . . . . . . . . . . . . 22 91 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 92 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 23 93 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 94 10.1. Normative References . . . . . . . . . . . . . . . . . . 23 95 10.2. Informative References . . . . . . . . . . . . . . . . . 23 96 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 98 1. Introduction 100 This document is in the informational category, and while the facts 101 it reports may have normative implications, any such normative 102 significance reflects the readers' preferences. For example, we may 103 report that the reboot of a client with migrated state results in 104 state not being promptly cleared and that this will prevent granting 105 of conflicting lock requests at least for the lease time, which is a 106 fact. While it is to be expected that client and server implementers 107 will judge this to be a situation that is best avoided, the judgment 108 as to how pressing this issue should be considered is a judgment for 109 the reader, and eventually the nfsv4 working group to make. 111 We do explore possible ways in which such issues can be avoided, with 112 minimal negative effects, given that the working group has decided to 113 address these issues, but the choice of exactly how to address these 114 is best given effect in one or more standards-track documents and/or 115 errata. 117 This document focuses on NFSv4.0, since that is where the majority of 118 implementation experience has been. Nevertheless, there is 119 discussion of the implications of the NFSv4.0 experience for 120 migration in NFSv4.1, as well as discussion of other issues with 121 regard to the treatment of migration in NFSv4.1. 123 2. Conventions 125 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 126 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 127 document are to be interpreted as described in [RFC2119]. 129 In the context of this informational document, these normative 130 keywords will always occur in the context of a quotation, most often 131 direct but sometimes indirect. The context will make it clear 132 whether the quotation is from: 134 o The previously current definitive definition of the NFSv4.0 135 protocol [RFC7530]. 137 o The current definitive definition of the NFSv4.1 protocol 138 [RFC5661]. 140 o A proposed or possible text to serve as a replacement for the 141 current or previous definitive document text. Sometimes, a number 142 of possible alternative texts may be listed and benefits and 143 detriments of each examined in turn. 145 3. NFSv4.0 Implementation Experience 147 3.1. Implementation Issues 149 Note that the examples below reflect current experience which arises 150 from clients implementing the recommendation to use different 151 nfs_client_id4 id strings for different server addresses, i.e. using 152 what is later referred to herein as the "non-uniform client-string 153 approach." 155 This is simply because that is the experience implementers have had. 156 The reader should not assume that in all cases, this practice is the 157 source of the difficulty. It may be so in some cases but clearly it 158 is not in all cases. 160 3.1.1. Failure to Free Migrated State on Client Reboot 162 The following sort of situation has proved troublesome: 164 o A client C establishes a clientid4 C1 with server ABC specifying 165 an nfs_client_id4 with id string value "C-ABC" and boot verifier 166 0x111. 168 o The client begins to access files in filesystem F on server ABC, 169 resulting in generating stateids S1, S2, etc. under the lease for 170 clientid C1. It may also access files on other filesystems on the 171 same server. 173 o The filesystem is migrated from server ABC to server XYZ. When 174 transparent state migration is in effect, stateids S1 and S2 and 175 clientid4 C1 are now available for use by client C at server XYZ. 177 o Client C reboots and attempts to access data on server XYZ, 178 whether in filesystem F or another. It does a SETCLIENTID with an 179 nfs_client_id4 with id string value "C-XYZ" and boot verifier 180 0x112. There is thus no occasion to free stateids S1 and S2 since 181 they are associated with a different client name and so lease 182 expiration is the only way that they can be gotten rid of. 184 Note here that while it seems clear to us in this example that C-XYZ 185 and C-ABC are from the same client, the server has no way to 186 determine the structure of the "opaque" id string. In the protocol, 187 it really is treated as opaque. Only the client knows which 188 nfs_client_id4 values designate the same client on a different 189 server. 191 3.1.2. Server Reboots Resulting in a Confused Lease Situation 193 Further problems arise from scenarios like the following. 195 o Client C talks to server ABC using an nfs_client_id4 id string 196 such as "C-ABC" and a boot verifier v1. As a result, a lease with 197 clientid4 c.i is established: {v1, "C-ABC", c.i}. 199 o fs_a1 migrates from server ABC to server XYZ along with its state. 200 Now server XYZ also has a lease: {v1, "C-ABC", c.i}. 202 o Server ABC reboots. 204 o Client C talks to server ABC using an nfs_client_id4 id string 205 such as "C-ABC" and a boot verifier v1. As a result, a lease with 206 clientid4 c.j is established: {v1, "C-ABC", c.j}. 208 o fs_a2 migrates from server ABC to server XYZ. Now server XYZ also 209 has a lease: {v1, "C-ABC", c.j}. 211 o Now server XYZ has two leases that match {v1, "C-ABC", *}, when 212 the protocol clearly assumes there can be only one. 214 Note that if the client used "C" (rather than "C-ABC") as the 215 nfs_client_id4 id string, the exact same situation would arise. 217 One of the first cases in which this sort of situation has resulted 218 in difficulties is in connection with doing a SETCLIENTID for 219 callback update. 221 The SETCLIENTID for callback update only includes the nfs_client_id4, 222 assuming there can only be one such with a given nfs_client_id4 223 value. If there were multiple, confirmed client records with 224 identical nfs_client_id4 id string values, there would be no way to 225 map the callback update request to the correct client record. Apart 226 from the migration handling specified in [RFC7530], such a situation 227 cannot arise. 229 One possible accommodation for this particular issue that has been 230 used is to add a RENEW operation along with SETCLIENTID (on a 231 callback update) to disambiguate the client. 233 When the client updates the callback info to the destination, the 234 client would, by convention, send a compound like this: 236 { RENEW clientid4, SETCLIENTID nfs_client_id4,verf,cb } 237 The presence of the clientid4 in the compound would allow the server 238 to differentiate among the various leases that it knows of, all with 239 the same nfs_client_id4 value. 241 While this would be a reasonable patch for an isolated protocol 242 weakness, interoperable clients and servers would require that the 243 protocol truly be updated to allow such a situation, specifically 244 that of multiple clientid4's with the same nfs_client_id4 value. The 245 protocol is currently designed and implemented assuming this cannot 246 happen. We need to either prevent the situation from happening, or 247 fully adapt to the possibilities which can arise. See Section 4 for 248 a discussion of such issues. 250 3.1.3. Client Complexity Issues 252 Consider the following situation: 254 o There are a set of clients C1 through Cn accessing servers S1 255 through Sm. Each server manages some significant number of 256 filesystems with the filesystem count L being significantly 257 greater than m. 259 o Each client Cx will access a subset of the servers and so will 260 have up to m clientids, which we will call Cxy for server Sy. 262 o Now assume that for load-balancing or other operational reasons, 263 numbers of filesystems are migrated among the servers. As a 264 result, each client-server pair will have up to m clientids and 265 each client will have up to m**2 clientids. If we add the 266 possibility of server reboot, the only bound on a client's 267 clientid count is L. 269 Now, instead of a clientid4 identifying a client-server pair, we have 270 many more entities for the client to deal with. In addition, it 271 isn't clear how new state is to be incorporated in this structure. 273 The limitations of the migrated state (inability to be freed on 274 reboot) would argue against adding more such state but trying to 275 avoid that would run into its own difficulties. For example, a 276 single lockowner string presented under two different clientids would 277 appear as two different entities. 279 Thus we have to choose between: 281 o indefinite prolongation of foreign clientids even after all 282 transferred state is gone. 284 o having multiple requests for the same lockowner-string-named 285 entity carried on in parallel by separate identically named 286 lockowners under different clientid4's 288 o Adding serialization at the lock-owner string level, in addition 289 to that at the lockowner level. 291 In any case, we have gone (in adding migration as it was described) 292 from a situation in which 294 o Each client has a single clientid4/lease for each server it talks 295 to. 297 o Each client has a single nfs_client_id4 for each server it talks 298 to. 300 o Every state id can be mapped to an associated lease based on the 301 server it was obtained from. 303 To one in which 305 o Each client may have multiple clientid4's for a single server. 307 o For each stateid, the client must separately record the clientid4 308 that it is assigned to, or it must manage separate "state blobs" 309 for each fsid and map those to clientid4's. 311 o Before doing an operation that can result in a stateid, the client 312 must either find a "state blob" based on fsid or create a new one, 313 possibly with a new clientid4. 315 o There may be multiple clientid4's all connected to the same server 316 and using the same nfs_clientid4. 318 This sort of additional client complexity is troublesome and needs to 319 be eliminated. 321 3.2. Sources of Protocol Difficulties 323 3.2.1. Issues with nfs_client_id4 Generation and Use 325 In [RFC7530], the section entitled "Client ID" says: 327 The second field, id is a variable length string that uniquely 328 defines the client. 330 There are two possible interpretations of the phrase "uniquely 331 defines" in the above: 333 o The relation between strings and clients is a function from such 334 strings to clients so that each string designates a single client. 336 o The relation between strings and clients is a bijection between 337 such strings and clients so that each string designates a single 338 client and each client is named by a single string. 340 The first interpretation would make these client-strings like phone 341 numbers (a single person can have several) while the second would 342 make them like social security numbers. 344 Debate about the possible meanings of "uniquely defines" in this 345 context is quite possible but not very helpful. The following points 346 should be noted though: 348 o The second interpretation is more consistent with the way 349 "uniquely defines" is used elsewhere in the spec. 351 o The spec as now written intends the first interpretation (or is 352 internally inconsistent). In fact, it recommends, although non- 353 normatively, that a single client have at least as many client- 354 strings as server addresses that it interacts with. It says, in 355 the third bullet point regarding construction of the string (which 356 we shall henceforth refer to as client-string-BP3): 358 The string should be different for each server network address 359 that the client accesses, rather than common to all server 360 network addresses. 362 o If internode interactions are limited to those between a client 363 and its servers, there is no occasion for servers to be concerned 364 with the question of whether two client-strings designate the same 365 client, so that there is no occasion for the difference in 366 interpretation to matter. 368 o When transparent migration of client state occurs between two 369 servers, it becomes important to determine when state on two 370 different servers is for the same client or not, and this 371 distinction becomes very important. 373 Given the need for the server to be aware of client identity with 374 regard to migrated state, either client-string construction rules 375 will have to change or there will be a need to get around current 376 issues, or perhaps a combination of these two will be required. 377 Later sections will examine the options and propose a solution. 379 One consideration that may indicate that this cannot remain exactly 380 as it has been derives from the fact that the current explanation for 381 this behavior is not correct. In [RFC7530], the section entitled 382 "Client ID" says: 384 The reason is that it may not be possible for the client to tell 385 if the same server is listening on multiple network addresses. If 386 the client issues SETCLIENTID with the same id string to each 387 network address of such a server, the server will think it is the 388 same client, and each successive SETCLIENTID will cause the server 389 to begin the process of removing the client's previous leased 390 state. 392 In point of fact, a "SETCLIENTID with the same id string" sent to 393 multiple network addresses will be treated as all from the same 394 client but will not "cause the server to begin the process of 395 removing the client's previous leased state" unless the server 396 believes it is a different instance of the same client, i.e. if the 397 id string is the same and there is a different boot verifier. If the 398 client does not reboot, the verifier should not change. If it does 399 reboot, the verifier will change, and it is appropriate that the 400 server "begin the process of removing the client's previous leased 401 state. 403 The situation of multiple SETCLIENTID requests received by a server 404 on multiple network addresses is exactly the same, from the protocol 405 design point of view, as when multiple (i.e. duplicate) SETCLIENTID 406 requests are received by the server on a single network address. The 407 same protocol mechanisms that prevent erroneous state deletion in the 408 latter case prevent it in the former case. There is no reason for 409 special handling of the multiple-network-appearance case, in this 410 regard. 412 3.2.2. Issues with Lease Proliferation 414 It is often felt that this is a consequence of the client-string 415 construction issues, and it is certainly the case that the two are 416 closely connected in that non-uniform client-strings make it 417 impossible for the server to appropriately combine leases from the 418 same client. 420 However, even where the server could combine leases from the same 421 client, it needs to be clear how and when it will do so, so that the 422 client will be prepared. These issues will have to be addressed at 423 various places in the protocol specification. 425 This could be enough only if we are prepared to do away with the 426 "should" recommending non-uniform client-strings and replace it with 427 a "should not" or even a "SHOULD NOT". Current client implementation 428 patterns make this an unpalatable choice for use as a general 429 solution, but it is reasonable to "RECOMMEND" this choice for a well- 430 defined subset of clients. One alternative would be to create a way 431 for the server to infer from client behavior which leases are held by 432 the same client and use this information to do appropriate lease 433 mergers. Prototyping and detailed specification work has shown that 434 this could be done but the resulting complexity is such that a better 435 choice is to "RECOMMEND" use of the uniform client-string approach 436 for clients supporting the migration feature. 438 Because of the discussion of client-string construction in [RFC7530], 439 most existing clients implement the non-uniform client-string 440 approach. As a result, existing servers may not have been tested 441 with clients implementing uniform client-strings. As a consequence, 442 care must be taken to preserve interoperability between UCS-capable 443 clients and servers that don't tolerate uniform client strings for 444 one reason or another. 446 4. Issues Requiring Resolution in NFSv4.0 448 4.1. Changes to nfs_client_id4 Client-string 450 The fact that the reason given in client-string-BP3 is not valid 451 makes the existing "should" insupportable. We can't either 453 o Keep a reason we know is invalid. 455 o Keep saying "should" without giving a reason. 457 What are often presented as reasons that motivate use of the non- 458 uniform approach always turn out to be cases in which, if the uniform 459 approach were used, the server will treat a client which accesses 460 that server via two different IP addresses as part of a single 461 client, as it in fact is. This may be disconcerting to a client 462 unaware that the two IP addresses connect to the same server. This 463 is not a reason to use the non-uniform approach but is better thought 464 of as an illustration of the fact that those using the uniform 465 approach need to be aware of the possibility of server trunking and 466 its potential effect on server behavior. 468 Since it is possible to reliably infer the existence of trunking of 469 server IP addresses from observed server behavior, use of the uniform 470 approach is more desirable, although compatibility issues need to be 471 dealt with. 473 An alternative to having the client infer the existence of trunking 474 of IP server addresses, is to make this information available to the 475 client directly. See Section 4.3 for details. 477 It is always possible that a valid new reason will be found, but so 478 far none has been proposed. Given the history, the burden of proof 479 was on those asserting the validity of a proposed new reason. 481 So we will assume that the "should" needs to go. The question was 482 what to replace it with. 484 o We can't say "MUST NOT", despite the problems this raises for 485 migration since this is pretty late in the day for such a change. 486 Many currently operating clients obey the existing "should". 487 Similar considerations would apply for "SHOULD NOT" or "should 488 not". 490 o Dropping client-string-BP3 entirely is a possibility but, given 491 the context and history, it would just be a confusing version of 492 "SHOULD NOT". 494 o Using "MAY" would clearly specify that both ways of doing this are 495 valid choices for clients and that servers will have to deal with 496 clients that make either choice. 498 o This might be modified by a "SHOULD" (or even a "MUST") for 499 particular groups of clients. 501 o There has to be some text explaining why a client might make 502 either choice but, except for the particular cases referred to 503 above, it will have to made sure that it is truly descriptive, and 504 not slanted in either direction. 506 4.2. Changes to Handle Differing nfs_client_id4 String Values 508 Given the difficulties caused by having different nfs_client_id4 509 client-string values for the same client, we had two choices: 511 o Deprecating the existing treatment and basically saying the client 512 is on its own doing migration, if it follows it. 514 o Introducing a way of having the client provide client identity 515 information to the server, if it can be done compatibly while 516 staying within the bounds of v4.0. 518 4.3. Potential Changes to Add a New Operation 520 It might be possible to return server-identity information to the 521 client, just as is done in NFSv4.1 by the response to the EXCHANGE_ID 522 operation. This could be done by a SETCLIENTID_PLUS optional 523 operation, which acts like SETCLIENTID, except that it returns server 524 identity information. Such information could be used by clients, 525 making it possible to for them to be aware of server trunking 526 relationships, rather than having to infer them from server behavior. 528 It has been generally thought that protocol extensions such as this 529 are not appropriate in bis documents and other documents updating 530 NFSv4 protocol definition RFC's. However, [NFSv4-vers] discusses 531 means by which protocol extensions, similar to those allowed between 532 minor versions, could be used to correct protocol mistakes. 534 A decision to adopt this approach would require waiting for 535 [NFSv4-vers] to become a Proposed Standard. In view of the time 536 necessary for that to happen, this approach was not available in an 537 RFC updating [RFC7530], such as [RFC7931]. Still, it is worth 538 keeping in mind, if implementers have difficulties inferring trunking 539 relationships using the techniques discussed there. 541 4.4. Other Issues Within Migration-state Sections 543 There are a number of issues where the existing text is unclear and/ 544 or wrong and needs to be fixed in some way. 546 o Lack of clarity in the discussion of moving clientids (as well as 547 stateids) as part of moving state for migration. 549 o The discussion of synchronized leases is wrong in that there is no 550 way to determine (in the current spec) when leases are for the 551 same client and also wrong in suggesting a benefit from leases 552 synchronized at the point of transfer. What is needed is merger 553 of leases, which is necessary to keep client complexity 554 requirements from getting out of hand. 556 o Lack of clarity in the discussion of LEASE_MOVED handling, 557 including failure to fully address situations in which transparent 558 state migration did not occur. 560 4.5. Issues Within Other Sections 562 There are a number of cases in which certain sections, not 563 specifically related to migration, require additional clarification. 564 This is generally because text that is clear in a context in which 565 leases and clientids are created in one place and live there forever 566 may need further refinement in the more dynamic environment that 567 arises as part of migration. 569 Some examples: 571 o Some people are under the impression that updating callback 572 endpoint information for an existing client, as used during 573 migration, may cause the destination server to free existing 574 state. There need to be additions to clarify the situation. 576 o The handling of the sets of clientid4's maintained by each server 577 needs to be clarified. In particular, the issue of how the client 578 adapts to the presumably independent and uncoordinated clientid4 579 sets needs to be clearly addressed 581 o Statements regarding handling of invalid clientid4's need to be 582 clarified and/or refined in light of the possibilities that arise 583 due to lease motion and merger. 585 o Confusion and lack of clarity about NFS4ERR_CLID_INUSE. 587 5. Resolution of NFSv4.0 Protocol Difficulties 589 This section lists the changes that were necessary to resolve the 590 difficulties mentioned above. Such changes, along with other 591 clarifications found to be desirable during drafting and review are 592 contained in [RFC7931]. 594 5.1. Changes Regarding nfs_client_id4 Client-string 596 It was decided to replace client-string-BP3 with the following text: 598 The string MAY be different for each server network address that 599 the client accesses, rather than common to all server network 600 addresses. 602 In addition, given the importance of the issue of client identity and 603 the fact that both client string-approaches are to be considered 604 valid, a greatly expanded treatment of client identity was desirable. 605 It had the following major elements. 607 o Fully describing the consequences of making the string different 608 for each network address (the non-uniform client-string approach) 609 and of making it the same for all network addresses (the uniform 610 client string approach). 612 o Giving helpful guidance about the factors that might affect client 613 implementation choice between these approaches. 615 o Describing the compatibility issues that might cause servers to be 616 incompatible with the uniform approach and give guidance about 617 dealing with these. 619 o Describing how a client using the uniform approach might use 620 server behavior to determine server address trunking patterns. 622 o Presenting a clearer and more complete set of recommendations to 623 guide client string construction. 625 5.2. Changes Regarding Merged (vs. Synchronized) Leases 627 In [RFC7530], the section entitled "Migration and State" says: 629 As part of the transfer of information between servers, leases 630 would be transferred as well. The leases being transferred to the 631 new server will typically have a different expiration time from 632 those for the same client, previously on the old server. To 633 maintain the property that all leases on a given server for a 634 given client expire at the same time, the server should advance 635 the expiration time to the later of the leases being transferred 636 or the leases already present. This allows the client to maintain 637 lease renewal of both classes without special effort: 639 There are a number of problems with this and any resolution of our 640 difficulties must address them somehow. 642 o [RFC7530] recommends that the client make it essentially 643 impossible to determine when two leases are from "the same 644 client". 646 o It is not appropriate to speak of "maintain[ing] the property that 647 all leases on a given server for a given client expire at the same 648 time", since this is not a property that holds even in the absence 649 of migration. A server listening on multiple network addresses 650 may have the same client appear as multiple clients with no way to 651 recognize the client as the same. 653 o Even if the client identity issue could be resolved, advancing the 654 lease time at the point of migration would not maintain the 655 desired synchronization property. The leases would be 656 synchronized until one of them was renewed, after which they would 657 be unsynchronized again. 659 To avoid client complexity, we need to have no more than one lease 660 between a single client and a single server. This requires merger of 661 leases since there is no real help from synchronizing them at a 662 single instant. 664 For the uniform approach, the destination server would simply merge 665 leases as part of state transfer, since two leases with the same 666 nfs_client_id4 values must be for the same client. 668 We have made the following decisions as far as proposed normative 669 statements regarding for state merger. They reflect the facts that 670 we want to allow full migration support in the simplest way possible 671 and that we can't say MUST since we have older clients and servers to 672 deal with. 674 o Clients MAY use the uniform client-string approach and are well- 675 advised to do so if they are concerned about getting good 676 migration support. 678 o Servers SHOULD provide automatic lease merger during state 679 migration so that clients using the uniform id approach get the 680 support automatically. 682 If servers obey the SHOULD and clients choose to adopt the uniform id 683 approach, having more than a single lease for a given client-server 684 pair will be a transient situation, cleaned up as part of adapting to 685 use of migrated state. 687 Since clients and servers will be a mixture of old and new and 688 because nothing is a MUST we have to ensure that no combination will 689 show worse behavior than is exhibited by current (i.e. old) clients 690 and servers. 692 5.3. Other Changes to Migration-state Sections 694 5.3.1. Changes Regarding Client ID Migration 696 In [RFC7530], the section entitled "Migration and State" says: 698 In the case of migration, the servers involved in the migration of 699 a filesystem SHOULD transfer all server state from the original to 700 the new server. This must be done in a way that is transparent to 701 the client. This state transfer will ease the client's transition 702 when a filesystem migration occurs. If the servers are successful 703 in transferring all state, the client will continue to use 704 stateids assigned by the original server. Therefore the new 705 server must recognize these stateids as valid. This holds true 706 for the client ID as well. Since responsibility for an entire 707 filesystem is transferred with a migration event, there is no 708 possibility that conflicts will arise on the new server as a 709 result of the transfer of locks. 711 This poses some difficulties, mostly because the part about "client 712 ID" is not clear: 714 o It isn't clear what part of the paragraph the "this" in the 715 statement "this holds true ..." is meant to signify. 717 o The phrase "the client ID" is ambiguous, possibly indicating the 718 clientid4 and possibly indicating the nfs_client_id4. 720 o If the text means to suggest that the same clientid4 must be used, 721 the logic is not clear since the issue is not the same as for 722 stateids of which there might be many. Adapting to the change of 723 a single clientid, as might happen as a part of lease migration, 724 is relatively easy for the client. 726 We have decided that it is best to address this issue as follows: 728 o Make it clear that both clientid4 and nfs_client_id4 (including 729 both id string and boot verifier) are to be transferred. 731 o Indicate that the initial transfer will result in the same 732 clientid4 after transfer but this is not guaranteed since there 733 may conflict with an existing clientid4 on the destination server 734 and because lease merger can result in a change of the clientid4. 736 5.3.2. Changes Regarding Callback Re-establishment 738 In [RFC7530], the section entitled "Migration and State" says: 740 A client SHOULD re-establish new callback information with the new 741 server as soon as possible, according to sequences described in 742 sections "Operation 35: SETCLIENTID - Negotiate Client ID" and 743 "Operation 36: SETCLIENTID_CONFIRM - Confirm Client ID". This 744 ensures that server operations are not blocked by the inability to 745 recall delegations. 747 The above will need to be fixed to reflect the possibility of merging 748 of leases, 750 5.3.3. NFS4ERR_LEASE_MOVED Rework 752 In [RFC7530], the section entitled "Notification of Migrated Lease" 753 says: 755 Upon receiving the NFS4ERR_LEASE_MOVED error, a client that 756 supports filesystem migration MUST probe all filesystems from that 757 server on which it holds open state. Once the client has 758 successfully probed all those filesystems which are migrated, the 759 server MUST resume normal handling of stateful requests from that 760 client. 762 There is a lack of clarity that is prompted by ambiguity about what 763 exactly probing is and what the interlock between client and server 764 must be. This has led to some worry about the scalability of the 765 probing process, and although the time required does scale linearly 766 with the number of filesystems that the client may have state for 767 with respect to a given server, the actual process can be done 768 efficiently. 770 To address these issues, the text above had to be rewritten to be 771 more clear and to give suggestions about how to do the required 772 scanning efficiently. 774 5.4. Changes to Other Sections 776 5.4.1. Callback Update 778 Some changes are necessary to reduce confusion about the process of 779 callback information update and in particular to make it clear that 780 no state is freed as a result: 782 o Make it clear that after migration there are confirmed entries for 783 transferred clientid4/nfs_client_id4 pairs. 785 o Be explicit in the sections headed "otherwise," in the 786 descriptions of SETCLIENTID and SETCLIENTID_CONFIRM, that these 787 don't apply in the cases we are concerned about. 789 5.4.2. clientid4 Handling 791 To address both of the clientid4-related issues mentioned in 792 Section 4.5, it was necessary to replace the last three paragraphs of 793 the section entitled "Client ID" with the following: 795 Once a SETCLIENTID and SETCLIENTID_CONFIRM sequence has 796 successfully completed, the client uses the shorthand client 797 identifier, of type clientid4, instead of the longer and less 798 compact nfs_client_id4 structure. This shorthand client 799 identifier (a client ID) is assigned by the server and should be 800 chosen so that it will not conflict with a client ID previously 801 assigned by same server. This applies across server restarts or 802 reboots. 804 Distinct servers MAY assign clientid4's independently, and will 805 generally do so. Therefore, a client has to be prepared to deal 806 with multiple instances of the same clientid4 value received on 807 distinct IP addresses, denoting separate entities. When trunking 808 of server IP addresses is not a consideration, a client should 809 keep track of (IP-address, clientid4) pairs, so that each pair is 810 distinct. In the face of possible trunking of server IP 811 addresses, the client will use the receipt of the same clientid4 812 from multiple IP-addresses, as an indication that the two IP- 813 addresses may be trunked and proceed to determine, from the 814 observed server behavior whether the two addresses are in fact 815 trunked. 817 When a clientid4 is presented to a server and that clientid4 is 818 not recognized, the server will reject the request with the error 819 NFS4ERR_STALE_CLIENTID. This can occur for a number of reasons: 821 * A server reboot causing loss of the server's knowledge of the 822 client 824 * Client error sending an incorrect clientid4 or a valid 825 clientid4 to the wrong server. 827 * Loss of lease state due to lease expiration. 829 * Client or server error causing the server to believe that the 830 client has rebooted (i.e. receiving a SETCLIENTID with an 831 nfs_client_id4 which has a matching id string and a non- 832 matching boot verifier). 834 * Migration of all state under the associated lease causes its 835 non-existence to be recognized on the source server. 837 * Merger of state under the associated lease with another lease 838 under a different clientid causes the clientid4 serving as the 839 source of the merge to cease being recognized on its server. 841 In the event of a server reboot, or loss of lease state due to 842 lease expiration, the client must obtain a new clientid4 by use of 843 the SETCLIENTID operation and then proceed to any other necessary 844 recovery for the server reboot case (See the section entitled 845 "Server Failure and Recovery"). In cases of server or client 846 error resulting in this error, use of SETCLIENTID to establish a 847 new lease is desirable as well. 849 In the last two cases, different recovery procedures are required. 850 Note that in cases in which there is any uncertainty about which 851 sort of handling is applicable, the distinguishing characteristic 852 is that in reboot-like cases, the clientid4 and all associated 853 stateids cease to exist while in migration-related cases, the 854 clientid4 ceases to exist while the stateids are still valid. 856 The client must also employ the SETCLIENTID operation when it 857 receives a NFS4ERR_STALE_STATEID error using a stateid derived 858 from its current clientid4, since this indicates a situation, such 859 as server reboot which has invalidated the existing clientid4 and 860 associated stateids (see the section entitled "lock-owner" for 861 details). 863 See the detailed descriptions of SETCLIENTID and 864 SETCLIENTID_CONFIRM for a complete specification of the 865 operations. 867 5.4.3. Handling of NFS4ERR_CLID_INUSE 869 It appears to be the intention that only a single principal be used 870 for client establishment between any client-server pair. However: 872 o There is no explicit statement to this effect. 874 o The error that indicates a principal conflict has a name which 875 does not clarify this issue: NFS4ERR_CLID_INUSE. 877 o The definition of the error is also not very helpful: "The 878 SETCLIENTID operation has found that a client id is already in use 879 by another client". 881 As a result, servers exist which reject a SETCLIENTID simply because 882 there already exists a clientid for the same client, established 883 using a different IP address. Although this is generally understood 884 to be erroneous, such servers still exist and the spec should make 885 the correct behavior clear. 887 Although the error name cannot be changed, the following changes 888 should be made to avoid confusion: 890 o The definition of the error should be changed to read as follows: 892 The SETCLIENTID operation has found that the specified 893 nfs_client_id4 was previously presented with a different 894 principal and that client instance currently holds an active 895 lease. A server MAY return this error if the same principal is 896 used but a change in authentication flavor gives good reason to 897 reject the new SETCLIENTID operation as not bona fide. 899 o In the description of SETCLIENTID, the phrase "then the server 900 returns a NFS4ERR_CLID_INUSE error" should be expanded to read 901 "then the server returns a NFS4ERR_CLID_INUSE error, since use of 902 a single client with multiple principals is not allowed." 904 6. Issues for NFSv4.1 906 Because NFSv4.1 embraces the uniform client-string approach, as 907 advised by section 2.4 of [RFC5661], addressing migration issues is 908 simpler. 910 Nevertheless, there are some issues that will have to be addressed. 911 Some examples: 913 o The other necessary part of addressing migration issues, providing 914 for the server's merger of leases that relate to the same client, 915 is not currently addressed by NFSv4.1 and changes need to be made 916 to make it clear that state needs to be appropriately merged as 917 part of migration, to avoid multiple clientids between a client- 918 server pair. 920 o There needs to be some clarification of how migration, and 921 particularly transparent state migration, should interact with 922 pNFS layouts. 924 o The current discussion (in [RFC5661]), of the possibility of 925 server_owner changes is incomplete and confusing. 927 Discussion of how to resolve these issues will appear in the sections 928 below. 930 6.1. Addressing state merger in NFSv4.1 932 The existing treatment of state transfer in [RFC5661], has similar 933 problems to that in [RFC7530] in that it assumes that the state for 934 multiple filesystems on different servers will not be merged to so 935 that it appears under a single common clientid. We've already seen 936 the reasons that this is a problem, with regard to NFSv4.0. 938 Although we don't have the problems stemming from the non-uniform 939 client-string approach, there are a number of complexities in the 940 existing treatment of state management in the section entitled "Lock 941 State and File System Transitions" in [RFC5661] that make this non- 942 trivial to address: 944 o Migration is currently treated together with other sorts of 945 filesystem transitions including transitioning between replicas 946 without any NFS4ERR_MOVED errors. 948 o There is separate handling and discussion of the cases of matching 949 and non-matching server scopes. 951 o In the case of matching server scopes, the text calls for an 952 impossible degree of transparency. 954 o In the case of non-matching server scopes, the text does not 955 mention transparent state migration at all, resulting in a 956 functional regression from NFSV4.0 958 6.2. Addressing pNFS relationship with migration 960 This is made difficult because, within the PNFS framework, migration 961 might mean any of several things: 963 o Transfer of the MDS, leaving DS's alone. 965 This would be minimally disruptive to those using layouts but 966 would require the pNFS control protocol to support the DS being 967 directed to a new MDS. 969 o Transfer of a DS, leaving everything else in place. 971 Such a transfer can be handled without using migration at all. 972 The server can recall/revoke layouts, as appropriate. 974 o Transfer of the filesystem to a new filesystem with both MDS and 975 DS's moving. 977 In such a transfer, an entirely different set of DS's will be at 978 the target location. There may even be no pNFS support on the 979 destination filesystem at all. 981 Migration needs to support both the first and last of these models. 983 6.3. Addressing server owner changes in NFSv4.1 985 Section 2.10.5 of [RFC5661] states the following. 987 The client should be prepared for the possibility that 988 eir_server_owner values may be different on subsequent EXCHANGE_ID 989 requests made to the same network address, as a result of various 990 sorts of reconfiguration events. When this happens and the 991 changes result in the invalidation of previously valid forms of 992 trunking, the client should cease to use those forms, either by 993 dropping connections or by adding sessions. For a discussion of 994 lock reclaim as it relates to such reconfiguration events, see 995 Section 8.4.2.1. 997 While this paragraph is literally true in that such reconfiguration 998 events can happen and clients have to deal with them, it is confusing 999 in that it can be read as suggesting that clients have to deal with 1000 them without disruption, which in general is impossible. 1002 A clearer alternative would be: 1004 It is always possible that, as a result of various sorts of 1005 reconfiguration events, eir_server_scope and eir_server_owner 1006 values may be different on subsequent EXCHANGE_ID requests made to 1007 the same network address. 1009 In most cases such reconfiguration events will be disruptive and 1010 indicate that an IP address formerly connected to one server is 1011 now connected to an entirely different one. 1013 Some guidelines on client handling of such situations follow: 1015 * When eir_server_scope changes, the client has no assurance that 1016 any id's it obtained previously (e.g. file handles) can be 1017 validly used on the new server, and, even if the new server 1018 accepts them, there is no assurance that this is not due to 1019 accident. Thus it is best to treat all such state as lost/ 1020 stale although a client may assume that the probability of 1021 inadvertent acceptance is low and treat this situation as 1022 within the next case. 1024 * When eir_server_scope remains the same and 1025 eir_server_owner.so_major_id changes, the client can use 1026 filehandles it has and attempt reclaims. It may find that 1027 these are now stale but if NFS4ERR_STALE is not received, he 1028 can proceed to reclaim his opens. 1030 * When eir_server_scope and eir_server_owner.so_major_id remain 1031 the same, the client has to use the now-current values of 1032 eir_server-owner.so_minor_id in deciding on appropriate forms 1033 of trunking. 1035 7. Security Considerations 1037 With regard to NFSv4.0, the Security Considerations section of 1038 [RFC7530] encourages clients to protect the integrity of the SECINFO 1039 operation, any GETATTR operation for the fs_locations attribute. A 1040 needed change is to include the operations SETCLIENTID/ 1041 SETCLIENTID_CONFIRM as among those for which integrity protection is 1042 recommended. A migration recovery event can use any or all of these 1043 operations. 1045 With regard to NFSv4.1, the Security Considerations section of 1046 [RFC5661] takes proper care of migration-related issues. No change 1047 is needed. 1049 8. IANA Considerations 1051 This document does not require actions by IANA. 1053 9. Acknowledgements 1055 The editor and authors of this document gratefully acknowledge the 1056 contributions of Trond Myklebust of NetApp and Robert Thurlow of 1057 Oracle. We also thank Tom Haynes of NetApp and Spencer Shepler of 1058 Microsoft for their guidance and suggestions. 1060 Special thanks go to members of the Oracle Solaris NFS team, 1061 especially Rick Mesta and James Wahlig, for their work implementing 1062 an NFSv4.0 migration prototype and identifying many of the issues 1063 documented here. 1065 10. References 1067 10.1. Normative References 1069 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1070 Requirement Levels", BCP 14, RFC 2119, 1071 DOI 10.17487/RFC2119, March 1997, 1072 . 1074 [RFC5661] Shepler, S., Ed., Eisler, M., Ed., and D. Noveck, Ed., 1075 "Network File System (NFS) Version 4 Minor Version 1 1076 Protocol", RFC 5661, DOI 10.17487/RFC5661, January 2010, 1077 . 1079 [RFC7530] Haynes, T., Ed. and D. Noveck, Ed., "Network File System 1080 (NFS) Version 4 Protocol", RFC 7530, DOI 10.17487/RFC7530, 1081 March 2015, . 1083 [RFC7931] Noveck, D., Ed., Shivam, P., Lever, C., and B. Baker, 1084 "NFSv4.0 Migration: Specification Update", RFC 7931, 1085 DOI 10.17487/RFC7931, July 2016, 1086 . 1088 10.2. Informative References 1090 [NFSv4-vers] 1091 Noveck, D., "NFSv4 Version Management", July 2016, 1092 . 1095 Work in progress. 1097 Authors' Addresses 1099 David Noveck (editor) 1100 Hewlett Packard Enterprise 1101 165 Dascomb Road 1102 Andover, MA 01810 1103 US 1105 Phone: +1 978 474 2011 1106 Email: davenoveck@gmail.com 1108 Piyush Shivam 1109 Oracle Corporation 1110 5300 Riata Park Ct. 1111 Austin, TX 78727 1112 US 1114 Phone: +1 512 401 1019 1115 Email: piyush.shivam@oracle.com 1117 Charles Lever 1118 Oracle Corporation 1119 1015 Granger Avenue 1120 Ann Arbor, MI 48104 1121 US 1123 Phone: +1 248 614 5091 1124 Email: chuck.lever@oracle.com 1126 Bill Baker 1127 Oracle Corporation 1128 5300 Riata Park Ct. 1129 Austin, TX 78727 1130 US 1132 Phone: +1 512 401 1081 1133 Email: bill.baker@oracle.com