Re: [netmod] Comments on draft-ma-netmod-immutable-flag-06
Kent Watsen <kent+ietf@watsen.net> Wed, 26 April 2023 15:39 UTC
Return-Path: <01000187be382ccf-785def50-fa5b-42a0-8e6d-d6abf67a11ae-000000@amazonses.watsen.net>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0451EC151531 for <netmod@ietfa.amsl.com>; Wed, 26 Apr 2023 08:39:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 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, 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 2H4ExXAzkplU for <netmod@ietfa.amsl.com>; Wed, 26 Apr 2023 08:39:26 -0700 (PDT)
Received: from a48-90.smtp-out.amazonses.com (a48-90.smtp-out.amazonses.com [54.240.48.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A2B00C15152B for <netmod@ietf.org>; Wed, 26 Apr 2023 08:39:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1682523565; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=Ppq0j75mVfEnMl4OOK/f/p+l54BtLg0iGhGAFo6NSl0=; b=Av7uBGUv3cKi5uiY3TsJQh1B+A5WQVJ7j09MFoT9ehALtUIhJKC9rNH70ec/YiAT qJLTltTn+haP0oWWLqNiJkeZYobDgxIh5Fri/kpORXDWAEdBNu44u8AXFXo0wm+unB2 mpB0KA/BAH5eD72YA0XN02xg/RoUIFxSW1NHEv/0=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <01000187be382ccf-785def50-fa5b-42a0-8e6d-d6abf67a11ae-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_63AAF76B-E96A-4FFB-AB96-E4CB8F2114FA"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\))
Date: Wed, 26 Apr 2023 15:39:25 +0000
In-Reply-To: <99740295af9146d188e523ab43705dcf@huawei.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>
To: "maqiufang (A)" <maqiufang1@huawei.com>
References: <PAWPR07MB92743ED513FA25816935A0E3F0BA9@PAWPR07MB9274.eurprd07.prod.outlook.com> <F534A076-F959-4F03-9E23-6C80A4F0DC58@cisco.com> <ed2f5323329c4d05ab04c8d80866ab71@huawei.com> <59DAD4D3-754D-41E1-A4D4-0CA8FEA263F1@cisco.com> <BY5PR11MB41964C481FCE2619020F1D7AB5929@BY5PR11MB4196.namprd11.prod.outlook.com> <010001874900b5fd-f56744b5-974d-40b2-8177-221a23de41ca-000000@email.amazonses.com> <BY5PR11MB419677D444D44125DD69C91CB5909@BY5PR11MB4196.namprd11.prod.outlook.com> <0100018752302133-19bdf548-f01c-4b78-931e-6be80ec494fa-000000@email.amazonses.com> <b8e370d2ad5042c99c6f0d98345d3c5b@huawei.com> <C2D8A539-4AF9-44FA-92E8-9A9DC6CE7971@cisco.com> <d37925b807604b76b92cbf2f32341dab@huawei.com> <01000187ae695684-69ae4a4b-eeb9-4827-8b65-ff590ed52db7-000000@email.amazonses.com> <793be10da43c4958aa7565dd8c29f16c@huawei.com> <01000187b44d8d21-e4a75567-8418-490f-96c3-138d14ce7863-000000@email.amazonses.com> <99740295af9146d188e523ab43705dcf@huawei.com>
X-Mailer: Apple Mail (2.3731.400.51.1.1)
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2023.04.26-54.240.48.90
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/lT3o-b8baoqQac3fPUUcX5CL81k>
Subject: Re: [netmod] Comments on draft-ma-netmod-immutable-flag-06
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Apr 2023 15:39:28 -0000
Hi Qiufang, > I think that it is undesirable to support the "with-immutable" request parameter on non-configuration datastores. The reason why is that I believe the "with-origin" flag is more useful. If the "origin" is "system", then immutability is "true". > Is this true: If the “origin” is “system”, then immutability is “true”? > What if a system-defined node present in <operational> is actually modifiable, i.e., allowing a client to write a different value in <running> that overrides the one defined in <system>? If the "node present in <operational> is actually modifiable", then I surmise that it is NOT "immutable". I believe that what you are describing is a normal (not immutable) "config true" node that happens to have an initial value set by the system, which could be seen in <operational> using NMDA, perhaps having origin equal to "default", "learned", or "system". Hmmm, I may need to backtrack on the `If the "origin" is "system", then immutability is "true"` statement. Or rather, we may want to revisit the contents of <system>. I understand wanting <system> defining fixed interfaces (e.g., loopback), but maybe <system> *should not* define dynamically-generated configuration that is already visible in <operational>. AFAICT, there isn't a need for <system> to contain *all* origin=system data, just the subset that is "config true" and, even then, maybe less. Thoughts? I guess I don't understand this example in the "system-config" draft: https://datatracker.ietf.org/doc/html/draft-ietf-netmod-system-config#section-6.2. > The reason why I am thinking it might be useful for non-configuration datastores to return immutable flag is that, I think a client may want to know if it has the ability to change a value before it actually changes it (writes into configuration datastore). If that immutable flag doesn’t return until it is copied into configuration datastores(e.g., <running>), that would be awkward. Understood. It is indeed the goal for clients to use the "immutable" information to avoid knowably-invalid configurations. > PS: there's an open-question as to if "with-immutable" also returns the "immutable" flag for nodes described as immutable in the YANG schema. I think that the flags should be returned for all nodes regardless by default so that there is single source of truth. That said, I'm open to the idea of the "with-immutable" parameter taking an argument specifying how much to return. > Yes, agree that this should be an open question. The current document doesn’t ask the server to return immutable flag for immutable nodes specified at schema-level, but that would cause the client to query both schema and instance data to obtain its real immutability. Thanks for tracking it. > The "client creates a node instance but cannot modify that afterwards" (unless the parent is deleted?) case seems to be exactly the non-transactional example we are trying to avoid, agreed? This definition (#1) essentially guarantees transactionality, since there is nothing clients can do to alter what the system considers immutable. A node is immutable if and only if system-defined. > I guess I don’t agree your last sentence. I don’t think all system-defined nodes are immutable, they do have a distinction between modifiable system configuration and non-modifiable system configuration. I didn't write that all system-defined nodes are immutable. I wrote that all immutable-nodes are system-defined. There's a difference. I'm very much trying to assert that "immutable" data is life-cycled (created/changed/deleted) only by the server; a client can never create/change/delete immutable data. At best a client can make immutable-data visible in <running>, but they would only do that in order to, e.g, configure a mutable descendant (e.g., an interface's "description" or MTU) or, e.g., to reference it in a "must" or "when" expression. That said, I do agree with your statement "I don’t think all system-defined nodes are immutable". But, as I wrote at top above, the nodes should not be flagged as "immutable" (nor show up in <system>). For such "config true" nodes that are given an initial (perhaps "default") value, it seems that the existing practice of reading the operational value from <operational> prevails. > A temporal nature is at play here. > > 1) when the client sets the config when the card is installed, the system can fail the request if it affects any "immutable" nodes (non-matching values). [PS: it is assumed that, for this case, the metadata annotation (not the YANG extension), would be used.] > > 2) However, if the card is not installed, the client could put non-matching values for the "immutable" parts, and the server would have no way to validate it, and hence the server would, presumably, allow the update to <running>. When the card is later installed, the interface would appear in <operational>, and <system> if supported. At that time the non-matching value would be discovered. Presumably the system would 1) ignore the non-matching config from <running>, 2) send an alert that <running> is invalid, and 3) force the next commit to <running> to correct the non-matching values. > > Is this what you are focusing on? > I agree with your statement here. Since a server may allow the client to update an interface type value because it has no way to validate that, and also because it is just when the interface is installed that it will flag interface type as immutable, this still doesn’t seem to go against with your definition “only system can create/update/delete immutable configuration”. Jürgen raised another possibility which I also agree, but I believe that server behavior of internally regarding this value as immutable is consistent with most existing vendor implementations now. > While from the client’s perspective, it can always delete immutable configuration from read-write configuration datastore, that is just to make immutable nodes invisible according to your interpretation and will not really delete the configuration from the device. Yes, this seems right. > I disagree that only terminal nodes should be immutable. For starters, consider an immutable presence container. > > Also, with JUNOS's immutable list of "applications" that are referenced by security policies, there are hundreds of them. Surely the entire list should be marked as immutable in the schema. > Sure, we can keep going with leaf, leaf-list, container, list, anyxml and anydata statement in support of immutable flag. Thanks for tracking this. > I stand corrected. Please see above regarding RFC 7952 JSON encoding for leaf-list. This being the case, I would rewrite this definition as: > > When a "leaf-list" node (element) is immutable: > > - the value, for each element in the leaf-list, cannot change. > > - it is not possible to designate the leaf-list as a > whole as immutable, because the leaf-list itself > doesn't exist as a node in the data-tree (and hence > cannot be flagged as "immutable" in the response > to a "with-immutable" request. > > - If it is desired to communicate that list-entries > cannot be added/removed by clients, this is already > the case as the leaf-list's `key` node(s) is immutable > (i.e., clients cannot make up their own key values). > Does this mean that if all the leaf-list instances are flagged as “immutable” in the response to a “with-immutable” request, it already conveys that new leaf-list entries cannot be added? No, unfortunately, the "with-immutable” response alone cannot convey if the the entire list is immutable, only the schema-level extension can do that it seems. This because the list as whole is not a node in the data tree. > I understand the desire. My concern is that the `list` and `leaf-list` YANG nodes themselves do not exist in the data tree. For example, in XML no parent-node exists and, in JSON, no metadata can be conveyed at that level. Thus I'm hoping that all semantics can be conveyed in the "with-immutable" response, without the client having to also consult the YANG. Maybe it's not worth it (i.e., XC/Y demands YANG-awareness) and your understanding prevails. Either way is okay. > Okay, I understand it now. That way, your consideration makes sense to me. > If it is desired to communicated that list-entries cannot be added/removed by clients, do we need the key instance(s) of all list entries to be marked with immutable=true (that might be a huge data volume)? Or only a particular one, such as the key node(s) in the first entry? I think that this question is related to, or at least answered by, my previous response. > - if it is desired to communicate that a list-entries cannot > by reordered, the list must be "ordered-by system". > Corollary: an "ordered-by user" list is never immutable. > By the way, if a specific list instance is specified as immutable at instance-level, can a user create a descendant node instance inside that list instance? > > Yes, if the schema for the descendent node toggles "immutable" to "false" using the YANG-base extension - makes sense? > But what if the descendant node doesn’t use the YANG extension to toggle “immutable” to “false”? It inherits the immutability of its parent node which is immutable=true if not otherwise specified. > According to our definition above, immutable configuration can only be system-defined, thus a server will reject a descendant node instance to be created by the client? Right? I'm confused. Why wouldn't the mutable descendant be "immutable false" in the schema? I'm assuming that you're focusing on the case of a mutable-descendent of an immutable-node. Yes? > Best Regards, > Qiufang K.
- [netmod] Comments on draft-ma-netmod-immutable-fl… Jan Lindblad (jlindbla)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Rob Wilton (rwilton)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Rob Wilton (rwilton)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… maqiufang (A)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Jan Lindblad (jlindbla)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… maqiufang (A)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… maqiufang (A)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Jürgen Schönwälder
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Jürgen Schönwälder
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Jürgen Schönwälder
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Andy Bierman
- [netmod] 答复: Comments on draft-ma-netmod-immutabl… Fengchong (frank)
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… maqiufang (A)
- Re: [netmod] 答复: Comments on draft-ma-netmod-immu… Jürgen Schönwälder
- [netmod] 答复: 答复: Comments on draft-ma-netmod-immu… Fengchong (frank)
- Re: [netmod] 答复: 答复: Comments on draft-ma-netmod-… Jürgen Schönwälder
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Jürgen Schönwälder
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Jürgen Schönwälder
- Re: [netmod] Comments on draft-ma-netmod-immutabl… Kent Watsen