[netconf] Re: YANG Push (RFC 8641) on-change example
Andy Bierman <andy@yumaworks.com> Wed, 22 May 2024 16:22 UTC
Return-Path: <andy@yumaworks.com>
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 6AFAEC14F685 for <netconf@ietfa.amsl.com>; Wed, 22 May 2024 09:22:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.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 gKbo2YPSoWUS for <netconf@ietfa.amsl.com>; Wed, 22 May 2024 09:22:11 -0700 (PDT)
Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1EC76C14F683 for <netconf@ietf.org>; Wed, 22 May 2024 09:22:11 -0700 (PDT)
Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3c99aec9598so2643176b6e.0 for <netconf@ietf.org>; Wed, 22 May 2024 09:22:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1716394930; x=1716999730; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wSHZX5Y1WTv9Cbx1y2nK3AxtKsJrDm/Nlakvzhjp+EE=; b=H4WsJl1okUwXjlk+axD6MefOFQTII03VH+OVQEPu+NMsVKto/Sd+tFFUKH8FpBpNxA oYCDUPDu3cZpwPoSg+HRZzf3Facz0/vbN8ipgoXDxLNnJS2yzH2TTpFgCSC/dyqetNyD jaUGQ37gohvsDvdCddvSOqN8ohIdfqV5o4S1wfqr7VPKK7fIXG/gGZxD8juEMsyF6lL1 C7yAZmtel6JUy/w3gP+A45v+I8xgbiqUAtwn19ier7TwOm6tj3k8jQH+i729CB60yMC0 lhxVYepCKwkN2IrwhcbvBKKlYex0LkWoi/zAkZ1lLXMM+Xvc0knn6WkmKs5Xndt6dmTl zIjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716394930; x=1716999730; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wSHZX5Y1WTv9Cbx1y2nK3AxtKsJrDm/Nlakvzhjp+EE=; b=uuZ/B/E9oV8Lu5oh6lUALqJITGX9kfhTLcXtM3BXaDaBI6Wbd8WKwvEtAa239qUlIG oPQUnrhRsjoplyPJkpEhIiuzEpwCgaJbA53B07tA9hYXj9Zjs/GVfYQPyqfOI+pyso6a /wSqPCzxgWbjy/z+yZRN/p004YBduhkwlli6U4ydwfq9XYKMzcxLuM0x+VBiBYsFI6JA nuv8C3/vk0vtnJ78D3v9UKRnCe25WMccaj+ZRyAixhi2gTCIQhsVlcgfoqGJ/eO4F3QH sMY4axEUeGZXL9eBTfzygN1PpNepj1exDZHFSEwJkQcVkxoM3GNl40qPaeRJaUQ8p7z4 uNnA==
X-Gm-Message-State: AOJu0Yys111lOWapq7WviAPUYAiTvGRvTb9k7v3aUO+IgUSMi2LHbLYB tRxrQch11b7fonoFpIi7ovmoKcztmrubr3SH9Yhh9DZ1R/TiKl5GyDN/b2pp/QB5rt6z8SzqPO9 MPl4oLryb1hWathAK4CJzmmySZYn5We/kPfzO9SnNwMGIOzCQ
X-Google-Smtp-Source: AGHT+IHUBRBiojbrGIUip+lozWVDaCIrRnK4hOVoHc0roiGLxv2LkVZ64cMG3jOk6hlbUEo3WVHVNqXcIyNxG3bu/0g=
X-Received: by 2002:a05:6359:4113:b0:186:b6ac:8ce2 with SMTP id e5c5f4694b2df-197919559d7mr248956255d.6.1716394929581; Wed, 22 May 2024 09:22:09 -0700 (PDT)
MIME-Version: 1.0
References: <LV8PR11MB8536A7CE5D17C1282D256DBAB5EB2@LV8PR11MB8536.namprd11.prod.outlook.com>
In-Reply-To: <LV8PR11MB8536A7CE5D17C1282D256DBAB5EB2@LV8PR11MB8536.namprd11.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 22 May 2024 09:21:58 -0700
Message-ID: <CABCOCHQAQkZrGfKOFoSV7TzKSUbpj_eykvCybi-fdv7DXjwxKQ@mail.gmail.com>
To: "Rob Wilton (rwilton)" <rwilton=40cisco.com@dmarc.ietf.org>
Content-Type: multipart/alternative; boundary="000000000000128fa306190d5640"
Message-ID-Hash: UBQ7NCFAH42FSYIGHGYNVVGLAJ4B7BON
X-Message-ID-Hash: UBQ7NCFAH42FSYIGHGYNVVGLAJ4B7BON
X-MailFrom: andy@yumaworks.com
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>, "rfc8641@ietf.org" <rfc8641@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [netconf] Re: YANG Push (RFC 8641) on-change example
List-Id: NETCONF WG list <netconf.ietf.org>
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>
On Wed, May 22, 2024 at 3:36 AM Rob Wilton (rwilton) <rwilton= 40cisco.com@dmarc.ietf.org> wrote: > Hi, > > > > The YANG Push RFC provides the following example for an on-change update. > > According to the text accompanying the figure 2 in section 3.7, the > example is for: > > > “ Figure 1 provides an example of a notification message for a > > subscription tracking the operational status of a single Ethernet > > interface (per [RFC8343 <https://www.rfc-editor.org/rfc/rfc8343>]). This notification message is encoded XML > > [W3C.REC-xml-20081126 <https://www.rfc-editor.org/rfc/rfc8641#ref-W3C.REC-xml-20081126>] over …” > > I agree that a replace on the ancestor node is not correct. I cannot find any details on the example filter that was provided to set up this subscription. Thanks for bringing up two of the critical problems with YANG Push that need to get fixed. 1) The arbitrarily complex XPath and subtree filtering mechanisms are NOT interoperable since NO SERVER actually supports that. A much more restricted filter is actually supported by the industry, except restricted differently for every server. A much more useful filter would be based on a subset of instances of a single object. Since multiple subscriptions are allowed, there is no need to pile all objects into a single filter anyway. 2) The YANG Patch reporting mechanism is difficult to use and there are no clear guidelines on how an on-change update is constructed. Arbitrarily complex edit lists are not useful to telemetry applications that just want a new representation of the object subset when it changes at all. E.g., a server may accept only container and list objects for the target. The server may not be able to push a single leaf as the target. (This example is the RFC is not very good). New example: The client monitors /interfaces-state. The server reports the /interfaces-state/interface child node changes. Let's say 10 counters change per interface. An edit list with 10 replace operations is complex to generate and complex to use. Instead, the server reports 1 replace operation on /interfaces-state/interface[name='foo']. Maybe there is 1 replace interface per update or maybe multiple interfaces. The client should expect either case. The server should never report a replace on /interfaces-state unless every interface is included. IMO the periodic updates (which do not use YANG Patch) are much more usable by the client. YANG Push should be changed so the client can request this format for on-change updates. Andy The example notification is given as: > > <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> > > <eventTime>2017-10-25T08:22:33.44Z</eventTime> > > <push-change-update > > xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push"> > > <id>89</id> > > <datastore-changes> > > <yang-patch> > > <patch-id>0</patch-id> > > <edit> > > <edit-id>edit1</edit-id> > > <operation>replace</operation> > > <target>/ietf-interfaces:interfaces</target> > > <value> > > <interfaces > > xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> > > <interface> > > <name>eth0</name> > > <oper-status>down</oper-status> > > </interface> > > </interfaces> > > </value> > > </edit> > > </yang-patch> > > </datastore-changes> > > </push-change-update> > > </notification> > > > > But I would expect a receiver to interpret this replace operation as replacing the entire operational state for all interfaces with a single eth0 interface entry reporting just the oper-status as down. Is my interpretation correct? > > Instead, I think that the notification target should have identified only the oper-status leaf on the specific interface. I.e., the generated notification should instead be: > > <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> > > <eventTime>2017-10-25T08:22:33.44Z</eventTime> > > <push-change-update > > xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push"> > > <id>89</id> > > <datastore-changes> > > <yang-patch> > > <patch-id>0</patch-id> > > <edit> > > <edit-id>edit1</edit-id> > > <operation>replace</operation> > > <target>/ietf-interfaces:interfaces/interface=eth0/oper-status</target> > > <value> > > <oper-status xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">down</oper-status> > > </value> > > </edit> > > </yang-patch> > > </datastore-changes> > > </push-change-update> > > </notification> > > > If folks agree, then I can file an errata. > > Regards, > Rob > > > _______________________________________________ > netconf mailing list -- netconf@ietf.org > To unsubscribe send an email to netconf-leave@ietf.org >
- [netconf] YANG Push (RFC 8641) on-change example Rob Wilton (rwilton)
- [netconf] Re: YANG Push (RFC 8641) on-change exam… Andy Bierman
- [netconf] Re: YANG Push (RFC 8641) on-change exam… Rob Wilton (rwilton)
- [netconf] Re: YANG Push (RFC 8641) on-change exam… Andy Bierman
- [netconf] Re: YANG Push (RFC 8641) on-change exam… Thomas.Graf