Re: [netmod] [Technical Errata Reported] RFC7950 (6031)

Martin Björklund <mbj+ietf@4668.se> Mon, 06 April 2020 11:38 UTC

Return-Path: <mbj+ietf@4668.se>
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 F27473A0F40 for <netmod@ietfa.amsl.com>; Mon, 6 Apr 2020 04:38:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.101
X-Spam-Level:
X-Spam-Status: No, score=-0.101 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, PDS_NAKED_TO_NUMERO=1.999, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=xKcufYjG; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=u/hue9HI
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 oToIQqqjl5ge for <netmod@ietfa.amsl.com>; Mon, 6 Apr 2020 04:38:11 -0700 (PDT)
Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 26A743A0F3E for <netmod@ietf.org>; Mon, 6 Apr 2020 04:38:11 -0700 (PDT)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id BFFC7E0E; Mon, 6 Apr 2020 07:38:08 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 06 Apr 2020 07:38:09 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= F8v/HsaTThxs60qzL0shd6poZO1E06ujcYF4pkw+Br4=; b=xKcufYjGHq7+oS1z t2taHcPmUpioGmJezGuQlwvm+hxYDEqqj2Igr3Qh4/sqjAosTNBrEisvMeNEbveQ 0BkJ81r8B/v8xNPMAl/Mxdbu4LbCjA60TwQQ8F3S53PQ8MdpfhrhvGe8Ly98aFTR jpud1vKyNkmsUF9cdAmiEY2MBR/Gnx+JYX+aNBvC49+2/kZTxALtxZZAJ1bMlRNC EzlpoiwasRpIF/pBrk9Mjfjx4V3Pyq+W0eB7Q0A6+7mPCvESRJJUeaI3YDxYoUEj bQL02T1cxREG2X1H5Nn4ORzYMByidV1Xu6QWBPNNbjKy3baH2vK6bKaHdej/HITX 00uXyA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=F8v/HsaTThxs60qzL0shd6poZO1E06ujcYF4pkw+B r4=; b=u/hue9HIVCoPCexrOhYzW2LQEhZRZ/pGaIUgFiLvBACjWswFkisbw+w0j +RSqcOUjxbG3GuW2+G2lc02elCjDyfcIQYJtGQwOscI02ykWSMNSp4kAd7XfjCJQ lJRE+Vn50tpq2sf5vnRjACvwdQVszC0sRVrgPvZewTN2mkg76v/4h5+ykqu+epHl cR1UKoUnm1hqbiEI/bpSemx+CQyREjSpybimR/p/YthaTbRWI+J+I5XnOjDA11fq f9JQByQ1CUfQhh9nSP4g51vFOIJz/hhoL6sHlPc/y++ytpkzqOQFGmx8VevaUOft kK24oLelJyDrcV3nvGEKVJRilj/qg==
X-ME-Sender: <xms:nxSLXlAFVONzzDbkbuc3Kwj_rPwDHJlEL_qtbL6ddPy_4n-5rTgTKw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudefgdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffkvffuhfgjfhfogggtgfesthhqre dtredtudenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdoihgv thhfseegieeikedrshgvqeenucfkphepudehkedrudejgedrgedrgeegnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgsjhdoihgvthhfseeg ieeikedrshgv
X-ME-Proxy: <xmx:nxSLXvfhkNb5aImxArH2xaytp42vn-dRGxAu1yydiGM7P_5U3wGilA> <xmx:nxSLXmu8Scu8JEm54OHNziRnvCl7dgzruk_cGhMS3JJDr48lvER06g> <xmx:nxSLXmI092yMc0GZGMEYiVgV3Gsmvb6QIGRc7pLHXVpgy9n1kQ4A2Q> <xmx:oBSLXnsQK0QQdfYYRC9V-xkvBYOMRW3LG3L-kbzxDfOCiXN4ibsPNg>
Received: from localhost (unknown [158.174.4.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 9E1B3306D3FE; Mon, 6 Apr 2020 07:38:06 -0400 (EDT)
Date: Mon, 06 Apr 2020 13:38:05 +0200 (CEST)
Message-Id: <20200406.133805.1967759410136484672.id@4668.se>
To: j.schoenwaelder@jacobs-university.de
Cc: rkrejci@cesnet.cz, netmod@ietf.org, rwilton=40cisco.com@dmarc.ietf.org
From: Martin =?iso-8859-1?Q?Bj=F6rklund?= <mbj+ietf@4668.se>
In-Reply-To: <20200406074235.o6gkpjsim77xfzv7@anna.jacobs.jacobs-university.de>
References: <20200403165538.2lk4x5j32e3ctl4t@anna.jacobs.jacobs-university.de> <0a546588-6f87-3362-17da-37de8ea08956@cesnet.cz> <20200406074235.o6gkpjsim77xfzv7@anna.jacobs.jacobs-university.de>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/dRiVn-Hrv0y9et-Wpm6ZjGg6Z54>
Subject: Re: [netmod] [Technical Errata Reported] RFC7950 (6031)
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: Mon, 06 Apr 2020 11:38:13 -0000

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> On Mon, Apr 06, 2020 at 08:51:46AM +0200, Radek Krejci wrote:
> > Hi,
> > I just want to emphasis, what are the consequences of the option 1. This
> > way, the tools are allowed to not accept require-instance in derived
> > types, so actually schema authors SHOULD NOT use require-instance this
> > way. Since there is at least 1 YANG model in RFC (8639 and I would
> > expect more), which has require-instance in the derive type, errata will
> > be needed in this case(s).
> >
> 
> RFC 7950 says in 9.9.3:
> 
>   If this statement is not present, it defaults to "true".
> 
> This means that require-instance is 'on by default'. Hence, it is
> necessary to use what RFC 7950 calls a 'restriction' (9.9.1) to
> effectively _remove_ what seems like a restriction (or constraint).
> (This text apparently has already been in RFC 6020.)

I think the correct fix is to change the text so that
"require-instance" is not classified as a restriction and keep the
default.  Also, I think that it would be easiest (for backwards
compatibility w/ existing models) to allow "require-inetance" to be
changed in derived types.

However, this cannot imo be done in an errata.


/martin

> 
> The definition I found in RFC 8639 is this:
> 
>         leaf stream {
>           type stream-ref {
>             require-instance false;
>           }
>           mandatory true;
>           description
>             "Indicates the event stream to be considered for
>              this subscription.";
>         }
> 
> This could be changed to:
> 
>         leaf stream {
>           type leafref {
> 	    path "/sn:streams/sn:stream/sn:name";
>             require-instance false;
>           }
>           mandatory true;
>           description
>             "Indicates the event stream to be considered for
>              this subscription.";
>         }
> 
> What bothers me here is that I find the design of the default
> behaviour backwards. If the default would have been
> 
>   If this statement is not present, it defaults to "false".
> 
> then require-instance could be used to add a constraint in derived
> types but not to remove it (like the other type restrictions).
> 
> If people were to agree that the default here is wrong, can the
> problem be fixed?  Likely not since changing the default (even in say
> YANG 2.0) could have drastic consequences and would essentially
> require to be always explicit about the require-instance property to
> be on the safe side.
> 
> /js
> 
> > Regards,
> > Radek
> > 
> > 
> > Dne 03. 04. 20 v 18:55 Juergen Schoenwaelder napsal(a):
> > > I propose option 1) and add an issue on yang-next (if not already
> > > there yet).
> > >
> > > /js
> > >
> > > On Fri, Apr 03, 2020 at 04:24:35PM +0000, Rob Wilton (rwilton) wrote:
> > >> For the errata, it looks like there are two choices:
> > >>
> > >> 1) We reject this errata, on the grounds that it is unclear on what the behaviour was expected to be.  It is left unspecified as to whether require-instance is allowed in a typedef.  We add an issue on the YANG.Next issue tracker to sort this out in a future revision of YANG.
> > >>
> > >> 2) We agree on what the expected behaviour should be, in which case it may be possible that this can be "Hold for document update", although it still seems questionable whether this really fits as an errata.
> > >>
> > >> Regards,
> > >> Rob
> > >>  
> > >>
> > >>> -----Original Message-----
> > >>> From: netmod <netmod-bounces@ietf.org> On Behalf Of Ladislav Lhotka
> > >>> Sent: 03 April 2020 15:52
> > >>> To: netmod@ietf.org
> > >>> Subject: Re: [netmod] [Technical Errata Reported] RFC7950 (6031)
> > >>>
> > >>> On Fri, 2020-04-03 at 14:01 +0000, Sterne, Jason (Nokia - CA/Ottawa)
> > >>> wrote:
> > >>>> Hi Martin,
> > >>>>
> > >>>> I believe you that the technical "value space" doesn't change, but
> > >>>> that leaf would suddenly accept more values than it did before right?
> > >>>> I'm wondering if we want to follow the "spirit" here, or stick with the
> > >>> "value space" argument.
> > >>>
> > >>> I agree with Martin here. Moreover, if such a derived type is added, it
> > >>> doesn't change anything related to existing data, because they use the
> > >>> base type as before. New data nodes may use the new type but no confusion
> > >>> can arise - their type has "require-instance false", which is correct.
> > >>>
> > >>> Lada
> > >>>
> > >>>> I'm not really certain what the implications are (and maybe someone
> > >>>> has an example of why it is better to allow it?) but overwriting
> > >>>> require-instance with 'false' doesn't feel right.
> > >>>>
> > >>>> Jason
> > >>>>
> > >>>>> -----Original Message-----
> > >>>>> From: Martin Björklund <mbj+ietf@4668.se>
> > >>>>> Sent: Friday, April 3, 2020 9:54 AM
> > >>>>> To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>
> > >>>>> Cc: rwilton=40cisco.com@dmarc.ietf.org; j.schoenwaelder@jacobs-
> > >>>>> university.de; mbj+ietf@4668.se; warren@kumari.net; netmod@ietf.org;
> > >>>>> rfc- editor@rfc-editor.org
> > >>>>> Subject: Re: [netmod] [Technical Errata Reported] RFC7950 (6031)
> > >>>>>
> > >>>>> Hi,
> > >>>>>
> > >>>>> "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> wrote:
> > >>>>>> I don't think we should allow overwriting a require-instance true
> > >>>>>> with a require-instance false in a derived type. It seems to go
> > >>>>>> against the spirit of avoiding expansion of allowable values.
> > >>>>> As I wrote earlier in this thread, the value space doesn't change
> > >>>>> with require-instance.
> > >>>>>
> > >>>>>
> > >>>>> /martin
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>> From section 4.1 of RFC7950:
> > >>>>>>
> > >>>>>>         Derived types can restrict their base type's set of valid
> > >>>>>> values
> > >>>>>>
> > >>>>>> And this text in section 7.3.4 implies that derived types only do
> > >>>>>> further restriction:
> > >>>>>>
> > >>>>>>     If the type's default value is not valid according to the new
> > >>>>>>    restrictions specified in a derived type or leaf definition, the
> > >>>>>>    derived type or leaf definition MUST specify a new default value
> > >>>>>>    compatible with the restrictions.
> > >>>>>>
> > >>>>>> Going the other direction (overwriting with require-instance true)
> > >>>>>> seems OK to me.
> > >>>>>>
> > >>>>>> Jason
> > >>>>>>
> > >>>>>>
> > >>>>>>> -----Original Message-----
> > >>>>>>> From: netmod <netmod-bounces@ietf.org> On Behalf Of Rob Wilton
> > >>>>>>> (rwilton)
> > >>>>>>> Sent: Friday, April 3, 2020 8:06 AM
> > >>>>>>> To: Juergen Schoenwaelder
> > >>>>>>> <j.schoenwaelder@jacobs-university.de>de>;
> > >>>>>>> Martin
> > >>>>>>> Björklund <mbj+ietf@4668.se>
> > >>>>>>> Cc: warren@kumari.net; netmod@ietf.org;
> > >>>>>>> rfc-editor@rfc-editor.org
> > >>>>>>> Subject: Re: [netmod] [Technical Errata Reported] RFC7950 (6031)
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>> -----Original Message-----
> > >>>>>>>> From: netmod <netmod-bounces@ietf.org> On Behalf Of Juergen
> > >>>>>>> Schoenwaelder
> > >>>>>>>> Sent: 27 March 2020 16:13
> > >>>>>>>> To: Martin Björklund <mbj+ietf@4668.se>
> > >>>>>>>> Cc: ibagdona@gmail.com; warren@kumari.net; netmod@ietf.org;
> > >>>>>>>> rfc- editor@rfc-editor.org
> > >>>>>>>> Subject: Re: [netmod] [Technical Errata Reported] RFC7950
> > >>>>>>>> (6031)
> > >>>>>>>>
> > >>>>>>>> On Fri, Mar 27, 2020 at 04:35:44PM +0100, Martin Björklund
> > >>> wrote:
> > >>>>>>>>> [re-sent w/ correct address]
> > >>>>>>>>>
> > >>>>>>>>> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
> > >>>>> wrote:
> > >>>>>>>>>> Hi,
> > >>>>>>>>>>
> > >>>>>>>>>> two comments:
> > >>>>>>>>>>
> > >>>>>>>>>> - It is unclear to me whether this really qualifies as an
> > >>> errata.
> > >>>>>>>>>> - If we add this, then there should probably text about
> > >>> which
> > >>>>>>>>>>   combinations are allowed. For example, for pattern and
> > >>>>>>>>>> ranges,
> > >>>>> there
> > >>>>>>>>>>   is explicit text that says further restrictions of the
> > >>>>>>>>>> value space
> > >>>>>>>>>>   are possible, bot not expansions. If we follow that
> > >>>>>>>>>> logic, then
> > >>>>>>>>>>
> > >>>>>>>>>>   typedef a {
> > >>>>>>>>>>     type leaf-ref {
> > >>>>>>>>>>       path "/some/thing";
> > >>>>>>>>>>       require-instance true;
> > >>>>>>>>>>     }
> > >>>>>>>>>>   }
> > >>>>>>>>>>
> > >>>>>>>>>>   typedef b {
> > >>>>>>>>>>     type a {
> > >>>>>>>>>>       require-instance false;
> > >>>>>>>>>>     }
> > >>>>>>>>>>   }
> > >>>>>>>>>>
> > >>>>>>>>>>   might be illegal since b has a larger value space than a.
> > >>>>>>>>> The value space of b is the same as for a. "require-instance"
> > >>>>>>>>> doesn't
> > >>>>>>>>> change the value space; it changes semantic validation of
> > >>>>>>>>> the given values ((see my mail from 17 Mar, "Require-instance
> > >>> problem").
> > >>>>>>>>> /martin
> > >>>>>>>> OK. If we consider require-instance a constraint and not a
> > >>>>>>>> restriction, then the motivation for this errata is at least
> > >>>>>>>> confusing:
> > >>>>>>>>
> > >>>>>>>>   Since no one argued against this understanding, this errata
> > >>> changes
> > >>>>>>>>   the text to the same form as in other restrictions applicable
> > >>> to
> > >>>>>>>>   derived types.
> > >>>>>>>>
> > >>>>>>>> Simply put: Do you think it is OK to overwrite a
> > >>>>>>>> require-instance true with a require-instance false in a derived
> > >>> type?
> > >>>>>>> [RW]
> > >>>>>>> I'm not sure, but going in the other direction seems plausible.
> > >>>>>>>
> > >>>>>>> E.g. you start with a typedef that is explicitly
> > >>>>>>> require-instance false that is then refined by a typedef to be
> > >>>>>>> require-instance true.
> > >>>>>>>
> > >>>>>>> Regards,
> > >>>>>>> Rob
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>> /js
> > >>>>>>>>
> > >>>>>>>> --
> > >>>>>>>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> > >>>>>>>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen |
> > >>> Germany
> > >>>>>>>> Fax:   +49 421 200 3103         <https://www.jacobs-
> > >>> university.de/>
> > >>>>>>>> _______________________________________________
> > >>>>>>>> netmod mailing list
> > >>>>>>>> netmod@ietf.org
> > >>>>>>>> https://www.ietf.org/mailman/listinfo/netmod
> > >>>>>>> _______________________________________________
> > >>>>>>> netmod mailing list
> > >>>>>>> netmod@ietf.org
> > >>>>>>> https://www.ietf.org/mailman/listinfo/netmod
> > >>>> _______________________________________________
> > >>>> netmod mailing list
> > >>>> netmod@ietf.org
> > >>>> https://www.ietf.org/mailman/listinfo/netmod
> > >>> --
> > >>> Ladislav Lhotka
> > >>> Head, CZ.NIC Labs
> > >>> PGP Key ID: 0xB8F92B08A9F76C67
> > >>>
> > >>> _______________________________________________
> > >>> netmod mailing list
> > >>> netmod@ietf.org
> > >>> https://www.ietf.org/mailman/listinfo/netmod
> > >> _______________________________________________
> > >> netmod mailing list
> > >> netmod@ietf.org
> > >> https://www.ietf.org/mailman/listinfo/netmod
> > 
> > 
> 
> 
> 
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
> 
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod