Re: [netmod] Unknown bits - backwards compatibility

Jeff Haas <jhaas@pfrc.org> Thu, 29 June 2023 08:23 UTC

Return-Path: <jhaas@pfrc.org>
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 9AAC8C151531 for <netmod@ietfa.amsl.com>; Thu, 29 Jun 2023 01:23:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
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 Ze4CYARIKJfV for <netmod@ietfa.amsl.com>; Thu, 29 Jun 2023 01:23:43 -0700 (PDT)
Received: from slice.pfrc.org (slice.pfrc.org [67.207.130.108]) by ietfa.amsl.com (Postfix) with ESMTP id 575BEC15109F for <netmod@ietf.org>; Thu, 29 Jun 2023 01:23:42 -0700 (PDT)
Received: from smtpclient.apple (unknown [80.233.44.245]) by slice.pfrc.org (Postfix) with ESMTPSA id E867F1E039; Thu, 29 Jun 2023 04:23:41 -0400 (EDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-06A055C5-3F25-4726-8986-708C0A0CE136"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
From: Jeff Haas <jhaas@pfrc.org>
In-Reply-To: <0100018903aeac62-b2f1cc38-1975-4d78-bb80-83b46c50a750-000000@email.amazonses.com>
Date: Thu, 29 Jun 2023 04:23:40 -0400
Cc: "Rob Wilton (rwilton)" <rwilton=40cisco.com@dmarc.ietf.org>, Italo Busi <Italo.Busi=40huawei.com@dmarc.ietf.org>, "Jason Sterne (Nokia)" <jason.sterne@nokia.com>, netmod@ietf.org
Message-Id: <490E391C-707D-45CB-B062-E3B9277E9B36@pfrc.org>
References: <0100018903aeac62-b2f1cc38-1975-4d78-bb80-83b46c50a750-000000@email.amazonses.com>
To: Kent Watsen <kent+ietf@watsen.net>
X-Mailer: iPad Mail (19G82)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/G8aJ4f0zzMKUqfuj5sCR4uCjpYQ>
Subject: Re: [netmod] Unknown bits - backwards compatibility
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: Thu, 29 Jun 2023 08:23:47 -0000

Kent,


> On Jun 28, 2023, at 4:25 PM, Kent Watsen <kent+ietf@watsen.net> wrote:
> I’ve been hoping you would reply to some of the comments here before kicking off the WGLC.

I hadn’t realized that your intent was to skip directly to WGLC, unless this was a typo.  Most WG process I deal with goes through at least a thin adoption stage even if the intent is to move forward swiftly to last call.

>  Specifically, I’m wondering if it makes sense to add a new section to provide guidance to implementors?   I’m unsure myself, as the concerns raised seem to be addressed by YANG Library, in that clients should use it to detect if the server is using a newer revision of modules than the client groks.

As Jason notes in his reply, I’m unclear what YANG library may do to help this situation.

I’m certainly fine adding an additional section to the draft discussing that unknown bits may “disappear” during maintenance as previously unknown bits become defined.

> 
> One new comment: the "unknown-bits” typedef's description statement seems unclear in terms of the expected reconciliation process.
> 
> Current:
>       "Typedef describing 64 bits worth of unknown bits.  This can be
>        used to model operational state that would normally be modeled
>        using the YANG 'bits' type, but no registered bit has been
>        created.”;
> 
> Proposed:
> 
>       "Typedef describing 64 bits worth of unknown bits.  This can be
>        used to model operational state that would normally be modeled
>        using the YANG 'bits' type, but no registered bit has been
>        defined in the YANG module implemented by the server.”;
> 

I’m fine making this change.

— Jeff


> Thoughts?
> 
> K.
> 
> 
> 
>> On May 23, 2023, at 11:59 AM, Rob Wilton (rwilton) <rwilton=40cisco.com@dmarc.ietf.org> wrote:
>> 
>> I was looking at this draft again, and since I had read the -02 version of the draft I thought that I would send the comments here.
>> 
>> My no hats view here (looking at the latest draft) is:
>> documenting something here is probably helpful because this is an issue that folks are experiencing and providing written guidance on how to handle it helpful to the YANG modelling community.
>> having such a document update RFC 8407 would probably be helpful (to help YANG authors find it),
>> but I’m concerned that the proposed solution is not backwards compatible at the instance data level.  E.g., an old client talking to a new server would still hit a problem if the server changed from sending an unknown "bit-<x>" to a known bit (defined in a backards-compatible module update), and if the old client doesn't know/understand the now known bit (because they are still coded against the older module version), then the client may break.  This makes me think that there is going to be some subtleties around when it is safe to not send an unknown bit, hence my suggestion was to call it just “bits” (which is already in -02) and *always sending* this leaf may be a more backwards compatible choice.  It isn’t clear to me, for the “all bits” leaf, whether sending this as a raw uint8 – uint64, or binary, and doing the decode on the client side (if required) might be a better choice than sending them as a generic bits type.
>> 
>> Regards,
>> Rob
>>  
>> From: netmod <netmod-bounces@ietf.org> On Behalf Of Italo Busi
>> Sent: 14 April 2023 09:05
>> To: Jason Sterne (Nokia) <jason.sterne@nokia.com>; Jeffrey Haas <jhaas@pfrc.org>; netmod@ietf.org
>> Subject: Re: [netmod] Unknown bits - backwards compatibility
>>  
>> Jason, Jeffrey,
>>  
>> If the need is to report the value of a received protocol field for debugging/troubleshooting purposes, I am wondering why not using a binary type instead of a bits type or, better, a YANG leaf of bits type for the known bits and another YANG leaf of binary type for all known/unknown bits
>>  
>> Trailing zeros can be added when the protocol field is not an integer number of octets
>>  
>> In this way there will be no backward compatibility issues when unknown bits are assigned and becomes known
>>  
>> My 2 cents
>>  
>> Italo
>>  
>> From: Jason Sterne (Nokia) <jason.sterne@nokia.com> 
>> Sent: mercoledì 12 aprile 2023 23:26
>> To: Jason Sterne (Nokia) <jason.sterne@nokia.com>; Jeffrey Haas <jhaas@pfrc.org>; netmod@ietf.org
>> Subject: Re: [netmod] Unknown bits - backwards compatibility
>>  
>> It just occurred to me that to avoid the NBC change we could also consider just calling this new typedef “raw-bits” and always outputting all the bits in the second leaf (whether they are known or not)?  I suspect this was already considered though…
>>  
>> Jason
>>  
>> From: netmod <netmod-bounces@ietf.org> On Behalf Of Jason Sterne (Nokia)
>> Sent: Wednesday, April 12, 2023 5:24 PM
>> To: Jeffrey Haas <jhaas@pfrc.org>; netmod@ietf.org
>> Subject: [netmod] Unknown bits - backwards compatibility
>>  
>> Hi Jeff,
>>  
>> One topic that came up during the IETF 116 NETMOD meeting was backwards compatibility.
>>  
>> From what I understand, a leaf (e.g. unknown-flags) that uses the unknown-bits typedef would never change its definition in YANG. It would always be defined as unknown-bits with all 64 bit definitions even as more and more bits become “known”.  *But* the system would suddenly stop reporting bit-0, then bit-1 in that unknown-flags leaf as those bits become known.
>>  
>> Strictly speaking, that should probably be considered an NBC change although it is a bit of a grey zone - the NBC rules for state are fuzzy (theoretically they are defined by RFC7950 but it is clear those rules were focused on config, and the same goes for all our new versioning work). But I could imagine an implementation that was previously seeing bit-0 returned and suddenly stops seeing that bit-0 returned (which could cause different interpretation/behavior). So in some ways the semantics of the unknown-flags leaf has changed. It may be better to just flag this as an NBC change so a user would be drawn to look at it, and make a decision that they do or don’t have to update their handling/use of it?
>>  
>> The known flags leaf would only go through backwards compatible changes though (since we’d always be additive in adding bits) – assuming bit positions don’t change in the protocol.
>>  
>> It would probably help to show an example of what a YANG module looks like for step 1 and then step 2 (an unknown becomes known), and also what is returned in NETCONF in step 1 and step 2. You partially have that in section 3.2 although the YANG model isn’t shown and it might be good to explicitly mention that <unknown-flags> isn’t returned (note it may also be valid to return <unknown-flags></unknown-flags>).
>>  
>> Jason
>>  
>>  
>> From: netmod <netmod-bounces@ietf.org> On Behalf Of Jeffrey Haas
>> Sent: Monday, April 10, 2023 2:48 PM
>> To: netmod@ietf.org
>> Subject: Re: [netmod] Request for WG adoption, draft-haas-netmod-unknown-bits-01.txt
>>  
>>  
>> CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. Seehttp://nok.it/ext for additional information.
>>  
>> 
>> Netmod Working Group, 
>>  
>> The presentation at IETF 116 on the YANG unknown bits typedef seemed to be positively received.
>>  
>> I've updated the draft in version -02 to incorporate a hallway suggestion (from Rob, I think?) to rename the bits from a pattern of "unknown-N" to "bit-N".  Please find the information for the updated draft pasted below my original request for adoption.
>>  
>> Having given my presentation and seeing there seems to be interest in the work, could we consider adoption?
>>  
>> -- Jeff
>>  
>>  
>>  
>>  
>> 
>> On Feb 20, 2023, at 1:23 PM, Jeffrey Haas <jhaas@pfrc.org> wrote:
>>  
>> The current version of this small draft has addressed the discussion points to date.
>>  
>> I'd like to request that the netmod WG consider adopting this draft.  Alternatively, if it's thought useful but more appropriate to carry this work on elsewhere (e.g. rtgwg), I'd appreciate such feedback.
>>  
>> For the process folk, I am unaware of any applicable IPR covering this draft.
>>  
>> -- Jeff
>>  
>>  
>> Name:  draft-haas-netmod-unknown-bits
>> Revision: 02
>> Title: Representing Unknown YANG bits in Operational State
>> Document date: 2023-04-10
>> Group: Individual Submission
>> Pages: 18
>> URL:            https://www.ietf.org/archive/id/draft-haas-netmod-unknown-bits-02.txt
>> Status:         https://datatracker.ietf.org/doc/draft-haas-netmod-unknown-bits/
>> Html:           https://www.ietf.org/archive/id/draft-haas-netmod-unknown-bits-02.html
>> Htmlized:       https://datatracker.ietf.org/doc/html/draft-haas-netmod-unknown-bits
>> Diff:           https://author-tools.ietf.org/iddiff?url2=draft-haas-netmod-unknown-bits-02
>> 
>> Abstract:
>>   Protocols frequently have fields where the contents are a series of
>>   bits that have specific meaning.  When modeling operational state for
>>   such protocols in YANG, the 'bits' YANG built-in type is a natural
>>   method for modeling such fields.  The YANG 'bits' built-in type is
>>   best suited when the meaning of a bit assignment is clear.
>> 
>>   When bits that are currently RESERVED or otherwise unassigned by the
>>   protocol are received, being able to model them is necessary in YANG
>>   operational models.  This cannot be done using the YANG 'bits' built-
>>   in type without assigning them a name.  However, YANG versioning
>>   rules do not permit renaming of named bits.
>> 
>>   This draft proposes a methodology to represent unknown bits in YANG
>>   operational models and creates a YANG typedef to assist in uniformly
>>   naming such unknown bits.
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod
>