idnits 2.17.1 draft-clemm-netconf-nmda-diff-03.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 (March 19, 2018) is 2229 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Clemm 3 Internet-Draft Y. Qu 4 Intended status: Standards Track Futurewei Technologies, Inc. 5 Expires: September 20, 2018 J. Tantsura 6 Nuage Networks 7 March 19, 2018 9 Comparison of NMDA datastores 10 draft-clemm-netconf-nmda-diff-03 12 Abstract 14 This document defines an RPC operation to compare management 15 datastores that comply with the NMDA architecture. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on September 20, 2018. 34 Copyright Notice 36 Copyright (c) 2018 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (https://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 2. Key Words . . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 3. Definitions and Acronyms . . . . . . . . . . . . . . . . . . 3 54 4. Data Model Overview . . . . . . . . . . . . . . . . . . . . . 3 55 5. YANG Data Model . . . . . . . . . . . . . . . . . . . . . . . 5 56 6. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 57 7. Possible Future Extensions . . . . . . . . . . . . . . . . . 8 58 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 59 8.1. Updates to the IETF XML Registry . . . . . . . . . . . . 9 60 8.2. Updates to the YANG Module Names Registry . . . . . . . . 9 61 9. Security Considerations . . . . . . . . . . . . . . . . . . . 10 62 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 10 63 11. Normative References . . . . . . . . . . . . . . . . . . . . 10 64 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 66 1. Introduction 68 The revised Network Management Datastore Architecture (NMDA) 69 [RFC8342] introduces a set of new datastores that each hold YANG- 70 defined data [RFC7950] and represent a different "viewpoint" on the 71 data that is maintained by a server. New YANG datastores that are 72 introduced include , which contains validated configuration 73 data that a client application intends to be in effect, and 74 , which contains at least conceptually operational state 75 data (such as statistics) as well as configuration data that is 76 actually in effect. 78 NMDA introduces in effect a concept of "lifecycle" for management 79 data, allowing to clearly distinguish between data that is part of a 80 configuration that was supplied by a user, configuration data that 81 has actually been successfully applied and that is part of the 82 operational state, and overall operational state that includes both 83 applied configuration data as well as status and statistics. 85 As a result, data from the same management model can be reflected in 86 multiple datastores. Clients need to specify the target datastore to 87 be specific about which viewpoint of the data they want to access. 88 This way, an application can differentiate whether they are (for 89 example) interested in the configuration that has been applied and is 90 actually in effect, or in the configuration that was supplied by a 91 client and that is supposed to be in effect. 93 Due to the fact that data can propagate from one datastore to 94 another, it is possibly for differences between datastores to occur. 95 Some of this is entirely expected, as there may be a time lag between 96 when a configuration is given to the device and reflected in 97 , until when it actually takes effect and is reflected in 98 . However, there may be cases when a configuration item 99 that was to be applied may not actually take effect at all or needs 100 an unusually long time to do so. This can be the case due to certain 101 conditions not being met, resource dependencies not being resolved, 102 or even implementation errors in corner conditions. 104 When configuration that is in effect is different from configuration 105 that was applied, many issues can result. It becomes more difficult 106 to operate the network properly due to limited visibility of actual 107 status which makes it more difficult to analyze and understand what 108 is going on in the network. Services may be negatively affected (for 109 example, breaking a service instance resulting in service is not 110 properly delivered to a customer) and network resources be 111 misallocated. 113 Applications can potentially analyze any differences between two 114 datastores by retrieving the contents from both datastores and 115 comparing them. However, in many cases this will be at the same time 116 costly and extremely wasteful. 118 This document introduces a YANG data model which defines RPCs, 119 intended to be used in conjunction with NETCONF [RFC6241] or RESTCONF 120 [RFC8040], that allow a client to request a server to compare two 121 NMDA datastores and report any differences. 123 2. Key Words 125 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 126 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 127 "OPTIONAL" in this document are to be interpreted as described in BCP 128 14 [RFC2119] [RFC8174] when, and only when, they appear in all 129 capitals, as shown here. 131 3. Definitions and Acronyms 133 NMDA: Network Management Datastore Architecture 135 RPC: Remote Procedure Call 137 4. Data Model Overview 139 At the core of the solution is a new management operation, , 140 that allows to compare two datastores for the same data. The 141 operation checks whether there are any differences in values or in 142 objects that are contained in either datastore, and returns any 143 differences as output. The output is returned in the format 144 specified in YANG-Patch [RFC8072]. 146 The YANG data model defines the operation as a new RPC. 147 The operation takes the following input parameters: 149 o source: The source identifies the datastore that will serve as 150 reference for the comparison, for example . 152 o target: The target identifies the datastore to compare against the 153 source. 155 o filter-spec: This is a choice between different filter constructs 156 to identify the portions of the datastore to be retrieved. It 157 acts as a node selector that specifies which data nodes are within 158 the scope of the comparison and which nodes are outside the scope. 159 This allows a comparison operation to be applied only to a 160 specific portion of the datastore that is of interest, such as a 161 particular subtree. (The filter dow not contain expressions that 162 would match values data nodes, as this is not required by most use 163 cases and would complicate the scheme, from implementation to 164 dealing with race conditions.) 166 The operation provides the following output parameter: 168 o differences: This parameter contains the list of differences, 169 encoded per RFC8072, i.e. specifying which patches would need to 170 be applied to the source to produce the target. 172 As part of the differences, it will be useful to include "origin" 173 metadata where applicable, specifically when the target datastore is 174 . This can help explain the cause of a difference, for 175 example when a data item is part of but the origin in 176 is reported as "system". How to best report "origin" 177 metadata is an item for further study, specifically whether it should 178 be automatically returned per default or whether its reporting should 179 be controlled using another RPC parameter. 181 The data model is defined in the ietf-nmda-compare YANG module. Its 182 structure is shown in the following figure. The notation syntax 183 follows [RFC8340]. 185 module: ietf-nmda-compare 187 rpcs: 188 +---x compare 189 +---w input 190 | +---w source identityref 191 | +---w target identityref 192 | +---w (filter-spec)? 193 | | +--:(subtree-filter) 194 | | | +---w subtree-filter? 195 | | +--:(xpath-filter) 196 | | +---w xpath-filter? yang:xpath1.0 {nc:xpath}? 197 +--ro output 198 +--ro differences 200 Structure of ietf-nmda-compare 202 5. YANG Data Model 204 file "ietf-nmda-compare@2018-03-19.yang" 205 module ietf-nmda-compare { 207 yang-version 1.1; 208 namespace "urn:ietf:params:xml:ns:yang:ietf-nmda-compare"; 210 prefix cp; 212 import ietf-yang-types { 213 prefix yang; 214 } 215 import ietf-datastores { 216 prefix ds; 217 } 218 import ietf-yang-patch { 219 prefix ypatch; 220 } 221 import ietf-netconf { 222 prefix nc; 223 } 225 organization "IETF"; 226 contact 227 "WG Web: 228 WG List: 230 Author: Alexander Clemm 231 233 Author: Yingzhen Qu 234 236 Author: Jeff Tantsura 237 "; 239 description 240 "The YANG data model defines a new operation, , that 241 can be used to compare NMDA datastores."; 243 revision 2018-03-19 { 244 description 245 "Initial revision"; 246 reference 247 "RFC XXXX: Comparison of NMDA datastores"; 248 } 250 /* RPC */ 251 rpc compare { 252 description 253 "NMDA compare operation."; 254 input { 255 leaf source { 256 type identityref { 257 base ds:datastore; 258 } 259 mandatory true; 260 description 261 "The source datastore to be compared."; 262 } 263 leaf target { 264 type identityref { 265 base ds:datastore; 266 } 267 mandatory true; 268 description 269 "The target datastore to be compared."; 270 } 271 choice filter-spec { 272 description 273 "Identifies the portions of the datastores to be 274 compared."; 276 anydata subtree-filter { 277 description 278 "This parameter identifies the portions of the 279 target datastore to retrieve."; 280 reference "RFC 6241, Section 6."; 282 } 283 leaf xpath-filter { 284 if-feature nc:xpath; 285 type yang:xpath1.0; 286 description 287 "This parameter contains an XPath expression 288 identifying the portions of the target 289 datastore to retrieve."; 290 } 291 } 292 } 293 output { 294 container differences { 295 uses ypatch:yang-patch; 296 description 297 "The list of differences, encoded per RFC8072."; 298 } 299 } 300 } 301 } 302 304 6. Example 306 The following example compares the difference between 307 and for object "explicit-router-id", as defined in data 308 module [I-D.draft-ietf-ospf-yang]. 310 RPC request: 312 315 316 operational 317 intended 318 319 /ospf/instance/explicit-router-id 320 321 323 325 RPC reply, when a difference is detected: 327 331 332 333 ospf router-id 334 diff between running and startup 335 336 1 337 replace 338 /ospf/instance/explicit-router-id 339 340 1.1.1.1 341 342 343 344 346 348 RPC reply when no difference is detected: 350 354 356 358 7. Possible Future Extensions 360 It is conceivable to extend the compare operation with a number of 361 possible additional features in the future. 363 For one, it is possible to define an extension with an optional 364 feature for dampening. This will allow clients to specify a minimum 365 time period for which a difference must persist for it to be 366 reported. This will enable clients to distinguish between 367 differences that are only fleeting from ones that are not and that 368 may represent a real operational issue and inconsistency within the 369 device. 371 For this purpose, an additional input parameter can be added to 372 specify the dampening period. Only differences that pertain for at 373 least the dampening time are reported. A value of 0 or omission of 374 the parameter indicates no dampening. Reporting of differences MAY 375 correspondingly be delayed by the dampening period from the time the 376 request is received. 378 To implement this feature, a server implementation might run a 379 comparison when the RPC is first invoked and temporarily store the 380 result. Subsequently, it could wait until after the end of the 381 dampening period to check whether the same differences are still 382 observed. The differences that still persist are then returned. 384 A second additional feature could apply a prefiltering step to 385 exclude data from the comparison that can occur in only one datastore 386 but not the other. This could be controlled by adding an additional 387 flag as input to the RPC. For example, if one datastore has only 388 configuration data, data nodes for which config is false could be 389 excluded from the comparison. Of course, those data nodes still 390 constitute a difference, and not every user may be aware of the 391 underlying distinction. As an alternative, a user could also 392 explicitly exclude such nodes from the comparison through use a 393 corresponding filter construct. 395 8. IANA Considerations 397 8.1. Updates to the IETF XML Registry 399 This document registers one URI in the IETF XML registry [RFC3688]. 400 Following the format in [RFC3688], the following registration is 401 requested: 403 URI: urn:ietf:params:xml:ns:yang:ietf-nmda-compare 405 Registrant Contact: The IESG. 407 XML: N/A, the requested URI is an XML namespace. 409 8.2. Updates to the YANG Module Names Registry 411 This document registers a YANG module in the YANG Module Names 412 registry [RFC6020]. Following the format in [RFC6020], the following 413 registration is requested: 415 name: ietf-nmda-compare 417 namespace: urn:ietf:params:xml:ns:yang:ietf-nmda-compare 419 prefix: cp 421 reference: RFC XXXX 423 9. Security Considerations 425 Comparing discrepancies between datastores requires a certain amount 426 of processing resources at the server. An attacker could attempt to 427 attack a server by making a high volume of comparison requests. 428 Server implementations can guard against such scenarios in several 429 ways. For one, they can implement NACM in order to require proper 430 authorization for requests to be made. Second, server 431 implementations can limit the number of requests that they serve in 432 any one time interval, potentially rejecting requests made at a 433 higher frequency than the implementation can reasonably sustain. 435 10. Acknowledgments 437 We thank Rob Wilton, Andy Bierman, Martin Bjorklund, and Mahesh 438 Jethanandani for valuable feedback and suggestions on an earlier 439 revision of this document. 441 11. Normative References 443 [I-D.draft-ietf-ospf-yang] 444 Yeung, D., Qu, Y., Zhang, J., Chen, I., and A. Lindem, 445 "Yang Data Model for OSPF Protocol", I-D draft-ietf-ospf- 446 yang, October 2017. 448 [notif-sub] 449 Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard, 450 E., and A. Tripathy, "Custom subscription to event 451 notifications", January 2018, 452 . 455 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 456 Requirement Levels", BCP 14, RFC 2119, 457 DOI 10.17487/RFC2119, March 1997, 458 . 460 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 461 DOI 10.17487/RFC3688, January 2004, 462 . 464 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 465 the Network Configuration Protocol (NETCONF)", RFC 6020, 466 DOI 10.17487/RFC6020, October 2010, 467 . 469 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 470 and A. Bierman, Ed., "Network Configuration Protocol 471 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 472 . 474 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 475 RFC 7950, DOI 10.17487/RFC7950, August 2016, 476 . 478 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 479 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 480 . 482 [RFC8072] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Patch 483 Media Type", RFC 8072, DOI 10.17487/RFC8072, February 484 2017, . 486 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 487 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 488 May 2017, . 490 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 491 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 492 . 494 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 495 and R. Wilton, "Network Management Datastore Architecture 496 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 497 . 499 [yang-push] 500 Clemm, A., Voit, E., Gonzalez Prieto, A., Tripathy, A., 501 Nilsen-Nygaard, E., Bierman, A., and B. Lengyel, 502 "Subscribing to YANG datastore push updates", February 503 2018, . 506 Authors' Addresses 508 Alexander Clemm 509 Futurewei Technologies, Inc. 510 2330 Central Expressway 511 Santa Clara, CA 95050 512 USA 514 Email: ludwig@clemm.org 515 Yingzhen Qu 516 Futurewei Technologies, Inc. 517 2330 Central Expressway 518 Santa Clara, CA 95050 519 USA 521 Email: yingzhen.qu@huawei.com 523 Jeff Tantsura 524 Nuage Networks 526 Email: jefftant.ietf@gmail.com