idnits 2.17.1 draft-ietf-nfsv4-versioning-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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC5661, but the abstract doesn't seem to directly say this. It does mention RFC5661 though, so this could be OK. -- The draft header indicates that this document updates RFC7862, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). (Using the creation date from RFC5661, updated by this document, for RFC5378 checks: 2005-10-21) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (May 25, 2017) is 2522 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5661 (Obsoleted by RFC 8881) -- Obsolete informational reference (is this intentional?): RFC 3530 (Obsoleted by RFC 7530) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NFSv4 D. Noveck 3 Internet-Draft NetApp 4 Updates: 5661, 7862 (if approved) May 25, 2017 5 Intended status: Standards Track 6 Expires: November 26, 2017 8 Rules for NFSv4 Extensions and Minor Versions 9 draft-ietf-nfsv4-versioning-10 11 Abstract 13 This document describes the rules relating to the extension of the 14 NFSv4 family of protocols. It covers the creation of minor versions, 15 the addition of optional features to existing minor versions, and the 16 correction of flaws in features already published as Proposed 17 Standards. The rules relating to the construction of minor versions 18 and the interaction of minor version implementations that appear in 19 this document supersede the minor versioning rules in RFC5661 and 20 other RFCs defining minor versions. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on November 26, 2017. 39 Copyright Notice 41 Copyright (c) 2017 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 57 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 2.1. Use of Keywords Defined in RFC2119 . . . . . . . . . . . 4 59 2.2. Use of Feature Statuses . . . . . . . . . . . . . . . . . 4 60 2.3. NFSv4 Versions . . . . . . . . . . . . . . . . . . . . . 5 61 3. Consolidation of Extension Rules . . . . . . . . . . . . . . 6 62 4. XDR Considerations . . . . . . . . . . . . . . . . . . . . . 7 63 4.1. XDR Extension . . . . . . . . . . . . . . . . . . . . . . 8 64 4.2. Rules for XDR Extension within NFSv4 . . . . . . . . . . 8 65 4.3. Handling of Protocol Elements by Responders . . . . . . . 9 66 4.4. Inter-version Interoperability . . . . . . . . . . . . . 11 67 4.4.1. Requirements for Knowledge of Protocol Elements . . . 11 68 4.4.2. Establishing Interoperability . . . . . . . . . . . . 12 69 4.4.3. Determining Knowledge of Protocol Elements . . . . . 14 70 4.5. XDR Overlay . . . . . . . . . . . . . . . . . . . . . . . 15 71 5. Other NFSv4 Protocol Changes . . . . . . . . . . . . . . . . 15 72 5.1. Field Interpretation and Use . . . . . . . . . . . . . . 15 73 5.2. Behavioral Changes . . . . . . . . . . . . . . . . . . . 16 74 6. Extending Existing Minor Versions . . . . . . . . . . . . . . 17 75 7. Minor Versions . . . . . . . . . . . . . . . . . . . . . . . 17 76 7.1. Creation of New Minor Versions . . . . . . . . . . . . . 17 77 8. Minor Version Interaction Rules . . . . . . . . . . . . . . . 18 78 8.1. Minor Version Identifier Transfer Issues . . . . . . . . 18 79 8.2. Minor Version Compatibility . . . . . . . . . . . . . . . 19 80 9. Correction of Existing Minor Versions and Features . . . . . 20 81 9.1. XDR Changes to Implement Protocol Corrections . . . . . . 20 82 9.2. XDR Corrections to OPTIONAL features . . . . . . . . . . 21 83 9.3. XDR Corrections to REQUIRED features . . . . . . . . . . 22 84 9.4. Addressing XDR Corrections in Later Minor Versions . . . 23 85 10. Security Considerations . . . . . . . . . . . . . . . . . . . 24 86 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 87 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 24 88 12.1. Normative References . . . . . . . . . . . . . . . . . . 24 89 12.2. Informative References . . . . . . . . . . . . . . . . . 25 90 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 25 91 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 25 93 1. Introduction 95 To address the requirement for an NFS protocol that can evolve as the 96 need arises, the Network File System (NFS) version 4 (NFSv4) protocol 97 provides a framework to allow for future changes via the creation of 98 new protocol versions including minor versions and certain forms of 99 modification of existing minor versions. The extension rules 100 contained in this document allow extensions and other changes to be 101 implemented in a way that maintains compatibility with existing 102 clients and servers. 104 Previously, all protocol changes had been part of new minor versions. 105 The COMPOUND procedure (see Section 14.2 of [RFC7530]) specifies the 106 minor version being used by the client in making requests. The 107 CB_COMPOUND procedure (see Section 15.2 of [RFC7530]) specifies the 108 minor version being used by the server on callback requests. 110 Creation of a new minor version is no longer the only way in which 111 protocol changes may be made. Optional features may be added as 112 extensions and protocol corrections can be proposed, specified and 113 implemented within the context of a single minor version. Creation 114 of new minor versions remains available when needed. 116 The goal of allowing extensions within the context of a minor version 117 is to provide more implementation flexibility while preserving 118 interoperability on protocol upgrade. As described in Section 4.4, 119 two implementations can each choose a subset of available extensions, 120 with the client able to use the subset of the extensions that it is 121 prepared to use that the server supports as well. Support for this 122 common subset is not affected by the fact that extensions outside 123 this common subset may be supported by the server or potentially used 124 by the client. 126 The rules in this document supersede previous rules regarding minor 127 versions. The new rules concerning protocol extension and minor 128 versions are summarized in Section 3 while rules regarding the 129 interaction of minor versions appear in Section 8. 131 2. Terminology 133 A basic familiarity with NFSv4 terminology is assumed in this 134 document and the reader is pointed to [RFC7530]. 136 In this document, the term "version" is not limited to minor 137 versions. When minor versions are meant, the term "minor version" is 138 used explicitly. For more discussion of this and related terms, see 139 Section 2.3 140 A "feature package" is a set of features that are defined together, 141 either as part of a minor version or as part of the same protocol 142 extension. 144 2.1. Use of Keywords Defined in RFC2119 146 The keywords defined by [RFC2119] have special meanings which this 147 document intends to adhere to. However, due to the nature of this 148 document and some special circumstances, there are some complexities 149 to take note of: 151 o Where this document does not directly specify implementation 152 requirements, use of these capitalized terms is often not 153 appropriate, since the guidance given in this document does not 154 directly affect interoperability. 156 o In this document, what authors of RFCs defining features and minor 157 versions need to do is stated without these specialized terms. 158 Although it is necessary to follow this guidance to provide 159 successful NFSv4 protocol extension, that sort of necessity is not 160 of the sort defined as applicable to the use of the keywords 161 defined in [RFC2119]. 163 The fact that these capitalized terms are not used should not be 164 interpreted as indicating that this guidance does not need to be 165 followed or is somehow not important. 167 o In speaking of the possible statuses of features and feature 168 elements, the terms "OPTIONAL" and "REQUIRED" are used. For 169 further discussion, see Section 2.2. 171 o When one of these upper-case keywords defined in [RFC2119] is used 172 in this document, it is in the context of a rule directed to an 173 implementer of NFSv4 minor versions, the status of a feature or 174 protocol element, or in a quotation, sometimes indirect, from 175 another document. 177 2.2. Use of Feature Statuses 179 There has been some confusion, during the history of NFSv4, about the 180 correct use of these terms, and instances in which the keywords 181 defined in [RFC2119] were used in ways that appear to be at variance 182 with the definitions in that document. 184 o In [RFC3530], the lower-case terms "optional", "recommended", and 185 "required" were used as feature statuses, Later, in [RFC5661] and 186 [RFC7530], the corresponding upper-case keywords were used. It is 187 not clear why this change was made. 189 o In the case of "RECOMMENDED", its use as a feature status is 190 inconsistent with [RFC2119] and it will not be used for this 191 purpose in this document. 193 o The word "RECOMMENDED" to denote the status of attributes in 194 [RFC7530] and [RFC5661] raises similar issues. This has been 195 recognized in [RFC7530] with regard to NFSV4.0, although the 196 situation with regard to NFSv4.1 remains unresolved. 198 In this document, the keywords "OPTIONAL" and "REQUIRED" and the 199 phrase "mandatory to not implement" are used to denote the status of 200 features within a given minor version. In using these terms, RFCs 201 which specify the status of features inform: 203 o client implementations whether they need to deal with the absence 204 of support for these features. 206 o server implementations whether they need to provide support for 207 these features. 209 2.3. NFSv4 Versions 211 The term "version" denotes any valid protocol variant constructed 212 according to the rules in this document. It includes minor versions, 213 but there are situations which allow multiple variant versions to be 214 associated with and co-exist within a single minor version: 216 o When there are feature specification documents published as 217 Proposed Standards extending a given minor version, then the 218 protocol defined by the minor version specification document, when 219 combined with any subset (not necessarily a proper subset) of the 220 feature specification documents, is a valid NFSv4 version variant 221 which is part of the minor version in question. 223 o When there are protocol corrections published which update a given 224 minor version, each set of published updates, up to the date of 225 publication of the update, is a valid NFSv4 version variant which 226 is part of the minor version in question. 228 Because of the above, there can be multiple version variants that are 229 part of a given minor version. Two of these are worthy of special 230 terms: 232 o The term "base minor version" denotes the version variant that 233 corresponds to the minor version as originally defined, including 234 all protocol elements specified in the minor version definition 235 document but not incorporating any extensions or protocol 236 corrections published after that original definition. 238 o At any given time, the term "current minor version" denotes the 239 minor version variant including all extensions of and corrections 240 to the minor version made by standard-track documents published up 241 to that time. 243 Each client and server which implements a specific minor version will 244 implement some particular variant of that minor version. Each 245 variant is a subset of the current minor version and a superset of 246 the base minor version. When the term "minor version" is used 247 without either of these qualifiers, it should refer to something 248 which is true of all variants within that minor version. For 249 example, in the case of a minor version that has not had a protocol 250 correction, one may refer to the set of REQUIRED features for that 251 minor version since it is the same for all variants within the minor 252 version. See Section 9 for a discussion of correcting an existing 253 minor version. 255 3. Consolidation of Extension Rules 257 In the past, the only existing extension rules were the minor 258 versioning rules that were being maintained and specified in the 259 Standards Track RFCs which defined the individual minor versions. In 260 the past, these minor versioning rules were modified on an ad hoc 261 basis for each new minor version. 263 More recently, minor versioning rules were specified in [RFC5661] 264 while modifications to those rules were allowed in subsequent minor 265 versions. 267 This document defines a set of extension rules, including rules for 268 minor version construction. These rules apply to all future changes 269 to the NFSv4 protocol. The rules are subject to change but any such 270 change should be part of a standards track RFC obsoleting or updating 271 this document. 273 Rather than a single list of extension rules, as was done in the 274 minor versioning rules in [RFC5661], this document defines multiple 275 sets of rules that deal with the various forms of protocol change 276 provided for in the NFSv4 extension framework. 278 o The kinds of XDR changes that may be made to extend NFSv4 are 279 addressed in the rules in Section 4.2. 281 o Minor version construction, including rules applicable to changes 282 which cannot be made in extensions to existing minor versions are 283 addressed in Section 7.1 285 o Minor version interaction rules are discussed in Sections 8.1 and 286 8.2. 288 This document supersedes minor versioning rules appearing in the 289 minor version specification RFC's, including those in [RFC5661] and 290 also the modification to those rules mentioned in [RFC7862]. As a 291 result, potential conflicts among documents should be addressed as 292 follows: 294 o The specification of the actual protocols for minor versions 295 previously published as Proposed Standards take precedence over 296 minor versioning rules in either this document or in the minor 297 version specification RFC's. In other words, if the transition 298 from version A to version B violates a minor versioning rule, the 299 version B protocol stays as it is. 301 o Since the minor versioning rules #11 and #13 that appear in 302 Section 2.7 of [RFC5661] deal with the interactions between 303 multiple minor versions, the situation is more complicated. See 304 Section 8 below for a discussion of these issues, including how 305 potential conflicts between rules are to be resolved. 307 o Otherwise, any conflict between the extension rules in this 308 document and those in minor version specification RFC's are to be 309 resolved based on the treatment in this document. In particular, 310 corrections may be made as specified in Section 9 for all 311 previously specified minor versions, and the extensibility of 312 previously specified minor versions is to be handled in accord 313 with Section 6. 315 Future minor version specification documents should avoid specifying 316 rules relating to minor versioning and reference this document in 317 connection with rules for NFSv4 extension. 319 4. XDR Considerations 321 As an extensible XDR-based protocol, NFSv4 has to ensure inter- 322 version compatibility in situations in which the client and server 323 use different XDR descriptions. For example, the client and server 324 may implement different variants of the same minor version, in that 325 they each might add different sets of extensions to the base minor 326 version. 328 The XDR extension paradigm, discussed in Section 4.1, assures that 329 these descriptions are compatible, with clients and servers able to 330 determine and use those portions of the protocol that they both share 331 according to the method described in Section 4.4.2. 333 4.1. XDR Extension 335 When an NFSv4 version change requires a modification to the protocol 336 XDR, this is effected within a framework based on the idea of XDR 337 extension. This is opposed to transitions between major NFS versions 338 (including that between NFSv3 and NFSv4.0) in which the XDR for one 339 version was replaced by a different XDR for a newer version. 341 The XDR extension approach allows an XDR description to be extended 342 in a way which retains the structure of all previously valid 343 messages. If a base XDR description is extended to create a second 344 XDR description, the following will be true for the second 345 description to be a valid extension of the first: 347 o The set of valid messages described by the extended definition is 348 a superset of that described by the first. 350 o Each message within the set of valid messages described by the 351 base definition is recognized as having exactly the same 352 structure/interpretation using the extended definition. 354 o Each message within the set of messages described as valid by the 355 extended definition but not the base definition must be 356 recognized, using the base definition, as part of an extension not 357 provided for. 359 The use of XDR extension can facilitate compatibility between 360 different versions of the NFSv4 protocol. When XDR extension is used 361 to implement OPTIONAL features, the greatest degree of inter-version 362 compatibility is obtained. In this case, as long as the rules in 363 Section 6 are followed, no change in minor version number is needed 364 and the extension may be effected in the context of a single minor 365 version. 367 4.2. Rules for XDR Extension within NFSv4 369 In the context of NFSv4, given the central role of COMPOUND and 370 CB_COMPOUND, addition of new RPC procedures is not allowed and the 371 enumeration of operations and callback operations have a special 372 role. 374 The following XDR extensions, by their nature, affect both messages 375 sent by requesters (i.e. requests, callbacks), and responders (i.e. 376 replies, callback replies). 378 o Addition of previously unspecified operation codes, within the 379 framework established by COMPOUND and CB_COMPOUND. These extend 380 the appropriate enumeration and the corresponding switches devoted 381 to requests and responses for the associated direction of 382 operation. 384 o Addition of previously unspecified attributes. These add 385 additional numeric constants that define each attribute's bit 386 position within the attribute bit map, together with XDR typedefs 387 that specify the attributes' format within the nominally opaque 388 arrays specifying sets of attributes. 390 Other sorts of changes will generally affect one of requests, 391 replies, callback, or callback replies. Although all are valid XDR 392 extensions, the messages that are affected may determine whether the 393 extension requires a new minor version (see Section 7) or can be made 394 as an extension within an existing minor version (see Section 6). 396 o Addition of new, previously unused, values to existing enums. 398 o Addition of previously unassigned bit values to a flag word. 400 o Addition of new cases to existing switches, provided that the 401 existing switch did not contain a default case. 403 None of the following is allowed to happen: 405 o Any change to the structure of existing requests or replies other 406 than those listed above. 408 o Addition of previously unspecified RPC procedures, for either the 409 nfsv4 program or the callback program. 411 o Deletion of existing RPC procedures, operation codes, enum values, 412 flag bit values and switch cases. Note that changes may be made 413 to define use of any of these as causing an error, as long as the 414 XDR is unaffected. Similarly, none of these items may be reused 415 for a new purpose. 417 4.3. Handling of Protocol Elements by Responders 419 Implementations handle protocol elements received in requests and 420 callbacks in one of three ways. Which of the following ways are 421 valid depends on the status of the protocol element in the variant 422 being implemented: 424 o The protocol element is not a part of definition of the variant in 425 question and so is "unknown". The responder, when it does not 426 report an RPC XDR decode error, reports an error indicative of the 427 element not being defined in the XDR such as NFS4ERR_OP_ILLEGAL, 428 NFS4ERR_BADXDR, or NFS4ERR_INVAL. See Section 4.4.3 for details. 430 o The protocol element is a known part of the variant but is not 431 supported by the particular implementation. The responder reports 432 an error indicative of the element being recognized as one which 433 is not supported such as NFS4ERR_NOTSUPP, NFS4ERR_UNION_NOTSUPP, 434 or NFS4ERR_ATTRNOTSUPP. 436 o The protocol element is a known part of the variant which is 437 supported by the particular implementation. The responder reports 438 success or an error other than the special ones discussed above. 440 Which of these are validly returned by the responder depends on the 441 status of the protocol element in the minor version specified in the 442 COMPOUND or CB_COMPOUND. The possibilities which can exist when 443 dealing with minor versions that have not been subject to corrections 444 are listed below. See Sections 9.1 and 9.3 for a discussion of the 445 effects of protocol correction. 447 o The protocol element is not known in the minor version. In this 448 case all implementations of the minor version MUST indicate that 449 the protocol element is not known. 451 o The protocol element is part of a feature specified mandatory to 452 not implement in the minor version. In this case as well, all 453 implementations of the minor version MUST indicate that the 454 protocol element is not known. 456 o The protocol element is defined as part of the current variant of 457 the minor version but is not part of the corresponding base 458 variant. In this case, the requester can encounter situations in 459 which the protocol element is either not known to the responder, 460 is known to but not supported by the responder, or is both known 461 to and supported by the responder. 463 o The protocol element is defined as an OPTIONAL part of the base 464 minor version. In this case, the requester can expect the 465 protocol element to be known but must deal with cases in which it 466 is supported or is not supported. 468 o The protocol element is defined as a REQUIRED part of the base 469 minor version. In this case, the requester can expect the 470 protocol element to be both known and supported by the responder. 472 The listing of possibilities above does not mean that a requester 473 always needs to be prepared for all such possibilities. Often, 474 depending on the scope of the feature of which the protocol element 475 is a part, handling of a previous request using the same or related 476 protocol elements will allow the requester to be sure that certain of 477 these possibilities cannot occur. 479 Requesters, typically clients, may test for knowledge of or support 480 for protocol elements as part of connection establishment. This may 481 allow the requester to be aware of a responder's lack of knowledge of 482 or support for problematic requests before they are actually used to 483 effect user requests. 485 4.4. Inter-version Interoperability 487 Because of NFSv4's use of XDR extension, any communicating client and 488 server versions have XDR definitions such that each is a valid 489 extension of a third version. Once that version is determined, it 490 may be used by both client and server to communicate. Each party can 491 successfully use a subset of protocol elements that are both known to 492 and supported by both parties. 494 4.4.1. Requirements for Knowledge of Protocol Elements 496 With regard to requirements for knowledge of protocol elements, the 497 following rules apply. These rules are the result of the use of the 498 XDR extension paradigm combined with the way in which extensions are 499 incorporated in existing minor versions (for details of which see 500 Section 6). 502 o Any protocol element defined as part of the base variant of 503 particular minor version is required to be known by that minor 504 version. This occurs whether the specification happens in the 505 body of the minor definition document or is in a feature 506 definition document that is made part of the minor version by 507 being normatively referenced by the minor version definition 508 document. 510 o Any protocol element required to be known in a given minor version 511 is required to be known in subsequent minor versions, unless and 512 until a minor version has made that protocol element as mandatory 513 to not implement. 515 o When a protocol element is defined as part of an extension to an 516 extensible minor version, it is not required to be known in that 517 minor version but is required to be known by the next minor 518 version. In the earlier minor version, it might not be defined in 519 the XDR definition document, while in the later version it needs 520 to be defined in the XDR definition document. In either case, if 521 it is defined, it might or might not be supported. 523 o When knowledge of protocol elements is optional in a given minor 524 version, the responder's knowledge of such optional elements must 525 obey the rule that if one such element is known, then all the 526 protocol elements defined in the same minor version definition 527 document must be known as well. 529 For many minor versions, all existing protocol elements are required 530 to be known by both the client and the server, and so requesters do 531 not have to test for the presence or absence of knowledge regarding 532 protocol elements. This is the case if there has been no extension 533 for the minor version in question. Extensions can be added to 534 extensible minor versions as described in Section 6 and can be used 535 to correct protocol flaws as described in Section 9. 537 Requesters can ascertain the knowledge of the responder in two ways: 539 o By issuing a request using the protocol element and looking at the 540 response. Note that, even if the protocol element used is not 541 supported by the responder, the requester can still determine if 542 the element is known by the responder. 544 o By receiving a request from the responder, acting in the role of 545 requester. For example, a client may issue a request enabling the 546 server to infer that it is aware of a corresponding callback. 548 In making this determination, the requester can rely on two basic 549 facts: 551 o If the responder is aware of a single protocol element within a 552 feature package, it must be aware of all protocol elements within 553 that feature package 555 o If a protocol element is one defined by the minor version 556 specified by a request (and not in an extension), or in a previous 557 minor version, the responder must be aware of it. 559 4.4.2. Establishing Interoperability 561 When a client and a server interact, they need to able to take 562 advantage of the compatibility provided by NFSv4's use of XDR 563 extension. 565 In this context, the client and server would arrive at a common 566 variant which the client would uses to send requests which the server 567 would then accept. The server would use that variant to send 568 callbacks which the client would then accept. This state of affairs 569 could arise in a number of ways: 571 o Client and server have been built using XDR variants that belong 572 to the same minor version 574 o The client's minor version is lower than that of the server. In 575 this case the server, in accord with Section 8.2, accepts the 576 client's minor version, and acts as if it has no knowledge of 577 extensions made in subsequent minor versions. It has knowledge of 578 protocol elements within the current (i.e. effectively final) 579 variant of the lower minor version. 581 o The client's minor version is higher than that of the server. In 582 this case the client, in accord with Section 8.2, uses a lower 583 minor version that the server will accept. In this case, the 584 server has no knowledge of extensions made in subsequent minor 585 versions. 587 There are a number of cases to consider based on the characteristics 588 of the minor version chosen. 590 o When minor version consists of only a single variant (no extension 591 or XDR corrections), the client and the server are using the same 592 XDR description and have knowledge of the same protocol elements. 594 o When the minor version consists of multiple variants (i.e. there 595 are one or more XDR extensions or XDR corrections), the client and 596 the server are using compatible XDR descriptions. The client is 597 aware of some set of extensions while the server may be aware of a 598 different set. The client can use the approach described in 599 Section 4.4.3 to determine which of the extensions it knows about 600 are also known by the server. Once this is done, the client and 601 server will both be using a common variant. The variants that the 602 client and the server were built with will both either be 603 identical to this variant or a valid extension of it. Similarly, 604 the variants that the client and the server actually use will be a 605 subset of this variant, in that certain OPTIONAL features will not 606 be used. 608 In either case, the client must determine which of the OPTIONAL 609 protocol elements within the common version are supported by the 610 server, just as it does for OPTIONAL features introduced as part of a 611 minor version. 613 It is best if client implementations make the determination as to the 614 support provided by the server before acting on user requests. This 615 includes the determination of the common protocol variant and the 616 level of support for OPTIONAL protocol elements. 618 4.4.3. Determining Knowledge of Protocol Elements 620 A requester may test the responder's knowledge of particular protocol 621 elements as defined below, based on the type of protocol element. 622 Note that in the case of attribute or flag bits, use of a request 623 that refers to 2 or more bits of undetermined status (known versus 624 unknown) may return results which are not particularly helpful. In 625 such cases, when the response is NFS4ERR_INVAL, the requester can 626 only conclude that at least one of the bits is unknown. 628 o When a GETATTR request is made specifying an attribute bit to be 629 tested and that attribute is not a set-only attribute, if the 630 GETATTR returns with the error NFS4ERR_INVAL, then it can be 631 concluded that the responder has no knowledge of the attribute in 632 question. Other responses, including NFS4ERR_ATTRNOTSUPP, 633 indicate that the responder is aware of the attribute in question. 635 o When a SETATTR request is made specifying the attribute bit to be 636 tested and that attribute is not a get-only attribute, if the 637 SETATTR returns with the error NFS4ERR_INVAL, then it can be 638 concluded that the responder has no knowledge of the attribute in 639 question. Other responses, including NFS4ERR_ATTRNOTSUPP, 640 indicate that the responder is aware of the attribute in question. 642 o When a request is made including an operation with a new flag bit, 643 if the operation returns with the error NFS4ERR_INVAL,then it can 644 generally be concluded that the responder has no knowledge of the 645 flag bit in question, as long as the requester is careful to avoid 646 other error situations in which the operation in question is 647 defined as returning NFS4ERR_INVAL. Other responses indicate that 648 the responder is aware of the flag bit in question. 650 o When a request is made including the operation to be tested, if 651 the responder returns an RPC XDR decode error, or a response 652 indicating that the operation in question resulted in 653 NFS4ERR_OP_ILLEGAL or NFS4ERR_BADXDR, then it can be concluded 654 that the responder has no knowledge of the operation in question. 655 Other responses, including NFS4ERR_NOTSUPP, indicate that the 656 responder is aware of the operation in question. 658 o When a request is made including the switch arm to be tested, if 659 the responder returns an RPC XDR decode error, or a response 660 indicating that the operation in question resulted in 661 NFS4ERR_BADXDR, then it can be concluded that the responder has no 662 knowledge of the operation in question. Other responses, 663 including NFS4ERR_UNION_NOTSUPP, indicate that the responder is 664 aware of the protocol element in question. 666 A determination of the knowledge or lack of knowledge of a particular 667 protocol element is expected to remain valid as long as the clientid 668 associated with the request remains valid. 670 The above assumes, as should be the case, that the server will accept 671 the minor version used by the client. For more detail regarding this 672 issue, see Section 8.2. 674 4.5. XDR Overlay 676 XDR additions may also be made by defining XDR structures that 677 overlay nominally opaque fields that are defined to allow such 678 incremental extensions. 680 For example, each pNFS mapping type provides its own XDR definition 681 for various pNFS-related fields defined in [RFC5661] as opaque 682 arrays. 684 Because such additions provide new interpretations of existing 685 fields, they may be made outside of the extension framework as long 686 as they obey the rules previously established when the nominally 687 opaque protocol elements were added to the protocol. 689 5. Other NFSv4 Protocol Changes 691 There are a number of types of protocol changes that are outside the 692 XDR extension framework discussed in Section 4. These changes are 693 also managed within the NFSv4 versioning framework and may be of a 694 number of types, which are discussed in the sections below. 696 Despite the previous emphasis on XDR changes, additions and changes 697 to the NFSv4 protocols have not been limited to those that involve 698 changes (in the form of extensions) to the protocol XDR. Examples of 699 other sorts of changes have been taken from NFSv4.1. 701 All such changes that have been made in the past have been made as 702 part of new minor version. Future change of these sorts may not be 703 done in an extension but can only be made in a new minor version. 705 5.1. Field Interpretation and Use 707 The XDR description of a protocol does not constitute a complete 708 description of the protocol. Therefore, versioning needs to consider 709 the role of changes in the use of fields, even when there is no 710 change to the underlying XDR. 712 Although any XDR element is potentially subject to a change in its 713 interpretation and use, the likelihood of such change will vary with 714 the XDR-specified type of the element, as discussed below: 716 o When XDR elements are defined as strings, rules regarding the 717 appropriate string values are specified in protocol specification 718 text with changes in such rules documented in minor version 719 definition documents. Some types of strings within NFS4 are used 720 in server names (in location-related attributes), user and group 721 names, and in the names of file objects within directories. Rules 722 regarding what strings are acceptable appear in [RFC7530] and 723 [RFC5661] with the role of the XDR limited to hints regarding 724 UTF-8 and capitalization issues via XDR typedefs. 726 o Fields that are XDR-defined as opaque elements and which are truly 727 opaque, do not raise versioning issues, except as regards inter- 728 version use, which is effectively foreclosed by the rules in 729 Section 8.1. 731 Note that sometimes a field will seem to be opaque but not 732 actually be fully opaque when considered carefully. For example, 733 the "other" field of stateids is defined as an opaque array, while 734 the specification text specially defines appropriate treatment 735 when the "other" field within it is either all zeros or all ones. 736 Given this context, creation or deletion of reserved values for 737 "special" stateids will be a protocol change which versioning 738 rules need to deal with. 740 o Some nominally opaque elements have external XDR definitions that 741 overlay the nominally opaque arrays. Such cases are discussed in 742 Section 4.5. 744 5.2. Behavioral Changes 746 Changes in the behavior of NFSv4 operations are possible, even if 747 there is no change in the underlying XDR or change to field 748 interpretation and use. 750 One class of behavioral change involves changes in the set of errors 751 to be returned in the event of various errors. When the set of valid 752 requests remain the same, and the behavior for each of them remains 753 the same, such changes can be implemented with only limited 754 disruption to existing clients. 756 Many more substantial behavioral changes have occurred in connection 757 with the addition of the session concept in NFSv4.1. Even though 758 there was no change to the XDR for existing operations, many existing 759 operations and COMPOUNDs consisting only of them became invalid. 761 Also, changes were made regarding the required server behavior as to 762 the interaction of the MODE and ACL attributes. 764 6. Extending Existing Minor Versions 766 Extensions to the most recently published NFSv4 minor version may be 767 made by publishing the extension as a Proposed Standard, unless the 768 minor version in question has been defined as non-extensible. A 769 document need not use the "Updates" header specifying the RFC 770 defining the minor version, which remains a valid description of the 771 base variant of the minor version in question. 773 In addition to following the rules for XDR extensions in Section 4.2, 774 such extensions must also obey the rules listed below in order to 775 allow interoperability to be established, as described in 776 Section 4.4: 778 o Additions to the set of callback requests and extensions to the 779 XDR for existing callback operations can only be made if the 780 server can determine, based on the client's actions, that that 781 client is aware of the changes. This determination, for any 782 particular client (as defined by its clientid), is made before 783 sending those new or extended callbacks. 785 o XDR extensions that affect the structures of responses to existing 786 operations can only be made if the server can determine, based on 787 the client's actions, that it is aware of the existence of XDR 788 changes, before sending responses containing those extensions. 789 This determination can be based on the request being responded to, 790 but that is not required. Use of any protocol element defined in 791 the extension can be the basis of the determination, provided that 792 the requirements for determining client awareness are clearly 793 stated. 795 Corrections to protocol errors (see Section 9) may be accomplished by 796 publishing an extension, including a compatible XDR change which 797 follows the rules above. Such documents will update the defining 798 documents for the minor version to be corrected. 800 7. Minor Versions 802 7.1. Creation of New Minor Versions 804 It is important to note that this section, in describing situations 805 that would require new minor versions to be created, does not thereby 806 imply that situations will exist in the future. Judgments regarding 807 desirability of future changes will be made by the working group or 808 its successors and any guidance that can be offered at this point is 809 necessarily quite limited. 811 Creation of a new minor version is an option that the working group 812 retains. The listing of situations below that would prompt such 813 actions is not meant to be exhaustive. 815 The following sorts of features are not allowed as extensions and 816 would require creation of a new minor version: 818 o Features that incorporate any of the non-XDR-based changes 819 discussed in Sections 5.1 and 5.2. 821 o Features whose XDR changes do not follow the rules in Section 6. 823 o Addition of REQUIRED new features. 825 o Changes to the status of existing features including converting 826 features to be mandatory to not implement. 828 8. Minor Version Interaction Rules 830 This section addresses issues related to rules #11 and #13 in the 831 minor versioning rules in [RFC5661]. With regard to the supersession 832 of minor versioning rules, the treatment here overrides that in 833 [RFC5661] when either of the potentially interacting minor versions 834 has not yet been published as a Proposed Standard. 836 Note that these rules are the only ones directed to minor version 837 implementers, rather than to those specifying new minor versions. 839 8.1. Minor Version Identifier Transfer Issues 841 Each relationship between a client instance and a server instance, as 842 represented by a clientid, is to be devoted to a single minor 843 version. If a server detects that a COMPOUND with an inappropriate 844 minor version is being used, it MUST reject the request. In doing 845 so, it may return either NFS4ERR_BAD_CLIENTID or 846 NFS4RR_MINOR_VERS_MISMATCH. 848 As a result of the above, the client has the assurance that the set 849 of REQUIRED and OPTIONAL features will not change within the context 850 of a single clientid. Server implementations MUST ensure that the 851 set of supported features and protocol elements does not change 852 within such a context. 854 8.2. Minor Version Compatibility 856 The goal of the NFSv4 extension model is to enable compatibility 857 including compatibility between clients and servers implementing 858 different minor versions. 860 Within a set of minor versions that define the same set of features 861 as REQUIRED and mandatory to not implement, it is relatively easy for 862 clients and servers to provide the needed compatibility by adhering 863 to the following practices. 865 o Servers supporting a given minor version should support earlier 866 minor versions within that set and return appropriate errors for 867 use of protocol elements that were not a valid part of that 868 earlier minor version. For details see below. 870 o Clients should deal with an NFS4ERR_MINOR_VERS_MISMATCH error by 871 searching for a lower minor version number that the server will 872 accept. 874 Servers supporting a given minor version MUST, in returning errors 875 for operations which were a valid part of the minor version, return 876 the errors allowed for the current operation in the minor version 877 actually being used. 879 With regard to protocol elements not known in a given minor version, 880 the appropriate error codes are given below. Essentially, the 881 server, although it has a more extensive XDR reflective of a newer 882 minor version, must act as a server with a more limited XDR would. 884 o When an operation is used which is not known in the specified 885 minor version, NFS4ERR_OP_ILLEGAL (as opposed to NFS4ERR_NOTSUPP) 886 should be returned. 888 o When an attribute is used which is not known in the specified 889 minor version, NFS4ERR_INVAL (as opposed to NFS4ERR_ATTRNOTSUPP) 890 should be returned. 892 o When a switch case is used which is not known in the specified 893 minor version, NFS4ERR_BADXDR (as opposed to 894 NFS4ERR_UNION_NOTSUPP) should be returned. Even though the 895 message may be XDR-decodable by the server's current XDR, it is 896 not so according to the minor version being used. 898 o When a flag bit is used which is not known in the specified minor 899 version, NFS4ERR_INVAL (as opposed to NFS4ERR_NOTSUPP or any other 900 error defined as indicating non-support of a flag bit) should be 901 returned. 903 9. Correction of Existing Minor Versions and Features 905 The possibility always exists that there will be a need to correct an 906 existing feature in some way, after the acceptance of that feature, 907 or a minor version containing it, as a Proposed Standard. While the 908 working group can reduce the probability of such situations arising 909 by waiting for running code before considering a feature as done, it 910 cannot reduce the probability to zero. As features are used more 911 extensively and interact with other features, previously unseen flaws 912 may be discovered and will need to be corrected. 914 Such corrections are best done in a document obsoleting or updating 915 the RFC defining the relevant feature or minor version. In making 916 such corrections, the working group will have to carefully consider 917 how to assure interoperability with older clients and servers. 919 Often, corrections can be done without changing the protocol XDR. In 920 many cases, a change in client and server behavior can be implemented 921 without taking special provision with regard to interoperability with 922 earlier implementations. In those cases, and in cases in which a 923 revision merely clarifies an earlier protocol definition document, a 924 new document can be published which simply updates the earlier 925 protocol definition document. 927 In other cases, it is best if client or server behavior needs to 928 change in a way which raises interoperability concerns. In such 929 cases, incompatible changes in server or client behavior should not 930 be mandated in order to avoid XDR changes. 932 9.1. XDR Changes to Implement Protocol Corrections 934 When XDR changes are necessary as part of correcting a flaw, these 935 should be done in a manner similar to that used when implementing new 936 minor versions or features within them. In particular, 938 o Existing XDR structures may not be modified or deleted. 940 o XDR extensions may be used to correct existing protocol facilities 941 in a manner similar to those used to add additional optional 942 features. Such corrections may be done in a minor version for 943 which optional features may no longer be added, if the working 944 group decides that it is an appropriate way to compatibly effect a 945 correction. 947 o When a correction is made to an OPTIONAL feature, the result is 948 similar to a situation in which there are two independent OPTIONAL 949 features. A server may choose to implement either or both. See 950 Section 9.2 for a detailed discussion of interoperability issues. 952 o When a correction is made to a REQUIRED feature, the situation 953 becomes one in which the old version of the feature remains 954 REQUIRED while the corrected version, while OPTIONAL, in intended 955 to be adopted to provide correct operation. Although use of the 956 corrected version is ultimately better, and may be recommended, it 957 should not be described as "RECOMMENDED", since the choice of 958 versions to support will depend on the needs of clients, which may 959 be slow to adopt the updated version. The nature of such 960 corrections is such that it may result in situations in which 961 different variants of the same minor version may not both support 962 the corrected version. See Section 9.3 for details. 964 o In all of the cases above, it is appropriate that the old version 965 of the feature be considered obsolescent, with the expectation 966 that the working group might, in a later minor version, change the 967 status of the uncorrected version. See Section 9.4 for more 968 detail. 970 9.2. XDR Corrections to OPTIONAL features 972 By defining the corrected and uncorrected version as independent 973 OPTIONAL features, the protocol with the XDR modification can 974 accommodate clients and servers that support either the corrected or 975 the uncorrected version of the protocol and also clients and servers 976 aware of and capable of supporting both alternatives. 978 Based on the type of client: 980 o A client that uses only the earlier version of the feature (i.e., 981 an older unfixed client) can determine whether the server it is 982 connecting to supports the older version of feature. It is 983 capable of interoperating with older servers that support only the 984 unfixed protocol as well as ones that support both versions. 986 o A client that supports only the corrected version of the feature 987 (i.e., a new or updated client) can determine whether the server 988 it is connecting to supports the newer version of the feature. It 989 is capable of interoperating with newer servers that support only 990 the updated feature as well as ones that support both versions. 992 o A client that supports both the older and newer version of the 993 feature can determine which version of the particular feature is 994 supported by the server it is working with. 996 Based on the type of server: 998 o A server that supports only the earlier version of the feature 999 (i.e., an older unfixed server) can only successfully interoperate 1000 with clients implementing the older version. However, clients 1001 that do not implement the older version of the feature can easily 1002 determine that the feature cannot be used on that server. 1004 o A server that supports only the newer version of the feature 1005 (i.e., a new or updated server) can only successfully interoperate 1006 with newer clients. However, older clients can easily determine 1007 that the feature cannot be used on that server. In the case of 1008 OPTIONAL features, clients can be expected to deal with non- 1009 support of that particular feature. 1011 o A server that supports both the older and newer versions of the 1012 feature can interoperate with all client variants. 1014 By using extensions in this manner, the protocol creates a clear path 1015 which preserves the functioning of existing clients and servers and 1016 allows client and server implementers to adopt the new version of the 1017 feature at a reasonable pace. 1019 9.3. XDR Corrections to REQUIRED features 1021 Interoperability issues in this case are similar to those for the 1022 OPTIONAL case described above (in Section 9.2). However, because the 1023 use of the uncorrected version is REQUIRED, servers have to support 1024 this until there is a minor version change. Nevertheless, there is 1025 the opportunity for clients and servers to implement the corrected 1026 version, while maintaining necessary interoperability with earlier 1027 implementations. 1029 The following types of servers can exist: 1031 o Servers only aware of and supporting the uncorrected version, such 1032 as servers developed before the issue requiring correction was 1033 known. 1035 o Servers aware of both versions while only supporting the 1036 uncorrected version. 1038 o Servers aware of and supporting both versions. 1040 With the exception of clients which do not use the feature in 1041 question, the following sorts of clients may exist: 1043 o Clients only aware of and prepared to use the uncorrected version, 1044 such as those developed before the issue requiring correction was 1045 known. 1047 Clients developed before the correction was defined would be of 1048 this type. They would be capable of interoperating with all of 1049 the types of servers listed above, but could not use the corrected 1050 version. 1052 o Clients aware of both versions while only prepared to use the 1053 uncorrected version. 1055 Some clients developed or modified after the correction was 1056 defined would be of this type, until they were modified to support 1057 the corrected version. They would also be capable of 1058 interoperating with all of the types of servers listed above, but 1059 could not use the corrected version. 1061 o Clients aware of and prepared to use either version. 1063 Such clients would be capable of interoperating with all of the 1064 types of servers listed above, and could use the corrected version 1065 with servers that supported it. 1067 o Clients aware of both versions while only prepared to use the 1068 newer, corrected, version. 1070 Such clients would only be capable of interoperating with servers 1071 that supported the correct version. With other types of server, 1072 they could determine the absence of appropriate support at an 1073 early stage and treat the minor version in question as unsupported 1074 by the server. Such clients are only likely to be deployed when 1075 the majority of servers support the corrected version. 1077 9.4. Addressing XDR Corrections in Later Minor Versions 1079 As described in Sections 9.2 and 9.3, a corrected XDR can be 1080 incorporated in an existing minor version and be used, while an 1081 existing uncorrected version is still supported. Nevertheless, the 1082 uncorrected version will remain part of the protocol until its status 1083 is changed in a later minor version. 1085 One possible change that could be made in a later minor version is to 1086 define the uncorrected version as mandatory to not implement. 1087 Because of the difficulty of determining that no clients depend on 1088 support for the uncorrected version, it is unlikely that this step 1089 would be appropriate for a considerable time. 1091 In the case of a correction to a REQUIRED feature, there are a number 1092 of less disruptive changes that could be made earlier: 1094 o Changing the uncorrected version from REQUIRED to OPTIONAL while 1095 REQUIRING that servers support at least one of the two versions. 1097 This would allow new server implementations to avoid support for 1098 the uncorrected version. 1100 o Changing the corrected version from OPTIONAL to REQUIRED, making 1101 both versions REQUIRED. 1103 This would allow new clients to depend on support for the 1104 corrected version being present. 1106 o Changing the uncorrected version from REQUIRED to OPTIONAL while 1107 changing the corrected version from OPTIONAL to REQUIRED. 1109 This would complete the shift to the corrected version once 1110 clients are prepared to use the corrected version. 1112 In making such changes, interoperability issues would need to be 1113 carefully considered. 1115 10. Security Considerations 1117 Since no substantive protocol changes are proposed here, no security 1118 considerations apply. 1120 11. IANA Considerations 1122 The current document does not require any actions by IANA. 1124 12. References 1126 12.1. Normative References 1128 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1129 Requirement Levels", BCP 14, RFC 2119, 1130 DOI 10.17487/RFC2119, March 1997, 1131 . 1133 [RFC5661] Shepler, S., Ed., Eisler, M., Ed., and D. Noveck, Ed., 1134 "Network File System (NFS) Version 4 Minor Version 1 1135 Protocol", RFC 5661, DOI 10.17487/RFC5661, January 2010, 1136 . 1138 [RFC7530] Haynes, T., Ed. and D. Noveck, Ed., "Network File System 1139 (NFS) Version 4 Protocol", RFC 7530, DOI 10.17487/RFC7530, 1140 March 2015, . 1142 [RFC7862] Haynes, T., "Network File System (NFS) Version 4 Minor 1143 Version 2 Protocol", RFC 7862, DOI 10.17487/RFC7862, 1144 November 2016, . 1146 12.2. Informative References 1148 [RFC3530] Shepler, S., Callaghan, B., Robinson, D., Thurlow, R., 1149 Beame, C., Eisler, M., and D. Noveck, "Network File System 1150 (NFS) version 4 Protocol", RFC 3530, DOI 10.17487/RFC3530, 1151 April 2003, . 1153 Appendix A. Acknowledgements 1155 The author wishes to thank Tom Haynes of Primary Data for his role in 1156 getting the effort to revise NFSV4 version management started and for 1157 his work in co-authoring the first version of this document. 1159 The author also wishes to thank Chuck Lever and Mike Kupfer of Oracle 1160 and Bruce Fields of Red Hat for their helpful reviews of this and 1161 other versioning-related documents. 1163 Author's Address 1165 David Noveck 1166 NetApp 1167 1601 Trapelo Road 1168 Waltham, MA 02451 1169 US 1171 Phone: +1 781 572 8038 1172 Email: davenoveck@gmail.com