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

Jürgen Schönwälder <jschoenwaelder@constructor.university> Wed, 26 April 2023 06:44 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 4FFD8C151541 for <netmod@ietfa.amsl.com>; Tue, 25 Apr 2023 23:44:50 -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=unavailable 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 O6ZisxdhAjo7 for <netmod@ietfa.amsl.com>; Tue, 25 Apr 2023 23:44:46 -0700 (PDT)
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2079.outbound.protection.outlook.com [40.107.22.79]) (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 EB831C151534 for <netmod@ietf.org>; Tue, 25 Apr 2023 23:44:44 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kteAmBQi2MGk8eVk0yprXu58KsQNRcn9tiTv1Ep6DNuNm3Q7U9pw4pSUzlN4zKO8QOeXEebz43upts2XV5S+f31VNkaKJjgFaHGMdaeofI6H8hXwzjq7d7WIe/1/DOVDTDae+lOH9bbqqotjKYrT7uc72dX3OeWier1IEZL21Mw+3rraedFoNNwDEVgoQClcxUbYgLMbqzBjnhDWNcpfPHR7/iG0ucn04CZ2Ls57cVcrDWvqTBfqOC9iy+Zn2Tuht01B9AKhbnaPlxm6s9TKhbOyqhsDGYNp+ot09GfpecqWdXZjVyg+BR3LIxRyCKswrCj+ai43roPtI0+2kUn4YA==
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=J8WkKwvQ7XhT7vs1QYHWxkaQeBOKVF2ioL66lJNbuD4=; b=IfpN4DxfeYMqjytQblJjp7ir9+Rzr8ZKuTKNCxBiUVCURDxHTm3UCHUPUFezjGN2CoflXFLzPZHC/keaPSaWTv0Pxmj0z7opLWGecwIJQQxPlPMFJaLoGzy1FnnFADLtO7+kag7LF4rlCxLbtkXEpefuJSTcV2FBONrbKYCO7qJXRvvYRjkk4dLUxPyF0a7g4Brwch34STRY73IE/KnTsGwrpCyYMKfoTaYZdWOuT0nKgOp+A207xG+JJMwghQcHD8KihduemkvuaY6yP5ovgSaZfgndfc0r6XWxgsxCkqQ8fXSDOJERRiJ/jqy3rCTXLhWOP4Te4TvOrN+kj7yfqQ==
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=J8WkKwvQ7XhT7vs1QYHWxkaQeBOKVF2ioL66lJNbuD4=; b=gXRukSyAP8dY0TrymgX33XzBJ5CE4l5W19Ageg91uFNRQ2XoFIQUgTuPUXxcVkePwvhcV6dhXrOOlnR4cpTD80SAVNDrY5D1Y53k3aQaouBt7rVdw7QS+NdaUJ4bIcQFAjgCjmpUJLP/QxEk0gxOTYrUJ9439RbcyCyFevovMpU=
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 PA4P190MB1101.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:102::23) 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 06:44:40 +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 06:44:40 +0000
Date: Wed, 26 Apr 2023 08:44:38 +0200
From: Jürgen Schönwälder <jschoenwaelder@constructor.university>
To: "Fengchong (frank)" <frank.fengchong@huawei.com>
Cc: Kent Watsen <kent+ietf@watsen.net>, "maqiufang (A)" <maqiufang1=40huawei.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>, "Jan Lindblad (jlindbla)" <jlindbla@cisco.com>
Message-ID: <20230426064438.6rv7bshdvwc44to6@anna>
Reply-To: Jürgen Schönwälder <jschoenwaelder@constructor.university>
Mail-Followup-To: "Fengchong (frank)" <frank.fengchong@huawei.com>, Kent Watsen <kent+ietf@watsen.net>, "maqiufang (A)" <maqiufang1=40huawei.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>, "Jan Lindblad (jlindbla)" <jlindbla@cisco.com>
References: <BY5PR11MB419677D444D44125DD69C91CB5909@BY5PR11MB4196.namprd11.prod.outlook.com> <0100018752302133-19bdf548-f01c-4b78-931e-6be80ec494fa-000000@email.amazonses.com> <b8e370d2ad5042c99c6f0d98345d3c5b@huawei.com> <C2D8A539-4AF9-44FA-92E8-9A9DC6CE7971@cisco.com> <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>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <ba0c6cd1ac7646feaf0704a6cdff2a7b@huawei.com>
X-ClientProxiedBy: AM0PR05CA0074.eurprd05.prod.outlook.com (2603:10a6:208:136::14) To GVXP190MB1991.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:3::6)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: GVXP190MB1991:EE_|PA4P190MB1101:EE_
X-MS-Office365-Filtering-Correlation-Id: 6249044d-481b-4706-71b1-08db4621b5c3
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: hEbPsGAzJtqnNi+8ONpnu+j6TZYay8g2tgECTMJ4XJbvG2MCi/XxIKXficadO87qwwh9bYSl5UEm0vHIc0N6DxBgmKyBRbE+rOwWpLX/HKZP4RPP9YNNGDbNYauZB7vpXCMkhMGUc3NnD+wR8ZKLaXp+eiYdV57r25MFf3CmvoHEsFBNaMEEmUUmwHSWo8DFlXse9RXsYz+zQ3Hh03ugT6a6xW0V75qvsfeKn2cIDxcXukT9HdLVmqQAdVPPIdL1CASsMVH08T2VqhpEOv9vHfsSpviAqXLhsYPdtFcUg4R+hwUdL3HIoauxx/sgoObaZK5njskt8S1ClZqS0P+LxamOLT1ie1svxHM+abXcpjQ44PLboCMf2psJ0QacjBnw75+m6rYBKnVJeH9IOVr22/zRC1PiXd59HV8rleoFn6ET6dYmJ0OQW+EhuZtoyH/ikB2e247zyGHO5SvP+MhrKqWzBIBVN4qi8CCussBq1o1fzKu5PV/ggHRMQpDGzgEOBNNb1F4/8Na2lPwI3uBaZa9rVNfL9Gv5+LI3/UF/Yuvlaqs1D1ykL0TKs1yPO5sIFzBBG6F8qZIPMYFd0mIUdT2gPRiCy93eEIAIlVJ4n0v5sUg2oo+sWtMJfikB78cG
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)(366004)(346002)(39860400002)(396003)(376002)(136003)(451199021)(786003)(66476007)(66946007)(66556008)(316002)(6916009)(4326008)(186003)(66574015)(83380400001)(966005)(52116002)(6486002)(54906003)(478600001)(41300700001)(38350700002)(8936002)(38100700002)(5660300002)(26005)(6512007)(9686003)(6506007)(1076003)(3450700001)(2906002)(33716001)(40140700001)(85202003)(224303003)(86362001)(85182001)(41320700001)(66899021)(46492015); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: OBcKLtsUECnhwbhJOlyE+QzbkWhQmsKLgkJRQhFtfaivsx6PZmDReJk5v0si/kK4Lfck5DgKT8Kei7JfTnJynaOZAfUXVOR74mmp1i0TX68gm5FatiNO469CvsBSRuNmkLlaoMUa6EPY98/vCVHxHYXF4OcJI/b+LM3oRwt1XWOtLmPqr0D6ZWVDmYkODllggWqXYU3EN2zzD4TK3EaNyRofFZNvxVyE9JnAYyN8pCLB/pWUl/ziOqEc0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3vrsyQqZ0CF8CVvSCckcb772ITRwDf5NuSNCVn35E5475jL/LjipHpDk85dnE1WZgHkr6hSX6iY1rPKXZH83kMZCLFD9gjmNdv85Xmj9FqetqcaU5VPGXaya05vpeJLTaJa7dx7lIWfKlvRCLn8Wz7jkmYUeAllGXafViHgGSUhMgh/Wie5lO7c4GouggsEAjA1g8h1G32MOtUTBbRGS/2/1J0+jrTqGG6M06rxu+iXGaF3FjsuaLT74cfFeMkdpi9zeLrZ1k7X3+xIZ3EkraeeGOeqiAfHF1g4mgBP0v/5tmsi3QC8wjOttxAH1G2Fs8S+ANFw=
X-OriginatorOrg: constructor.university
X-MS-Exchange-CrossTenant-Network-Message-Id: 6249044d-481b-4706-71b1-08db4621b5c3
X-MS-Exchange-CrossTenant-AuthSource: GVXP190MB1991.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2023 06:44:40.1938 (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: WK8hIFVC3/WQi2IN6RrT0fY2lHU2AKuTE7dDVSWt6k1Comhz1KrPUP+CcylnqCWtUoDn84/Mo16fwTb9VZlIGSCGVkaGawF9W8ogBUdS7Y8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4P190MB1101
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/15LkOtlN08Y_KcxtruitLGYzdZ4>
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 06:44:50 -0000

I am not sure I follow. If I replace the line card, I may have to
update the type of the interface config. Why would this be disallowed?

In the NC world, config is applied to resources. Validation is against
the data model, not against the resources currently present on a
system. See for example RFC 6241 section 8.6.1. with starts with:

   Validation consists of checking a complete configuration for
   syntactical and semantic errors before applying the configuration to
   the device.

This is why we have the notion of <running> -> <intended> ->
<applied>.  Initially, we did not expose <applied> but operationally
the possible difference between <running> and <applied> is important
enough that we started to expose it. But the point here is that the
resources available do not influence whether <running> is valid. A
valid configuration satisfies the data model constraints, it does not
necessarily satisfy the resource constraints.

/js

On Wed, Apr 26, 2023 at 01:36:37AM +0000, Fengchong (frank) wrote:
> Hi Kent,
>   Some nodes that are originally read-only have to appear in running because they are referenced by other configurations.
>   For example, the type of interface, many other configurations may reference it.
>   Just as:
>   container Ethernet-related {
>     when ../type = 'ethernet'
>     ....
>   }
>   So the leaf 'type' have to act as a configuration node to make the running datastore valid. But in fact, the value of leaf 'type' should not be changed. 
>   So it's marked with 'immutable' is reasonable. If someone try to modify it, reporting error from server should be acceptable.
> 
> 
> 
> -----邮件原件-----
> 发件人: netmod [mailto:netmod-bounces@ietf.org] 代表 Kent Watsen
> 发送时间: 2023年4月25日 19:53
> 收件人: Jürgen Schönwälder <jschoenwaelder@constructor.university>
> 抄送: maqiufang (A) <maqiufang1=40huawei.com@dmarc.ietf.org>; netmod@ietf.org; Jan Lindblad (jlindbla) <jlindbla@cisco.com>
> 主题: Re: [netmod] Comments on draft-ma-netmod-immutable-flag-06
> 
> 
> Hi Jürgen,
> 
> > My assumption so far is that an interface configuration is matched 
> > against hardware and it is applied if there is matching hardware. In 
> > other words, if an edit makes the interface configuration not match 
> > the hardware anymore, then the config is simply not applied anymore 
> > and the interface is left unconfigured. (The same would happen if you 
> > replace an interface with another that does not match the current
> > config.) The idea that an interface configuration becomes partly 
> > immutable once it is applied to a matching physical interface is not 
> > really reflecting how I understand the design of N/Y.
> 
> My understanding is the same, so I assume there's a nuance in the detail.
> Let's use this example:
> 
>   list interface {
>     key name;
>     immutable true;  // the whole 'interface' object is immutable
>     leaf name {
>       ...
>     }
>     leaf description {
>       Immutable false;  // client may provide a description
>       ...
>     }
>     leaf mac-addr {      // H/W provided.  Normally CF, but for some reason is
>       mandatory true;   // promoted to CT (for a 'must' or 'when' expression?)
>       ...                         // Please don't nitpick the validity of the example, I could 
>     }                             // construct a similar example using built-in certs or keys.
>   }
> 
> Now say the client preconfigures:
> 
>   {
>     "name": "sd3"
>     "description": "uplink to closet-3",
>     "mac-addr": "000000" // real address unknown, so a fake one used
>   }
> 
> Now the card is inserted and "sd3" appears as:
> 
>   {
>     "name": "sd3"
>     "mac-addr": "1234567"
>   }
> 
> The merge fails because the client's mac-addr doesn't match the real one?
> 
> Ideally the immutable nodes (other than the keys) would NOT have to appear in <running>, but they do because "mandatory true"?
> 
> 
> > Also the notion
> > of immutable data in candidate, which is rather a scratchpad to 
> > assemble bigger changes, seems odd to me.
> 
> I had a similar reaction but, if <candidate> can be validated, doesn't it follow that the immutable nodes need to be copied into it as well?
> 
> 
> > /js
> 
> K.
> 
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
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/>