Re: [netmod] Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05

Italo Busi <> Mon, 20 June 2022 13:53 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 164ADC15AAC6; Mon, 20 Jun 2022 06:53:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.809
X-Spam-Status: No, score=-1.809 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id i-nr9oy9c80e; Mon, 20 Jun 2022 06:53:06 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8F0A2C15AAC5; Mon, 20 Jun 2022 06:53:05 -0700 (PDT)
Received: from (unknown []) by (SkyGuard) with ESMTP id 4LRWLK1S7fz67n9K; Mon, 20 Jun 2022 21:52:41 +0800 (CST)
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 20 Jun 2022 15:53:01 +0200
Received: from ([]) by ([]) with mapi id 15.01.2375.024; Mon, 20 Jun 2022 15:53:01 +0200
From: Italo Busi <>
To: Scott Mansfield <>, "Sterne, Jason (Nokia - CA/Ottawa)" <>, "" <>
CC: "''" <>
Thread-Topic: Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05
Thread-Index: Adh2AX6nfZwD+XITTPiHGgPWsoHa5gAwYxVgAC3h+6AAndqS0ADDQdNgAerI3gA=
Date: Mon, 20 Jun 2022 13:53:01 +0000
Message-ID: <>
References: <> <> <> <> <>
In-Reply-To: <>
Accept-Language: it-IT, en-US
Content-Language: en-US
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_e65bbdb4ce8a4d5bb149e4b8bdeb4fa7huaweicom_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <>
Subject: Re: [netmod] Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 20 Jun 2022 13:53:10 -0000

Jason, Scott,

Thanks for the follow-up

I understand that the impact on the schema path is causing the change to be NBC, even if the impact on existing clients is minimal, and therefore the guidance in appendix B.2 should be updated accordingly

However, as far as I can understand section 11 of RFC7951, removing the mandatory statement from an existing leaf is considered a BC change:

   o  A "mandatory" statement may be removed or changed from "true" to

Therefore, it seems that a BC alternative option, pending some clarification based on WG LC comments, is to add a when statement, as described in appendix B.2:

      container rlt-mode {
        when "not(../mode)";
        leaf num-bonded-carriers {
          type uint32;
          mandatory true;
        leaf num-protecting-carriers {
          type uint32;
          mandatory true;

In this way, it is possible to indicate that the new leaf nodes are mandatory only when the old leaf node is not present

An alternative possibility that has just jumped into my mind, is to allow both old and new leaves to be reported (at least in the operational data store), by adding a must statement instead of a when statement:

      container rlt-mode {
        must "../mode or ./num-bonded-carriers";
        leaf num-bonded-carriers {
          type uint32;
        leaf num-protecting-carriers {
          when ../num-bonded-carriers;
          type uint32;
          mandatory true;

In this case, when both old and new leaves are present, some consistency has to be provided to avoid inconsistent information

What do you think/suggest?

Could these (or one of these) options be considered a BC change?

Thanks, Italo

From: Scott Mansfield <>
Sent: venerdì 10 giugno 2022 21:36
To: Sterne, Jason (Nokia - CA/Ottawa) <>; Italo Busi <>;
Cc: '' <>
Subject: RE: Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05

I don't want to re-litigate what backward compatible means.

In my case...

I have two modules:  Module A and Module A'

I have instance data that works with module A and also with module A'  (so the new yang will support my current configuration).
When I leverage the new capabilities of module A', I can start from my instances made for Module A and just add the stuff, that instance file will only work if Module A' is supported (obviously).

But that has nothing to do with whether or not the YANG itself is considered BC or NBC.

If mandatory is added, I understand that would be NBC, because there could be working instance data that now no longer works because it is missing a mandatory leaf.  I also see the issue you bring up with the tree changing depending on where the choice is used.

I think the exercise is to just get used to the terminology, and the draft does a good job of clearly pointing out when something needs to be marked NBC.


From: Sterne, Jason (Nokia - CA/Ottawa) <<>>
Sent: Monday, June 6, 2022 6:56 PM
To: Scott Mansfield <<>>; italo.busi <<>>;<>
Cc: '' <<>>
Subject: RE: Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05

Another reason just occurred to me why moving the old leaf inside a "choice" is NBC: it may not affect the data tree path to that element of instance data, but it does affect the schema path to that element.

So if it was a container, for example, and some other module was augmenting that container, the augmentation path would be broken if it was moved inside a choice.  I'm not certain that maintaining compatibility with an augmenting module is a fundamental criteria but it certain is an impact to an ecosystem of modules.

Of course all the above is for a fairly "strict" manner of defining backwards compatibility. The actual impacts to a client of moving an old leaf into a new "choice" (where other cases of the choice contain purely new elements that didn't exist before) are often going to be minor to nothing. But the users of the module would need to take a look at it.

This discussion is also making me realize that our text in B.2.3.1 may have a mistake. An author can't stick the old leaf into a "choice" and be 100% BC so we should probably remove that option.


From: Scott Mansfield <<>>
Sent: Friday, June 3, 2022 3:06 PM
To: Sterne, Jason (Nokia - CA/Ottawa) <<>>; italo.busi <<>>;<>
Cc: '' <<>>
Subject: RE: Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05

So basically, deprecating a leaf and adding a new leaf/container that replaces the deprecated leaf will always be NBC.

Still the guidance in B.2 has the least impact and is easy to explain, and has the added benefit that the tree doesn't change and existing (old schema) instance data will work with the new schema.


From: CCAMP <<>> On Behalf Of Sterne, Jason (Nokia - CA/Ottawa)
Sent: Thursday, June 2, 2022 5:03 PM
To: Italo Busi <<>>;<>
Cc: '' <<>>
Subject: Re: [CCAMP] Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05

Hi Italo,

One problem I see with this change is that in the old data model, the leaf "mode" had to exist in the instance data. But with the new model, it is valid to have instance data with no "mode" leaf at all. That instance data would not validate against the old YANG model.

I do see your point that any valid data that could be generated using the old model is still accepted in the new model. But for the YANG versioning work we've been pretty hesitant to diverge far from RFC 7950 for the list of what is NBC vs BC (mainly just cleanup of the status deprecated & obsolete), and clarifying

There are other possible cases that might meet a definition of "any old config would be accepted by the new model" but we still don't label them as BC in our YANG versioning work, e.g.:
- moving a pre-existing leaf into a new choice along with new elements in other cases (like yours below but without any additional complications of "mandatory" statements)
- changing the type of a uint8 to a union of uint8 and other types


From: netmod <<>> On Behalf Of Italo Busi
Sent: Wednesday, June 1, 2022 6:07 PM
Cc: '' <<>>
Subject: [netmod] Another comment/question on appendix B.2 of draft-ietf-netmod-yang-module-versioning-05

The example (in particular in point 3.1), assumes that it is possible to put the old deprecated leaf and the new leaf within a choice to ensure that the new node is not used when the old node is used

In the context of an update to RFC8561 (-00 I-D still under preparation) we have found a similar care where the choice could also be beneficial to express the requirement that the new node is mandatory when the old node is not used (in other words either the old node or the new node MUST be configured)

You can find a simplified example of the change we were considering here:<>

The original (using the old style mode) is in mw-option@2022-04-01.yang<mailto:mw-option@2022-04-01.yang>. the new version of mode (rlt-mode) is in mw-option@2022-05-26.yang<mailto:mw-option@2022-05-26.yang>

However, when we use pyang to check backward compatibility we get an error message (see the nbc.out file in github):

mw-option@2022-05-26.yang:47<mailto:mw-option@2022-05-26.yang:47>: error: the leaf 'mode', defined at mw-option@2022-04-01.yang:40<mailto:mw-option@2022-04-01.yang:40> is illegally removed

mw-option@2022-05-26.yang:50<mailto:mw-option@2022-05-26.yang:50>: error: the mandatory node mode-option is illegally added

However, we have checked that the xml file mw-option.xml, which uses the deprecated style of mode, works fine also with the new mw-option@2022-05-26.yang<mailto:mw-option@2022-05-26.yang>. We therefore think this type of change can be considered backward compatible since an old client would not break when trying to configure a new server which implements the deprecated node

We are therefore not sure whether this is a tooling issue or a specification issue

Reviewing clause 11 of RFC7950 and draft-ietf-netmod-yang-module-versioning-05, it seems that moving an existing leaf under a choice is not listed as a backward compatible change

We are wondering whether draft-ietf-netmod-yang-module-versioning-05 could clarify that this type of change can be considered backward compatible

We would appreciated any clarification by Netmod WG expert about whether this change can be considered backward compatible or not

Thanks, Italo (on behalf of co-authors working on a new I-D for updating RFC8561)