Re: [netconf] Regarding RFC 6243 "With-defaults Capability for NETCONF" … the devil is in the defaults

Andy Bierman <andy@yumaworks.com> Fri, 14 April 2023 15:08 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6D36CC151B2B for <netconf@ietfa.amsl.com>; Fri, 14 Apr 2023 08:08:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
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 zQFg-XXlLW52 for <netconf@ietfa.amsl.com>; Fri, 14 Apr 2023 08:08:08 -0700 (PDT)
Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7E637C151B2C for <netconf@ietf.org>; Fri, 14 Apr 2023 08:08:08 -0700 (PDT)
Received: by mail-lj1-x22d.google.com with SMTP id l7so4972127ljq.11 for <netconf@ietf.org>; Fri, 14 Apr 2023 08:08:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1681484886; x=1684076886; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WJxxq+DNPT74SsMo1BcxUT0Xi//IoDcxQKFEsbrIZH4=; b=Xaf0lz6YKJqLmNPofQ2qy2HXfLPqfNwBtEEPYWlpvxZtnZSM2gR0+8J3GI1A4ALT95 N+0ghCBByPEIc/RZhJAUv0M8B/0doOgwmP4nqIEMq5+eAxo7WOgi/gdvxD3e4DUUict8 +NBw+48SOBg3bxOhIQmXFqTnEaNFSzFYgO2zaDJSvx+EXiG9aAWTGS8xOGKnVa5akBVv WWRJErrFDCCocRIIo2xz5PLvGb+XF4od86903nj8wLg8RMLBIqkPrJvAvKgUvHCcjVfB 69PAptyGUMhNjOzGM1W7um3inSOFq/C2xEbWXVF+2BpgPydJBnddgL1C38Y/nzV1vX8g EBQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681484886; x=1684076886; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WJxxq+DNPT74SsMo1BcxUT0Xi//IoDcxQKFEsbrIZH4=; b=btvLGdvjkJLuM6NhBjEubtwBVMyR8pTLSAaqAUh7jch+gHf5vJKg/2eD3Pya2syxNe fZp59JFu2YnCRsoNJoMP75+wc2GfakbDvvPn8sXPV/SBILgv4Fif/NvzamGk2YgYmQqM X16oLp/oV06p//odjxLjvmPMa2lWi3DrCMC69mrvFNBz69aR+5Jk+hZhIaha6QlRbfnl DQGMEKl44cSGx1R/U64jOcdzvRBuGSN1oZpCxJHoXHtFpmvF0GrYmAIHW0OiSjEg0Buz 1x4XeIYnzAD2YwXiQ2B2iv1my6pZukufvfCk8hVzW42efh+X3byVjL2Je4nQsrZ2+rWh Fc1w==
X-Gm-Message-State: AAQBX9fwCz/GG/kzqJ8PBezI86CQ5tm3/IN82fCVpsYR3g5IFbBxKD1A zBnABDADK5qJJa72Zu9b0n76FpsSUc9G+w74NKL5/A==
X-Google-Smtp-Source: AKy350ahuV04cjh+jQzFd3/xqaJRPkNDvp27GZaQys/GX812MHyFR11wm1pj6l7C3mkorKYzDnR1aZn0PTlES5MoANc=
X-Received: by 2002:a2e:9d83:0:b0:2a7:8544:1e76 with SMTP id c3-20020a2e9d83000000b002a785441e76mr2060534ljj.8.1681484886440; Fri, 14 Apr 2023 08:08:06 -0700 (PDT)
MIME-Version: 1.0
References: <GV2PR02MB9637C58B7EE4FEDBFABC3F7CF7999@GV2PR02MB9637.eurprd02.prod.outlook.com>
In-Reply-To: <GV2PR02MB9637C58B7EE4FEDBFABC3F7CF7999@GV2PR02MB9637.eurprd02.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 14 Apr 2023 08:07:54 -0700
Message-ID: <CABCOCHTsAJTCoB8ejhw6fN6dD3eVgeySNoXJdA11eGaegL2sOQ@mail.gmail.com>
To: dylan.sadoun@orange.com
Cc: "draft-ietf-netconf-with-defaults@ietf.org" <draft-ietf-netconf-with-defaults@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>, "dromasca@gmail.com" <dromasca@gmail.com>, "balazs.lengyel@ericsson.com" <balazs.lengyel@ericsson.com>
Content-Type: multipart/related; boundary="0000000000005a394005f94d3561"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/FogqVYE-WD-DPOx6oIZ-0YRVu2w>
Subject: Re: [netconf] Regarding RFC 6243 "With-defaults Capability for NETCONF" … the devil is in the defaults
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Apr 2023 15:08:12 -0000

Hi,

I think the text in 2.3.1 is an omission.

"set by client" should be "set by client or server"

Andy


On Fri, Apr 14, 2023 at 7:53 AM <dylan.sadoun@orange.com> wrote:

> Hello
>
>
>
> I am reaching you about a potential technical erratum in *RFC 6243*,
> although I am not accustomed to the IETF process. I read
> https://www.ietf.org/about/groups/iesg/statements/processing-errata-ietf-stream/
> but I am still not sure if that qualifies for an erratum request. Let me
> share my observations with you, please tell me if I should report an
> erratum and in that case I will do accordingly.
>
>
>
> The RFC defines 3 ways for NETCONF servers (most commonly routers for a
> service provider such as my employer) to deal with default data for "get
> and set" NETCONF operations. Each router implementation must choose one of
> the 3 ways as its implicit/default/*basic* mode, and can also support
> other modes if asked to by a NETCONF client.
>
>
>
> My concern is about the *explicit* mode (when the NETCONF server supports
> it, with no distinction if it is the router's basic mode or not) and *configuration
> data* reports by NETCONF servers.
>
>
>
> The RFC defines:
>
>
>
> *Explicitly set data*
>
> *Data that is set to any value by a NETCONF client or other management
> application by the way of an explicit management operation, including any
> data model schema default value.  Any value set by the NETCONF server that
> is not the schema defined default value is also considered explicitly set
> data.*
>
>
>
> (emphasis mine. Please refer to the RFC for additional definitions).
>
>
>
> First, let me dive into the previous drafts to highlight the importance of
> the highlighted text. In the *draft-ietf-netconf-with-defaults-04*, the
> definition was different:
>
>
>
> *Explicitly set default data*
>
> *Is default data that is set by a NETCONF client or other external
> management application/user by the way of an actual management operation to
> the value specified as its default in the data model schema.  Some servers
> MAY treat explicitly set default data as simple default data, as they may
> not be able to differentiate between them. Data, that is set to a value
> other then its default value, is not default data, so its handling is
> outside the scope of this document.*
>
>
>
> but as soon as the *draft-ietf-netconf-with-defaults-05*, the definition
> was changed to its final RFC form (except for one word: "actual" instead of
> "explicit"). Thus we can infer the early importance of the highlighted text:
>
> *Indeed, if a NETCONF server sets some data that are NOT schema default
> data, these data are consired explicitly set data.*
>
>
>
> The whole point of this definition and its only purpose is to later define
> the 'explicit' mode, the term being only used in the *2.3.  'explicit'
> Basic Mode *and the* 3.3.  'explicit' Retrieval Mode paragraphs* (or in
> other paragraphs, when refering to the explicit mode).
>
> The *2.3.1.  'explicit' Basic Mode Retrieval* paragraph states:
>
> *When data is retrieved from a server using the 'explicit' basic mode, and
> the <with-defaults> parameter is not present, data nodes MUST be reported
> if explicitly set by the client, even if they contain the schema default
> value.  Non-configuration data nodes containing the schema default value
> MUST be reported.*
>
>
>
> (emphasis mine).
>
>
>
> This is where I think there is a mistake in the RFC. Why would only data
> nodes explicitly set *by the client* be reported? Why not explictly set
> data *by the server* as well? There are at least 3 arguments to qualify
> that as a mistake:
>
>    1. Firstly, what is the point of the definition highlighting that if a
>    NETCONF server defines data (to values that are not the schema default
>    ones) it is also explicitly set data, if that specific case is then
>    excluded from the explicit mode paragraph?
>    2. Secondly, if the NETCONF server does not report this data which is
>    not in the YANG schema, where should one be aware of the existence of this
>    data? (other than by using another mode). Having read the RFC multiple
>    times, it seems logical and intuitive to me that, in *any* mode, one
>    should be able to find *all* data on the server by combining the
>    NETCONF server report after a get AND the corresponding YANG schema.
>    3. Thirdly, in the trim mode, this data would indeed be reported.
>    Isn't it weird and counter-intuitive that the trim mode be more verbose
>    than the explicit mode?
>
> Please note that the RFC examples fails to address this particular
> situation. Maybe they should be expanded as well?
>
>
>
> To me, a correct and simpler formulation of the paragraph would be to
> remove "by the client":
>
> *When data is retrieved from a server using the 'explicit' basic mode, and
> the <with-defaults> parameter is not present, data nodes MUST be reported
> if explicitly set.  Non-configuration data nodes containing the schema
> default value MUST be reported.*
>
>
>
> the reader can then read the definition for precisions.
>
>
>
> Or, if one wants to be more precise and paraphrase the "explicitly set
> data" definition:
>
> *When data is retrieved from a server using the 'explicit' basic mode, and
> the <with-defaults> parameter is not present, data nodes MUST be reported
> if explicitly set. Data nodes containing the schema default value MUST be
> reported if set by the a NETCONF client or other management application by
> the way of an explicit management operation, and MUST NOT be reported if
> set by the NETCONF server. Non-configuration data nodes containing the
> schema default value MUST be reported.*
>
>
>
> Additionaly, the *3.3.  'explicit' Retrieval Mode* paragraph is also
> ambiguous:
>
> *When data is retrieved with a <with-defaults> parameter equal to
> 'explicit', a data node that was set by a client to its schema default
> value MUST be reported.  A conceptual data node that would be set by the
> server to the schema default value MUST NOT be reported. Non-configuration
> data nodes containing the schema default value MUST be reported.*
>
>
>
> What about data that was set by the NETCONF server to a value other than
> the schema default value? I believe it should be reported, according to the
> "explicitly set data" definition, and for the same reasons as the cricicism
> of the 2.3.1 paragraph. Thus, this part too could be expanded, e.g. to:
>
> *When data is retrieved with a <with-defaults> parameter equal to
> 'explicit', a data node that was set by a client to its schema default
> value MUST be reported.  A conceptual data node that would be set by the
> server MUST be reported, expect if set **to the schema default value, in
> which case it MUST NOT be reported*. Non-configuration data nodes
> containing the schema default value MUST be reported.
>
>
>
> I hope I was clear enough in my explanations. Please note that this
> ambiguity is not only problematic in theory but also in practice, for
> various reasons that I can detail further if necessary.
>
>
>
> Best regards,
>
>
>
>
>
> *Dylan SADOUN*
>
> +336 47 53 54 50
>
> dylan.sadoun@orange.com
>
>
>
> OF/DTSI/DTR/RSB/DIP/TAC CO
>
> *DTR* : Direction Technique des Réseaux
>
> *RSB* : Réseaux et Services Broadband
>
> *DIP* : Département IP
>
> *TAC CO* : TAC Collecte
>
>
>