Re: [netmod] Comments on draft-ma-netmod-immutable-flag-06

Jürgen Schönwälder <jschoenwaelder@constructor.university> Wed, 26 April 2023 13:59 UTC

Return-Path: <jschoenwaelder@constructor.university>
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 0FD0BC14CE42 for <netmod@ietfa.amsl.com>; Wed, 26 Apr 2023 06:59:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.898
X-Spam-Level:
X-Spam-Status: No, score=-6.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 (1024-bit key) header.d=jacobsuniversity.onmicrosoft.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 rprwa4b6kTVj for <netmod@ietfa.amsl.com>; Wed, 26 Apr 2023 06:59:30 -0700 (PDT)
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2055.outbound.protection.outlook.com [40.107.22.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E7605C15199C for <netmod@ietf.org>; Wed, 26 Apr 2023 06:59:29 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=axXMba5WnxW60V3h+KYdWC/IuVDP9njAeZTFpv1Ka0gx/dfnScd9+yfk6TMaJZ1ldYwVHW3JZMasKnU1aSfat8OBK50uT3W2ekfxTX2E22kwgrAKUOhqmZSKyHbWaMUbi8e5GO5LhFEtF7UL/6D4hQzmiye65COksweFghBw0xmUTBY6/ElYmP9A3SVhdtDI88qj5GqoiLgiFM8DcHcd1OlSeAeyDSfzNFgQXL/ya0hfyVCVsYIG0NTE18kgmVSxgJ8oaPiVDd2ERHTfhE90C+AYsNhsRWsayWvqnj1cx/9eL/1e1D8kTybSb+zkb69+6xEFQj2B8TPqUvVty26tAQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ykKolscrUmL9WnTcH/Lhdum+OTQlIxidgiLgU/RQS+g=; b=PHmxbGtivDLMH6WH2JloEfn3JRVAj3YRoaQHteH1/izCv5PGV7oHXEgVqd22aASNjU/FInVVmVt/1hZvWnVi6Yd+nBTPLz+etkKEeL+l1pAM0Gv9ifJArILsTFzprz810dBctoA4IC/tQ9A9zDPsrfR2BiCbnz/knJpLfNIzr5j1dUk7aZQs0DP2jmCWSv5wTYwFvbL9fn9RjyitDtPK3TKJbptInTXakd5SXhdIPJuXGbFcmKZEANthaYAhPJmgu6pFvGtEx2OF65ufszUTnuVkLvlzAIrHGmfqwXVApGKDhAw76GktOxK7ltK5ApXJCgtBG+saDB/jtTGI6ntnDg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=constructor.university; dmarc=pass action=none header.from=constructor.university; dkim=pass header.d=constructor.university; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ykKolscrUmL9WnTcH/Lhdum+OTQlIxidgiLgU/RQS+g=; b=ACc2qQXZ4/ERQ6gP3mM5ssxa9Enx/q3SIrnkiJEJs4Opl8L0aOwd5a23/Mj6hdYoSOuRpysv9t6EvDuep6tEX6uN04oSW7F2z0ZVw1W4c6xYkYnQQ6Di2hBIFDILbyzdIfiWNMxogVQ9Xk37oTw94OuHT2JPQ71jJSrC25J0r5Q=
Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=constructor.university;
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6) by VI1P190MB0798.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:122::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.21; Wed, 26 Apr 2023 13:59:24 +0000
Received: from GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::581b:1ec3:e89b:df50]) by GVXP190MB1991.EURP190.PROD.OUTLOOK.COM ([fe80::581b:1ec3:e89b:df50%8]) with mapi id 15.20.6319.033; Wed, 26 Apr 2023 13:59:24 +0000
Date: Wed, 26 Apr 2023 15:59:22 +0200
From: Jürgen Schönwälder <jschoenwaelder@constructor.university>
To: Kent Watsen <kent+ietf@watsen.net>
Cc: "Fengchong (frank)" <frank.fengchong@huawei.com>, "maqiufang (A)" <maqiufang1=40huawei.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>, "Jan Lindblad (jlindbla)" <jlindbla@cisco.com>
Message-ID: <20230426135922.whb3ntconexzktpj@anna>
Reply-To: Jürgen Schönwälder <jschoenwaelder@constructor.university>
Mail-Followup-To: Kent Watsen <kent+ietf@watsen.net>, "Fengchong (frank)" <frank.fengchong@huawei.com>, "maqiufang (A)" <maqiufang1=40huawei.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>, "Jan Lindblad (jlindbla)" <jlindbla@cisco.com>
References: <d37925b807604b76b92cbf2f32341dab@huawei.com> <01000187ae695684-69ae4a4b-eeb9-4827-8b65-ff590ed52db7-000000@email.amazonses.com> <793be10da43c4958aa7565dd8c29f16c@huawei.com> <20230425095020.areq7etekgquaqyi@anna> <01000187b8421975-108a6801-0ab0-4c40-8df9-46702a08d602-000000@email.amazonses.com> <ba0c6cd1ac7646feaf0704a6cdff2a7b@huawei.com> <20230426064438.6rv7bshdvwc44to6@anna> <01000187bd739490-d39c4dd3-ede8-45f0-8f1c-f7992c265749-000000@email.amazonses.com> <20230426121905.cyszfgqwxrlhkhyo@anna> <01000187bdbc1dad-12c31976-fb03-4a74-889c-716e69d952fd-000000@email.amazonses.com>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <01000187bdbc1dad-12c31976-fb03-4a74-889c-716e69d952fd-000000@email.amazonses.com>
X-ClientProxiedBy: AM3PR05CA0126.eurprd05.prod.outlook.com (2603:10a6:207:2::28) To GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: GVXP190MB1991:EE_|VI1P190MB0798:EE_
X-MS-Office365-Filtering-Correlation-Id: ac2872dc-8c56-4743-ac44-08db465e70f4
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: Euy2wGIoquuA5M+i7qyXL3PVLOhcOgCxRIILpxfYC1MN+xNtQCrWFCXWKjcG/4Sc04voaArcDgp/biGXupciYXV7EILu0C27CRbaXuL+ucYfg4Gu+uHzntmTEzUCc23FMPPskRIhNXxaPJbHGyMEQu9PNYsBShzojKQ2Z5pT/NdGaAdYXaVCMlNu8VpPz2GVe5Z2E5IUlkxWFOwFWNEx9/VkYfCruSvUzEjRGM6Obdzp0ZuwXJLa8EydtXgDVWpR3HgVViA71xkcTOrsDAhWT5sPJ6R1OPdcP0nqCqGwa14k18YhE6AJ+XgdJ7AVhX0V74frUOfalDYuHg99KVgXIRvYBbWe6pnjwT3+QXfTREE0tshEMdTF5T7SPU90/wLnUdAZ9xIvyDdTwmCfsdd23OHV1IFUmgEcfuzexUA+HiABMQqUps8SjcQ6U0gxjHUI8kdVCh8GTBub72Pz6j/paf9ELPub0IYecH56/fGZJ/e5K7ViQQvzRegsqd4kvgqJjo497GqqtLOA62pgc8+s0rUeV2yljrcyxkx0XdNZn7OJoNJFcW30im4rXPd4tIPhv3pPdB6Mv7zmhLqlNKqsRfkkiyvpXjXH0S/Y+piV0EwBW1mpzfL+k8P6y7dAQ007
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GVXP190MB1991.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230028)(7916004)(39850400004)(366004)(376002)(346002)(396003)(136003)(451199021)(38100700002)(38350700002)(5660300002)(8936002)(66946007)(66556008)(66476007)(86362001)(41320700001)(8676002)(41300700001)(786003)(4326008)(316002)(2906002)(3450700001)(1076003)(26005)(186003)(6506007)(9686003)(6512007)(85182001)(6486002)(66574015)(83380400001)(33716001)(52116002)(40140700001)(478600001)(85202003)(54906003)(46492015); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: MDhLH3evZVUtpeeEOct9eoZ58Kz571eawCSfe1+/Cn4MNcrcDrK/p2ULix4bZCGx8irPGqa2fJdcbgvcMxJcU/26bH87YOiN0I/CdJf7Osgbtjh2uuFbf78AX7mWt9A8CEms+TOtSHPmNjNG7nLGlCwibnTUq8TB8ejfQhTtoHEzdINN+7FTQoJti/HKHfSQmNkmxcAvJb3CwSjOGcKGVx0KhGclJN6PWiS1hb6VBp8YJfW4qAV5rXDOYlsc0yNXtyU/1SPUZHCmMHKHugEYRN2PkV1Y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YSVVIuBMkvFnHO36/arUjBilR1og/rYjASNrhZ1YofYZ567fG+KL07UMp5rdoib9e2XfK5WDUb7zpZzl6cmmdPw70SSBL7FJ8bcbOtvq8/b0LgW4Drtt+cNyAmJ2NI9lECXwUxd5kowPYPgmBvPkPvlSjxvAYEDVCvYRoh3fI2RWkmra3mxxcGRA0gQPBxXPWNivAu+ziL7B9xpi/HJn51UsmWRtlrWq3uvu35DVCgcY+MuML2dBpqvrkpKSzE/P/bRi51vGVgm8+yTIE=
X-OriginatorOrg: constructor.university
X-MS-Exchange-CrossTenant-Network-Message-Id: ac2872dc-8c56-4743-ac44-08db465e70f4
X-MS-Exchange-CrossTenant-AuthSource: GVXP190MB1991.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2023 13:59:24.1271 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: Cich8ulKpws8Nli1z9pfu+IkrbpA//9hWJOHezxcZDbEbrsP7Qz1ky+gAhQ3UMvS71hTl6J4Lt8kX1c2SrKkidGyvxDsLBJDYHDV8eb2aE8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1P190MB0798
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Wg3aTwNgUQdPbtI16Qru4VqZlqE>
Subject: Re: [netmod] Comments on draft-ma-netmod-immutable-flag-06
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: Wed, 26 Apr 2023 13:59:34 -0000

There are several different cases one can consider and the text in the
description is not particulary clear which ones are covered (due to the
'e.g.' style).

a) Configuring an interface type that is not supported by the
   firmware / operating system.

b) Configuring an interface type that is inconsistent with the
   interface nameing scheme used by the firmware / operating system.

c) Configuring an interface type that is inconsistent with the
   specific hardware currently plugged into the system.

d) Configuring an interface type for a piece of hardware currently
   not present on the system.

The two concrete examples mentioned in the definition of the leaf seem
to cover a) and b). Cases c) and d) are likely where it is getting
tricky. I recall that people wanted to be able to provision config
that will become active once suitable hardware is provided. And that
includes provisioning new interface definitions that may not currently
match the hardware. Also note that a) and b) require that the server
"only" knows about the capabilities of the firmware / operating system
and the naming conventions while processing a configuration change
request. c) and d) require that the server knows about specific
hardware components present at the time the configuration change
request is processed. Hence, edits fail or succeed depending on the
physical resources present.

If we make it an art to restrict edits by declaring (temporary)
immutable data in the config, we are opening the gate to recreate
nightmares from SNMP land where configuration changes worked in
certain contexts but not in others and clients had to engineer how to
create sequences of edits that get your desired config established.
Its a slippery slope.

/js

On Wed, Apr 26, 2023 at 01:23:54PM +0000, Kent Watsen wrote:
> 
> 
> > Where in the NC or YANG RFCs do we talk about immutable data? Where in
> > the interfaces data model do we define that the type leaf becomes
> > immutable once a line card has been plugged into a slot?
> 
> Following is from RFC 7223.  Note that the description statement almost says that the value is immutable:
> 
>          leaf type {
>            type identityref {
>              base interface-type;
>            }
>            mandatory true;
>            description
>              "The type of the interface.
> 
>               When an interface entry is created, a server MAY
>               initialize the type leaf with a valid value, e.g., if it
>               is possible to derive the type from the name of the
>               interface.
> 
>               If a client tries to set the type of an interface to a
>               value that can never be used by the system, e.g., if the
>               type is not supported or if the type does not match the
>               name of the interface, the server MUST reject the request.
>               A NETCONF server MUST reply with an rpc-error with the
>               error-tag 'invalid-value' in this case.";
>            reference
>              "RFC 2863: The Interfaces Group MIB - ifType";
>          }
> 
> Also from RFC 7223, note that the value is used in a "when" expression:
> 
>      augment "/if:interfaces/if:interface" {
>          when "if:type = 'ianaift:ethernetCsmacd'";
> 
>          container ethernet {
>              leaf duplex {
>                  ...
>              }
>          }
>      }
> 
> 
> My assumption (not knowing the true history) is that the "type" node is historically "config false" and, in <operational>, might have origin "learned", or maybe "system".  For some reason that I'm unaware of, it was desirable for the "type" node to appear in <running>, so that it can be, e.g., referenced in "must" and/or "when" statements.  That is, the "type" node in the YANG module was made to be "config true", but the "description" statement says that it is always expected to have the value that is (or will be, for a pluggable card) seen in <operational>.  Presumably, existing server behavior would reject (or ignore) a client's attempt to set the interface's "type" to anything other than it actually is.  If this is all true then all this draft does, for this specific example, is codify the "description" statement text to an "immutable" extension statement, so the behavior can be understood programmatically.
> 
> K.
> 

-- 
Jürgen Schönwälder              Constructor University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://constructor.university/>