[netconf] Re: Adoption call for notif-yang-04
Kent Watsen <kent+ietf@watsen.net> Fri, 14 June 2024 22:21 UTC
Return-Path: <0100019018d73fe0-311ffd68-bbe2-4509-9d6e-7cc837cbb356-000000@amazonses.watsen.net>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0448BC169434 for <netconf@ietfa.amsl.com>; Fri, 14 Jun 2024 15:21:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.907
X-Spam-Level:
X-Spam-Status: No, score=-1.907 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tEmEaRsv2DmJ for <netconf@ietfa.amsl.com>; Fri, 14 Jun 2024 15:21:19 -0700 (PDT)
Received: from a8-31.smtp-out.amazonses.com (a8-31.smtp-out.amazonses.com [54.240.8.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6DFC9C151075 for <netconf@ietf.org>; Fri, 14 Jun 2024 15:21:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1718403678; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=MqQxvAr2XvkR6ZZgnHeg8yt4lPdn2BtRv7I0f4kvxUc=; b=uRhGvvK2i+CLflVTKAx92y+k1E5UN+TonjcjmWo4XddMiLCowNMmkdjnHYavP9Be q25Tn6Hex+PHTJ9EblH5AoyQFUIZQH5mtgG7GL3/Yv72qdEuzXxwTY5ohWoxNnpbE7a 8Na0h3jQNrXJhgQ1INde0sCy03sZZ8LP0mdN7XOg=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <0100019018d73fe0-311ffd68-bbe2-4509-9d6e-7cc837cbb356-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_4B74993B-5947-457A-94E6-0FAECD23D556"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\))
Date: Fri, 14 Jun 2024 22:21:18 +0000
In-Reply-To: <0c05e57e06474f5db28b085049f863db@swisscom.com>
To: Thomas.Graf@swisscom.com
References: <0100018eb57a21d8-26b38f41-a625-4d44-9248-09b349fd4212-000000@email.amazonses.com> <DU2PR02MB10160110D4C72D682BA884802880E2@DU2PR02MB10160.eurprd02.prod.outlook.com> <CABCOCHT4Yy8gUKxmR9__ZcAEULiK8g-S7-B6EaLO8s0nk0FjTg@mail.gmail.com> <0100018f07521d0a-17e021b3-295a-4c50-8316-58632d7a7107-000000@email.amazonses.com> <CACvbXWGS_Er8bK0u4suNs0oHD7B6avObk8uu6bET_-7xWHcdbQ@mail.gmail.com> <355358f23f374b8dba8a20c00fea03f4@swisscom.com> <CABCOCHRVEQBocBAspUHJFE0vp8AkO1KCimPdUV9+H0kpg1TgYA@mail.gmail.com> <0100018f64a85d1c-f98eabaf-771e-473d-a1c3-40b8f9b51dc4-000000@email.amazonses.com> <0e02c89bdb8d445db0a3f83b30b01887@swisscom.com> <0100019012301ba8-cbf266f3-b215-4454-879e-193606dfd926-000000@email.amazonses.com> <0c05e57e06474f5db28b085049f863db@swisscom.com>
X-Mailer: Apple Mail (2.3774.400.31)
Feedback-ID: ::1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2024.06.14-54.240.8.31
Message-ID-Hash: NJ5F4NDX3ZRT4PIXBPHC7ZG37A4YJC5I
X-Message-ID-Hash: NJ5F4NDX3ZRT4PIXBPHC7ZG37A4YJC5I
X-MailFrom: 0100019018d73fe0-311ffd68-bbe2-4509-9d6e-7cc837cbb356-000000@amazonses.watsen.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-netconf.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "netconf@ietf.org" <netconf@ietf.org>, pierre.francois@insa-lyon.fr
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [netconf] Re: Adoption call for notif-yang-04
List-Id: NETCONF WG list <netconf.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/P_tjkRedoLaB1SecaMLrrhDCsik>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Owner: <mailto:netconf-owner@ietf.org>
List-Post: <mailto:netconf@ietf.org>
List-Subscribe: <mailto:netconf-join@ietf.org>
List-Unsubscribe: <mailto:netconf-leave@ietf.org>
Hi Thomas, > KW> The word “manual” was out of place. What I meant was that the code validates in two-steps: first the envelop is validated using generic schema, then the payload is validated using the specific schema. > > TG> I think we are on the same page but lets try to be precise that we have a solid base. I would like to learn wherever you have the same understanding. You are refering to the XSD defined in https://datatracker.ietf.org/doc/html/rfc5277#section-4 for the event notification envelop and the notifications schemas in the ietf-subscribed-notifications YANG module described in https://datatracker.ietf.org/doc/html/rfc8639#section-4 resp. ietf-yang-push YANG module described in https://datatracker.ietf.org/doc/html/rfc8641#section-5. Correct? I only refer to the XSD in RFC 5277, and YANG modules having “notification” statements in them. I’ve since abandoned the XSD and use code-logic to validate the envelop for JSON-based notifications. Something like this: assert(type(notif) == dict) assert(len(notif) == 1) assert("ietf-restconf:notification" in notif) assert(type(notif["ietf-restconf:notification"]) == dict) assert(len(notif["ietf-restconf:notification"]) == 2) assert("eventTime" in notif[“ietf-restconf:notification"]) eventTime = notif["ietf-restconf:notification"].pop("eventTime") payload = notif["ietf-restconf:notification"] Where “payload” is something that can be passed to a YANG validator (e.g., yanglint -t notif …). > TG> If correct, then I think the word payload is misplaced. I would word that the YANG-push notification schema is defined in XSD for the notification statement and in YANG for the rest of the YANG-push notification schema. This would be in line with > > https://datatracker.ietf.org/doc/html/rfc8639#section-1.4 > > o The <notification> message of [RFC5277], Section 4 <https://datatracker.ietf.org/doc/html/rfc5277#section-4> is used. I think that you’re raising a terminology point. The words “payload” and “envelop” are not formally defined by NETCONF. Looking at RFC 7277, the term “Event” is defined: Event: An event is something that happens that may be of interest - a configuration change, a fault, a change in status, crossing a threshold, or an external input to the system, for example. Often, this results in an asynchronous message, sometimes referred to as a notification or event notification, being sent to interested parties to notify them that this event has occurred. Note the 2nd sentence says "asynchronous message, sometimes referred to as a notification or event notification”. This “notification” is the whole document (envelop + payload in my vernacular), and NOT the YANG “notification” (just the payload in my vernacular). > TG> And lets agree that schema is equally necessary for encoding, decoding and validating of messages. > > TG> Is my assessment correct? Do you also come to the same conclusion? In general, schema is good and helpful. But stating that schema is “necessary” is likely a stretch, Surely protocols have been successfully developed without schema. As Andy states: a "protocol specification is not required to provide a YANG model for every message.” > TG> I find reading that YANG-Push is based on notifications in https://datatracker.ietf.org/doc/html/rfc8639#section-1.4 and notifications can be encoded in JSON according to https://www.rfc-editor.org/rfc/rfc7951#section-1 for an implementer rather misleading. Would you agree? Okay, it does seem that line is RFC 8639 is misleading, as RFC 7951 only covers encoding the data defined by the YANG “notification” statement, not the XSD “notification” element in RFC 5277. To understand how to encode the envelop too, one needs to look at RFC 8040 or, alternately, https://datatracker.ietf.org/doc/html/draft-ietf-netconf-https-notif-15#section-4, which says: JSON-encoded notifications are encoded the same as specified in Section 6.4 in RESTCONF [RFC8040] with the following deviations: - The notifications do not contain the "data:" prefix used by Server-Sent Events (SSE). - Instead of saying that, for JSON-encoding purposes, the module name for the "notification" element is "ietf-restconf", the module name will instead be "ietf-https-notif". PS: I notice that the UDP-notif uses “ietf-notification” for the JSON encoding without explanation/definition. PPS: it might be good the s/ietf-https-notif/ietf-notification/ in https-notif, since it hasn’t been published yet. It’s too late for RFCs 8040 and 8650, but at least the “ietf-restconf” name is always being used for RESTCONF protocol. > KW> I don’t understand. Can you say some more? Also, what remediation do you have in mind? > > TG> Sure. RFC 7951 and RFC 9254 describing encoding rules how YANG. Both RFC's describing in the abstract and introduction that notifications are in scope but missing encoding rules for YANG. The only related information I was able to find is an example in the encoding rule section on anydata https://www.rfc-editor.org/rfc/rfc7951#section-5.5. In RFC 8639 and RFC 8641 it is assumed that the notification messages are JSON and CBOR encodable. However the encoding rules for notifications in RFC 7951 and RFC 9254 and the YANG module for https://datatracker.ietf.org/doc/html/rfc5277#section-4 is missing. Does that clarify? I understand your position now. I’ll agree that things don’t line up perfectly. I disagree that a YANG-equivalent to the XSD in 5277 is necessary. RFC 8639 points to 8640 and 8650 for dynamic subscriptions and, for configured subscriptions, doesn’t say anything (https://datatracker.ietf.org/doc/html/rfc8639#section-2.5.7) leaving it to docs like https-notif and udp-notif to fill in encoding details. > > TG> Where I am puzzled is that this problem has already being reported in an errata for RC5277: https://www.rfc-editor.org/errata/eid6770 and discussed on the netconf mailing list here: https://mailarchive.ietf.org/arch/msg/netconf/VF8QwvhG8nLii6dXTYZYThrNhgc/. It received the same push back reasoning as Med did on https://mailarchive.ietf.org/arch/msg/netconf/Abw9mRHZos_yK9-x1HWHCVyv_xM/. I don’t see lack of YANG for the entire notification message a serious problem. Even if we could start over, the YANG language doesn’t support "wildcard nodes” (abstract substitution groups?), and so it is impossible to define the generic. Getting back to the notif-yang draft, it’s unclear how that sx:structure would help. Presumably the idea is that every “notification” statement denied in YANG modules would be augmented into that structure (via the augment-structure statement), but: - the notif-yang draft doesn’t say this, so one is left to wonder how it is suppose to work. - the notif-yang draft doesn't provide examples showing the objective achieved. - if the augment-structure occurs in YANG modules, it doesn’t seem nice. - if the augment-structure occurs by implementations, it doesn’t need to be standardized. > TG> I believe the root cause that notifications can't be encoded in JSON and CBOR due to missing YANG module does not lie in RFC 5277, it lies in Section 1.4 of RFC 8639. I highlighted in green the paragraphs describing where RFC 8639 is defining new elements and in yellow where it is based on RFC 5277. Agree? See below. > https://datatracker.ietf.org/doc/html/rfc8639#section-1.4 > > o This document defines a transport-independent capability; > [RFC5277 <https://datatracker.ietf.org/doc/html/rfc5277>] is specific to NETCONF. This statement is somewhat true. > > o For the new operations, the data model defined in this document is > used instead of the data model defined in Section 3.4 of <https://datatracker.ietf.org/doc/html/rfc5277#section-3.4> > [RFC5277] <https://datatracker.ietf.org/doc/html/rfc5277#section-3.4>. This statement is false, an errata should be filed. > > o The RPC operations in this document replace the operation > <create-subscription> as defined in [RFC5277], Section 4 <https://datatracker.ietf.org/doc/html/rfc5277#section-4>. This statement is somewhat true. > o The <notification> message of [RFC5277], Section 4 <https://datatracker.ietf.org/doc/html/rfc5277#section-4> is used. This statement is false, an errata should be filed. But note that the text in Section 1 is correct: “Bindings for subscribed event record delivery for NETCONF and RESTCONF are defined in [RFC8640] and [RESTCONF-Notif], respectively.” > o The included contents of the "NETCONF" event stream are identical > between this document and [RFC5277 <https://datatracker.ietf.org/doc/html/rfc5277>]. This statement is true. > o A publisher MAY implement both the Notification Management Schema > and RPCs defined in [RFC5277 <https://datatracker.ietf.org/doc/html/rfc5277>] and this document concurrently. > > o Unlike [RFC5277 <https://datatracker.ietf.org/doc/html/rfc5277>], this document enables a single transport session > to intermix notification messages and RPCs for different > subscriptions. > > o A subscription "stop-time" can be specified as part of a > notification replay. This supports a capability analogous to the > <stopTime> parameter of [RFC5277 <https://datatracker.ietf.org/doc/html/rfc5277>]. However, in this > specification, a "stop-time" parameter can also be applied without > replay. Kent // contributor
- [netconf] Adoption call for notif-yang-04 Kent Watsen
- [netconf] FW: Adoption call for notif-yang-04 Thomas.Graf
- Re: [netconf] Adoption call for notif-yang-04 Andy Bierman
- Re: [netconf] Adoption call for notif-yang-04 Jean Quilbeuf
- Re: [netconf] Adoption call for notif-yang-04 Nils.Warnke
- Re: [netconf] Adoption call for notif-yang-04 Zhuoyao Lin
- Re: [netconf] Adoption call for notif-yang-04 Vincenzo Riccobene
- Re: [netconf] Adoption call for notif-yang-04 Voyer, Daniel
- Re: [netconf] Adoption call for notif-yang-04 Giuseppe Fioccola
- Re: [netconf] Adoption call for notif-yang-04 Jan Lindblad (jlindbla)
- Re: [netconf] Adoption call for notif-yang-04 Camilo Cardona
- Re: [netconf] Adoption call for notif-yang-04 Qin Wu
- Re: [netconf] Adoption call for notif-yang-04 Leonardo.Rodoni
- Re: [netconf] Adoption call for notif-yang-04 maqiufang (A)
- Re: [netconf] Adoption call for notif-yang-04 Paolo Lucente
- Re: [netconf] Adoption call for notif-yang-04 IGNACIO DOMINGUEZ MARTINEZ-CASANUEVA
- Re: [netconf] Adoption call for notif-yang-04 mohamed.boucadair
- Re: [netconf] Adoption call for notif-yang-04 Andy Bierman
- Re: [netconf] Adoption call for notif-yang-04 mohamed.boucadair
- Re: [netconf] Adoption call for notif-yang-04 Kent Watsen
- Re: [netconf] Adoption call for notif-yang-04 Andy Bierman
- Re: [netconf] Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Rob Wilton (rwilton)
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Benoit Claise
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Benoit Claise
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- Re: [netconf] Adoption call for notif-yang-04 Per Andersson
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Benoit Claise
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Rob Wilton (rwilton)
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Benoit Claise
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Andy Bierman
- [netconf] Re: Adoption call for notif-yang-04 Rob Wilton (rwilton)
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Thomas.Graf
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Kent Watsen
- [netconf] Re: Adoption call for notif-yang-04 Alex Huang Feng