Re: [netmod] What operational values can NMDA return?

Martin Björklund <mbj+ietf@4668.se> Fri, 26 February 2021 15:58 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 47D5B3A0D55 for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 07:58:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.099
X-Spam-Level:
X-Spam-Status: No, score=-0.099 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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=XlMlOgMy; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=qSMFn9CT
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 1EHrPhEFbhpo for <netmod@ietfa.amsl.com>; Fri, 26 Feb 2021 07:58:12 -0800 (PST)
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CF35D3A0D51 for <netmod@ietf.org>; Fri, 26 Feb 2021 07:58:12 -0800 (PST)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id D9BC0B17; Fri, 26 Feb 2021 10:58:11 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 26 Feb 2021 10:58:12 -0500
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= nW8319isrc+sCTZR2TaAv7c7Liw323j3NADKjDQ6bY8=; b=XlMlOgMydPZakkOD ceXHMlfOrV/+JhRZlRy7mHRKGFqAh4ttI7PszWzxWzziBeisNr9h3m+72ikwFt8Q sl54XEXEBYOzOyTJgRcWRX3WO/qkmPHPsbKCbvKZ0Fbip6ODX0ZyFvz/4OrmSewX 9DYea3ptM39aou6zGzADy5pnZY9qDFlzVPssoMn6yxIGlXHPUYbQ03sGg7Ik6aWg pxOgm3bzBHkkairZR890DaeAcbPC3lsTuIjfnYIrnvalA2h/1xVpEwJSD/aLUoFt ENutqd1FheVGcku44KJ1iUPWnK421RaNJxEvXvHqUlFBbkJfEZWOdGbSxkh4VVeW Oq82qw==
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=nW8319isrc+sCTZR2TaAv7c7Liw323j3NADKjDQ6b Y8=; b=qSMFn9CTsX88myGOLL3kDNHitekMjfBNP6dSHM46RpAl9lEmDevM/3uj0 angEV1vdtF1pxjtY0vYHcWLcIwtxyK7A3ApAQ5bQFF2SaqF7LTEDx4NKyHVV6ISK atiLPvYT7fLq3m7tE5JYim+V6/i3TvyOJKgnwzD7SgGI763l9U47oEAkS/x6S12c CVIYtCfmfMGxaSrGbyWBJ2f2prsEBjQQJFsWVa1A2pPRiRnvBFWp6sg6CeL3TRsG M3s+h38UNw6iLPyLV15UQULqaiVaKrtvib7Q/uph40YAXXKbB+F/BPiwiwhOaIoY PkhCCr6JJP8HBpUluwRupS6lFtCwA==
X-ME-Sender: <xms:kho5YLgNx2W5zUMPlkwzJqOb1LjRgZUnYbFgA3u_alZCokfE5tLKcg> <xme:kho5YIBDqqm00cQgh_mAGBOVzW1O1UohK3pze5DBpwLuza3XbNilY1u7Qw12uamR- 6JmcYg36EOk-h8txjI>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrledugdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffkvffuhfgjfhfogggtgfesthejre dtredtvdenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdoihgv thhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpeffuddtheekgeehteettdehje elieevjeeiheegveffheeguddvffelvdejkefgieenucffohhmrghinhepjhgrtghosghs qdhunhhivhgvrhhsihhthidruggvpdhivghtfhdrohhrghenucfkphepudehkedrudejge drgedrvdduheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmsghjodhivghtfhesgeeiieekrdhsvg
X-ME-Proxy: <xmx:kho5YLEVhGcJB8zT6LJxJvsmOZJPSdZhixIqsavgMGvueiMZDxGXWw> <xmx:kho5YISuyYDb7JRy--0fLVMkEeQUNWdfDTk466vIE_5p_mpjZ1iqFQ> <xmx:kho5YIyqnZ6M5tJNxoMgoieJXg_n8YWyZvKE_CoXbdHyal75ygP3Vg> <xmx:kxo5YObXYZsTuRDl7wfqTJZXV09ApeN4Y7mePcWaICSm9JWgs1JONg>
Received: from localhost (unknown [158.174.4.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 86F17240066; Fri, 26 Feb 2021 10:58:09 -0500 (EST)
Date: Fri, 26 Feb 2021 16:58:07 +0100
Message-Id: <20210226.165807.1700498563382308347.id@4668.se>
To: rwilton=40cisco.com@dmarc.ietf.org
Cc: j.schoenwaelder@jacobs-university.de, netmod@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <MN2PR11MB43663C3AE37A5CD1FB607444B59D9@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <MN2PR11MB43663C3AE37A5CD1FB607444B59D9@MN2PR11MB4366.namprd11.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Ns3gN0McBOvUAZIJtgrqOli4kio>
Subject: Re: [netmod] What operational values can NMDA return?
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, 26 Feb 2021 15:58:14 -0000

"Rob Wilton \(rwilton\)" <rwilton=40cisco.com@dmarc.ietf.org> wrote:
> 
> 
> > -----Original Message-----
> > From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
> > Sent: 26 February 2021 14:28
> > To: Rob Wilton (rwilton) <rwilton@cisco.com>
> > Cc: netmod@ietf.org
> > Subject: Re: [netmod] type equivalence
> > 
> > On Fri, Feb 26, 2021 at 12:21:26PM +0000, Rob Wilton (rwilton) wrote:
> > >
> > > Tangentially, it is worth noting the RFC 8342 also writes about
> > syntactic
> > > constraints covering types:
> > >
> > > 5.3.  The Operational State Datastore (<operational>)
> > >
> > >    Syntactic constraints MUST NOT be violated, including hierarchical
> > >    organization, identifiers, and type-based constraints.  If a node in
> > >    <operational> does not meet the syntactic constraints, then it
> > >    MUST NOT be returned, and some other mechanism should be used to flag
> > >    the error.
> > >
> > > I'm not sure how clear RFC 8342 section 5.3 is about returning values
> > > that can be represented by the underlying built-in-type, but are
> > > outside
> > > the value space defined by a range, length, or pattern statement.
> > >
> > > My memory during the discussions was that it is allowed to return a
> > value
> > > outside arange, length, pattern statement, as long as it is contained
> > > in the value space of the built-in-type.  E.g., cannot return 257 in a
> > > uint8, but can return 11 even if the type range is 1..10.
> > >
> > > But, I'm not sure that is what the text actually states.
> > 
> > Perhaps this requires a separate thread. Perhaps 'syntactic
> > constraints' was not a good choice and yes different people might
> > understand 'type-based constraints' differently. RFC 7950 says:
> > 
> >    The following properties are true in all data trees:
> > 
> >    o  All leaf data values MUST match the type constraints for the leaf,
> >       including those defined in the type's "range", "length", and
> >       "pattern" properties.
> [RW] 
> 
> But RFC 8342 also states:
> 
>    <operational> SHOULD conform to any constraints specified in the data
>    model, but given the principal aim of returning "in use" values, it
>    is possible that constraints MAY be violated under some circumstances
>    (e.g., an abnormal value is "in use", the structure of a list is
>    being modified, or remnant configuration (see Section 5.3.1) still
>    exists).  Note that deviations SHOULD be used when it is known in
>    advance that a device does not fully conform to the <operational>
>    schema.
> 
>    Only semantic constraints MAY be violated.  These are the YANG
>    "when", "must", "mandatory", "unique", "min-elements", and
>    "max-elements" statements; and the uniqueness of key values.
> 
>    Syntactic constraints MUST NOT be violated, including hierarchical
>    organization, identifiers, and type-based constraints.  If a node in
>    <operational> does not meet the syntactic constraints, then it
>    MUST NOT be returned, and some other mechanism should be used to flag
>    the error.
> 
> The first paragraph to me suggests that it is right to return an
> abnormal value.
> 
> E.g., perhaps the IPv6 MTU is only allowed to be configured to values
> greater than 1280, but due to a bug, what actually gets programmed is
> 1000.  Should the device return the "in use" MTU value?  My
> understanding of the NMDA architecture is that it should.

No, you have to read the full text.  The 3rd paragraph makes it clear
that 1000 is not legal in this case.

(You know what Juergen says, you MUST NOT have any bugs :)

> However, the second paragraph doesn't list length, pattern, or range
> as constraints that can be violated, so perhaps it is not allowed.
> But I'm not convinced that is what was originally intended ...

I think it was.


/martin




> 
> Regards,
> Rob
> 
>   
> 
> 
> 
> > 
> > So I am not sure about returning 11 for a range 1..10.
> > 
> > /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