Re: [netmod] convert it and not throw an error was Re: 6021 ipv4-prefix

Christian Hopps <chopps@chopps.org> Fri, 03 May 2019 19:24 UTC

Return-Path: <chopps@chopps.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 A78681202EA for <netmod@ietfa.amsl.com>; Fri, 3 May 2019 12:24:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lzFp-gT0NiAn for <netmod@ietfa.amsl.com>; Fri, 3 May 2019 12:24:54 -0700 (PDT)
Received: from smtp.chopps.org (smtp.chopps.org [54.88.81.56]) by ietfa.amsl.com (Postfix) with ESMTP id 16F261202DA for <netmod@ietf.org>; Fri, 3 May 2019 12:24:54 -0700 (PDT)
Received: from stubbs.int.chopps.org (047-050-069-038.biz.spectrum.com [47.50.69.38]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by smtp.chopps.org (Postfix) with ESMTPSA id ACFD26019B; Fri, 3 May 2019 15:24:52 -0400 (EDT)
From: Christian Hopps <chopps@chopps.org>
Message-Id: <5DD64859-91A0-4B28-9FA9-F641AC130F3E@chopps.org>
Content-Type: multipart/signed; boundary="Apple-Mail=_B2BE1C70-C824-420E-8809-89F47EBC2BE2"; protocol="application/pgp-signature"; micalg=pgp-sha512
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\))
Date: Fri, 3 May 2019 15:24:51 -0400
In-Reply-To: <001201d501a8$63839940$4001a8c0@gateway.2wire.net>
Cc: Christian Hopps <chopps@chopps.org>, Mikael Abrahamsson <swmike@swm.pp.se>, Randy Presuhn <randy_presuhn@alumni.stanford.edu>, "netmod@ietf.org" <netmod@ietf.org>
To: tom petch <ietfc@btconnect.com>
References: <0c4265d31adbf208a680f76216cc4bc42c766eae.camel@nic.cz> <959ed1a8092f4798ac0b923384962049@XCH-RCD-007.cisco.com> <20190429153643.oxfcq7ze6ttdihb4@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1904300713100.3490@uplift.swm.pp.se> <20190430061737.vvxghxyacd57k73i@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1904301038570.3490@uplift.swm.pp.se> <20190430090905.qsa3r4dwauilsxur@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1905011051160.1824@uplift.swm.pp.se> <20190501111712.347bpz26br6ox3jp@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1905011456580.1824@uplift.swm.pp.se> <20190501155321.v4qz6twsom45y62f@anna.jacobs.jacobs-university.de> <alpine.DEB.2.20.1905012137310.1824@uplift.swm.pp.se> <5CCA58DA.3030801@alumni.stanford.edu> <alpine.DEB.2.20.1905021330140.1824@uplift.swm.pp.se> <001201d501a8$63839940$4001a8c0@gateway.2wire.net>
X-Mailer: Apple Mail (2.3445.104.8)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/b1uptZifuirRSf9lc-W9dhs2Fgc>
Subject: Re: [netmod] convert it and not throw an error was Re: 6021 ipv4-prefix
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 03 May 2019 19:25:02 -0000


> On May 3, 2019, at 8:08 AM, tom petch <ietfc@btconnect.com> wrote:
> 
> ----- Original Message -----
> From: "Mikael Abrahamsson" <swmike@swm.pp.se>
> To: "Randy Presuhn" <randy_presuhn@alumni.stanford.edu>
> Cc: <netmod@ietf.org>
> Sent: Thursday, May 02, 2019 12:35 PM
> 
>> On Wed, 1 May 2019, Randy Presuhn wrote:
>> 
>>> Hi -
>>> 
>>> On 5/1/2019 12:46 PM, Mikael Abrahamsson wrote:
>>> ....
>>>> Where is the text that tells the server implementor whether to
> throw an
>>>> error when client commits non-zero bits, or to just throw the bits
> away
>>>> and store the value in the canonical format?
>>> 
>>> Such text would be an inappropriate constraint the server's
>>> internal representation.  We should only specify
>>> the externally-visible behaviour: that the reported value
>>> will be in the canonical format.  Whether an implementation
>>> preserves extraneous cruft in its internal representation is
>>> purely an implementation decision, and not subject to
> standardization.
>> 
>> I am talking about what goes on the wire. If the client does an
>> edit-config with ipv6-prefix 2001:db8::1/64, should the server convert
>> this into 2001:db8::/64 or throw an error on the edit-config
> operation.
>> 
>> Jurgen seems to say it should convert it and not throw an error, and
> I'd
>> like text to say that indeed, this is proper behaviour. Nobody has so
> far
>> been able to tell me where this text currently is, so that's why I'm
>> asking for it to be added. Either this should go into an update to
>> https://tools.ietf.org/html/rfc7950#section-9.1 or it should go into
> each
>> and every definition of types (or both of them).
> 
> Mikael
> 
> How about RFC791, still much quoted in all aspects of the work of the
> IETF?
> 
> " In general, an implementation must be conservative
>  in its sending behavior, and liberal in its receiving behavior.  That
>  is, it must be careful to send well-formed datagrams, but must accept
>  any datagram that it can interpret (e.g., not object to technical
>  errors where the meaning is still clear)."
> 
> We did not have MUST in those days, but had we, this would have been one
> IMHO.


So, this is a good opportunity to mention what has bothered me during this discussion.

Let's for a moment leave aside the "standards language" etc part, and instead consider "What's actually useful for people who try and run networks."

NETCONF and YANG have the concept of validating configuration, this is very useful for users. In a previous job I incorrectly started out to use ipv4-prefix in a model where I really wanted an ipv4-address-and-prefix (i.e., an interface context). Now consider the reverse case then where the model really expects a prefix only, and the user for some reason thinks it will accept and can make use of an "address-and-prefix". The most obvious indication that the user has got this wrong is that they have host bits set. So if the server accepts the value but silently discards the host bits the error is not caught and the user and server probably have different ideas about what's going to happen.

IOW, I don't think "where the meaning is still clear" applies to stripping host bits from a value, in fact I think it's more clear that stripping the host bits is actually ignoring (getting wrong) the user intent.

Thanks,
Chris.

> 
> Tom Petch