idnits 2.17.1 draft-clemm-netconf-nmda-diff-02.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 : ---------------------------------------------------------------------------- ** There are 2 instances of too long lines in the document, the longest one being 3 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 23, 2018) is 2246 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: 1 error (**), 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 Huawei 5 Expires: August 27, 2018 J. Tantsura 6 Nuage Networks 7 February 23, 2018 9 Discrepancy detection between NMDA datastores 10 draft-clemm-netconf-nmda-diff-02 12 Abstract 14 This document defines a capability that allows to report 15 discrepancies between management datastores in Netconf or Restconf 16 servers that comply with the NMDA architecture. The capability is 17 based on a set of RPCs that are defined as part of a YANG data model 18 and that are intended to be used in conjunction with Netconf and 19 Restconf. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on August 27, 2018. 38 Copyright Notice 40 Copyright (c) 2018 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (https://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Key Words . . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 3. Definitions and Acronyms . . . . . . . . . . . . . . . . . . 3 58 4. Data Model Overview . . . . . . . . . . . . . . . . . . . . . 4 59 5. YANG Data Model . . . . . . . . . . . . . . . . . . . . . . . 5 60 6. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 61 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 62 7.1. Updates to the IETF XML Registry . . . . . . . . . . . . 9 63 7.2. Updates to the YANG Module Names Registry . . . . . . . . 9 64 8. Security Considerations . . . . . . . . . . . . . . . . . . . 10 65 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 10 66 10. Normative References . . . . . . . . . . . . . . . . . . . . 10 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 69 1. Introduction 71 The revised Network Management Datastore Architecture (NMDA) [NMDA] 72 introduces a set of new datastores that each hold YANG-defined data 73 [RFC7950] and represent a different "viewpoint" on the data that is 74 maintained by a server. New YANG datastores that are introduced 75 include , which contains validated configuration data that 76 a client application intends to be in effect, and , 77 which contains at least conceptually operational state data (such as 78 statistics) as well as configuration data that is actually in effect. 80 NMDA introduces in effect a concept of "lifecycle" for management 81 data, allowing to clearly distinguish between data that is part of a 82 configuration that was supplied by a user, configuration data that 83 has actually been successfully applied and that is part of the 84 operational state, and overall operational state that includes both 85 applied configuration data as well as status and statistics. 87 As a result, data from the same management model can be reflected in 88 multiple datastores. Clients need to specify the target datastore to 89 be specific about which viewpoint of the data they want to access. 90 This way, an application can differentiate whether they are (for 91 example) interested in the configuration that has been applied and is 92 actually in effect, or in the configuration that was supplied by a 93 client and that is supposed to be in effect. 95 Due to the fact that data can propagate from one datastore to 96 another, it is possibly for discrepancies to occur. Some of this is 97 entirely expected, as there may be a time lag between when a 98 configuration is given to the device and reflected in , 99 until when it actually takes effect and is reflected in 100 . However, there may be cases when a configuration item 101 that was to be applied may not actually take effect at all or needs 102 an unusually long time to do so. This can be the case due to certain 103 conditions not being met, resource dependencies not being resolved, 104 or even implementation errors in corner conditions. 106 When configuration that is in effect is different from configuration 107 that was applied, many issues can result. It becomes more difficult 108 to operate the network properly due to limited visibility of actual 109 status which makes it more difficult to analyze and understand what 110 is going on in the network. Services may be negatively affected (for 111 example, breaking a service instance resulting in service is not 112 properly delivered to a customer) and network resources be 113 misallocated. 115 Applications can potentially analyze any discrepancies between two 116 datastores by retrieving the contents from both datastores and 117 comparing them. However, in many cases this will be at the same time 118 costly and extremely wasteful. It will also not be an effective 119 approach to discover changes that are only "fleeting", or for that 120 matter to distinguish between changes that are only fleeting from 121 ones that are not and that may represent a real operational issue and 122 inconsistency within the device. 124 This document introduces a YANG data model which defines RPCs, 125 intended to be used in conjunction with NETCONF [RFC6241] or RESTCONF 126 [RFC8040], that allow a client to request a server to compare two 127 NMDA datastores and report any discepancies. It also features a 128 dampening option that allows to exclude discrepancies that are only 129 fleeting from the report. 131 2. Key Words 133 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 134 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 135 "OPTIONAL" in this document are to be interpreted as described in BCP 136 14 [RFC2119] [RFC8174] when, and only when, they appear in all 137 capitals, as shown here. 139 3. Definitions and Acronyms 141 NMDA: Network Management Datastore Architecture 143 RPC: Remote Procedure Call 145 4. Data Model Overview 147 At the core of the solution is a new management operation, , 148 that allows to compare two datastores for the same data. The 149 operation checks whether there are any discrepancies in values or in 150 objects that are contained in either datastore, and returns any 151 discrepancies as output. The output is returned in the format 152 specified in YANG-Patch [RFC8072]. 154 The YANG data model defines the operation as a new RPC. 155 The operation takes the following input parameters: 157 o source: The source identifies the datastore that will serve as 158 reference for the comparison, for example . 160 o target: The target identifies the datastore to compare against the 161 source. 163 o filter-spec: This is a choice between different filter constructs 164 to identify the portions of the datastore to be retrieved. It 165 acts as a node selector that specifies which data nodes are within 166 the scope of the comparison and which nodes are outside the scope. 167 This allows a comparison operation to be applied only to a 168 specific portion of the datastore that is of interest, such as a 169 particular subtree. (The filter dow not contain expressions that 170 would match values data nodes, as this is not required by most use 171 cases and would complicate the scheme, from implementation to 172 dealing with race conditions.) 174 o dampening: Identifies the minimum time period for which a 175 discrepancy must persist for it to be reported. The reporting of 176 the output MAY correspondingly delayed by the dampening period. 177 Implementations MAY thus run a comparison when the RPC is first 178 invoked, then wait until after the dampening period to check 179 whether any differences still persist. This parameter is 180 conditional of a dampening being supported as a feature. 182 The operation provides the following output parameter: 184 o differences: This parameter contains the list of differences, 185 encoded per RFC8072, i.e. specifying which patches would need to 186 be applied to the source to produce the target. Values for patch- 187 id and edit-id are generated by the server. 189 As part of the differences, it will be useful to include "origin" 190 metadata where applicable, specifically when the target datastore is 191 . This can help explain the cause of a discrepancy, for 192 example when a data item is part of but the origin in 193 is reported as "system". How to best report "origin" 194 metadata is an item for further study, specifically whether it should 195 be automatically returned per default or whether its reporting should 196 be controlled using another RPC parameter. 198 The data model is defined in the ietf-nmda-compare YANG module. Its 199 structure is shown in the following figure. The notation syntax 200 follows [I-D.draft-ietf-netmod-yang-tree-diagrams]. 202 module: ietf-nmda-compare 204 rpcs: 205 +---x compare 206 +---w input 207 | +---w source identityref 208 | +---w target identityref 209 | +---w (filter-spec)? 210 | | +--:(subtree-filter) 211 | | | +---w subtree-filter? 212 | | +--:(xpath-filter) 213 | | +---w xpath-filter? yang:xpath1.0 {nc:xpath}? 214 | +---w dampening? yang:timeticks {cmp-dampening}? 215 +--ro output 216 +--ro differences 218 Structure of ietf-nmda-compare 220 5. YANG Data Model 222 file "ietf-nmda-compare@2018-02-23.yang" 223 module ietf-nmda-compare { 225 yang-version 1.1; 226 namespace "urn:ietf:params:xml:ns:yang:ietf-nmda-compare"; 228 prefix cp; 230 import ietf-yang-types { 231 prefix yang; 232 } 233 import ietf-datastores { 234 prefix ds; 235 } 236 import ietf-yang-patch { 237 prefix ypatch; 238 } 239 import ietf-netconf { 240 prefix nc; 241 } 243 organization "IETF"; 244 contact 245 "WG Web: 246 WG List: 248 Author: Alexander Clemm 249 251 Author: Yingzhen Qu 252 254 Author: Jeff Tantsura 255 "; 257 description 258 "The YANG data model defines a new operation, , that 259 can be used to compare NMDA datastores."; 261 revision 2018-02-23 { 262 description 263 "Initial revision"; 264 reference 265 "RFC XXXX: Discrepancy detection between NMDA datastores"; 266 } 268 feature cmp-dampening { 269 description 270 "This feature indicates that the ability to only report 271 differences that pertain for a certain amount of time, 272 as indicated through a dampening period, is supported."; 273 } 275 /* RPC */ 276 rpc compare { 277 description 278 "NMDA compare operation."; 279 input { 280 leaf source { 281 type identityref { 282 base ds:datastore; 283 } 284 mandatory true; 285 description 286 "The source datastore to be compared."; 287 } 288 leaf target { 289 type identityref { 290 base ds:datastore; 291 } 292 mandatory true; 293 description 294 "The target datastore to be compared."; 295 } 296 choice filter-spec { 297 description 298 "Identifies the portions of the datastores to be 299 compared."; 301 anydata subtree-filter { 302 description 303 "This parameter identifies the portions of the 304 target datastore to retrieve."; 305 reference "RFC 6241, Section 6."; 306 } 307 leaf xpath-filter { 308 if-feature nc:xpath; 309 type yang:xpath1.0; 310 description 311 "This parameter contains an XPath expression 312 identifying the portions of the target 313 datastore to retrieve."; 314 } 315 } 316 leaf dampening { 317 if-feature cmp-dampening; 318 type yang:timeticks; 319 default "0"; 320 description 321 "The dampening period, in hundredths of a second, for the 322 reporting of differences. Only differences that pertain 323 for at least the dampening time are reported. Reporting 324 of differences may be deferred by the dampening time. 325 A value of 0 or omission of the leaf indicates no 326 dampening."; 327 } 328 } 329 output { 330 container differences { 331 uses ypatch:yang-patch; 332 description 333 "The list of differences, encoded per RFC8072, with 334 a value for patch-id and values for edit-id generated 335 by the server. If there are no differences, an 336 empty container is returned."; 337 } 338 } 339 } 340 } 341 343 6. Example 345 The following example compares the difference between 346 and in any elements of list "instance" contained under 347 "ospf", as defined in data module [I-D.draft-ietf-ospf-yang]. 349 RPC request: 351 353 354 operational 355 intended 356 357 /ospf:ospf/ospf:instance/ 358 359 500 360 361 363 RPC reply when a difference is detected: 365 368 369 370 p101 371 372 1 373 replace 374 375 /ospf:ospf/ospf:instance[ospf:af='1']/ospf:areas/ 376 ospf:area[ospf:area-id='1']/ospf:default-cost 377 378 379 128 380 381 382 383 384 386 RPC reply when no difference is detected: 388 391 392 394 7. IANA Considerations 396 7.1. Updates to the IETF XML Registry 398 This document registers one URI in the IETF XML registry [RFC3688]. 399 Following the format in [RFC3688], the following registration is 400 requested: 402 URI: urn:ietf:params:xml:ns:yang:ietf-nmda-compare 404 Registrant Contact: The IESG. 406 XML: N/A, the requested URI is an XML namespace. 408 7.2. Updates to the YANG Module Names Registry 410 This document registers a YANG module in the YANG Module Names 411 registry [RFC6020]. Following the format in [RFC6020], the following 412 registration is requested: 414 name: ietf-nmda-compare 416 namespace: urn:ietf:params:xml:ns:yang:ietf-nmda-compare 418 prefix: cp 420 reference: RFC XXXX 422 8. Security Considerations 424 Comparing discrepancies between datastores requires a certain amount 425 of processing resources at the server. An attacker could attempt to 426 attack a server by making a high volume of discrepancy detection 427 requests. Server implementations can guard against such scenarios in 428 several ways. For one, they can implement NACM in order to require 429 proper authorization for requests to be made. Second, server 430 implementations can limit the number of requests that they serve in 431 any one time interval, potentially rejecting requests made at a 432 higher frequency than the implementation can reasonably sustain. 434 9. Acknowledgments 436 We thank Rob Wilton for valuable feedback and suggestions on an 437 earlier revision of this document. 439 10. Normative References 441 [I-D.draft-ietf-netmod-yang-tree-diagrams] 442 Bjorklund, M. and L. Berger, "YANG Tree Diagrams", I-D 443 draft-ietf-netmod-yang-tree-diagrams, February 2018. 445 [I-D.draft-ietf-ospf-yang] 446 Yeung, D., Qu, Y., Zhang, J., Chen, I., and A. Lindem, 447 "Yang Data Model for OSPF Protocol", I-D draft-ietf-ospf- 448 yang, October 2017. 450 [NMDA] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 451 and R. Wilton, "Network Management Datastore 452 Architecture", January 2018, 453 . 456 [notif-sub] 457 Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard, 458 E., and A. Tripathy, "Custom subscription to event 459 notifications", January 2018, 460 . 463 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 464 Requirement Levels", BCP 14, RFC 2119, 465 DOI 10.17487/RFC2119, March 1997, 466 . 468 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 469 DOI 10.17487/RFC3688, January 2004, 470 . 472 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 473 the Network Configuration Protocol (NETCONF)", RFC 6020, 474 DOI 10.17487/RFC6020, October 2010, 475 . 477 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 478 and A. Bierman, Ed., "Network Configuration Protocol 479 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 480 . 482 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 483 RFC 7950, DOI 10.17487/RFC7950, August 2016, 484 . 486 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 487 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 488 . 490 [RFC8072] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Patch 491 Media Type", RFC 8072, DOI 10.17487/RFC8072, February 492 2017, . 494 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 495 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 496 May 2017, . 498 [yang-push] 499 Clemm, A., Voit, E., Gonzalez Prieto, A., Tripathy, A., 500 Nilsen-Nygaard, E., Bierman, A., and B. Lengyel, 501 "Subscribing to YANG datastore push updates", February 502 2018, . 505 Authors' Addresses 506 Alexander Clemm 507 Huawei 508 2330 Central Expressway 509 Santa Clara, CA 95050 510 USA 512 Email: ludwig@clemm.org 514 Yingzhen Qu 515 Huawei 516 2330 Central Expressway 517 Santa Clara, CA 95050 518 USA 520 Email: yingzhen.qu@huawei.com 522 Jeff Tantsura 523 Nuage Networks 525 Email: jefftant.ietf@gmail.com