Re: [netconf] [netmod] YANG Push module errors

Ladislav Lhotka <ladislav.lhotka@nic.cz> Sat, 03 April 2021 13:08 UTC

Return-Path: <ladislav.lhotka@nic.cz>
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 93D073A0B8A; Sat, 3 Apr 2021 06:08:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.119
X-Spam-Level:
X-Spam-Status: No, score=-2.119 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, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 uYfByeKEnVaw; Sat, 3 Apr 2021 06:07:58 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (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 E5D403A0B6C; Sat, 3 Apr 2021 06:07:57 -0700 (PDT)
Received: from localhost (unknown [IPv6:2001:1488:fffe:6:a88f:7eff:fed2:45f8]) by mail.nic.cz (Postfix) with ESMTPSA id CA9B0140072; Sat, 3 Apr 2021 15:07:48 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1617455269; bh=SplQ8u1KnCCg20lfrULrKwd+0xhNCoGxypzeIztTBNI=; h=From:To:Date; b=tePl5TO/sA02dcSt6oYG5doA1p/7473vWZbY8HCgFlXtvVbioZ02UsZmbLWQNO24E cnuu4v0uWyHV/cc2BQXSVow3JHb/inTwRiLjDnJwFkL6QFgkGJeOC1HwBpZ24PY/Wj rlEuFnztt8yh+UnqTr2cUxHWnjNhBqib+7sVGXic=
From: Ladislav Lhotka <ladislav.lhotka@nic.cz>
To: Andy Bierman <andy@yumaworks.com>, Michal Vaško <mvasko@cesnet.cz>
Cc: "Eric Voit (evoit)" <evoit@cisco.com>, netconf <netconf@ietf.org>, netmod <netmod@ietf.org>
In-Reply-To: <CABCOCHSfR8dzSwpcE+R6-6hs96XO52wmaowj-O77=bdHa5sAQQ@mail.gmail.com>
References: <BL0PR11MB31226974AEC11A5936BA40C9A17A9@BL0PR11MB3122.namprd11.prod.outlook.com> <5830-60677580-9-1569b540@260964559> <CABCOCHSfR8dzSwpcE+R6-6hs96XO52wmaowj-O77=bdHa5sAQQ@mail.gmail.com>
Mail-Followup-To: Andy Bierman <andy@yumaworks.com>, Michal Vaško <mvasko@cesnet.cz>, "Eric Voit (evoit)" <evoit@cisco.com>, netconf <netconf@ietf.org>, netmod <netmod@ietf.org>
Date: Sat, 03 Apr 2021 15:07:48 +0200
Message-ID: <878s5ztt23.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Virus-Scanned: clamav-milter 0.102.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/nAGzUYFTTJs7D3rxxw1F4ZRL28Y>
Subject: Re: [netconf] [netmod] YANG Push module errors
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 03 Apr 2021 13:08:04 -0000

Andy Bierman <andy@yumaworks.com> writes:

> On Fri, Apr 2, 2021 at 12:49 PM Michal Vaško <mvasko@cesnet.cz> wrote:
>
>> Hi Eric,
>>
>> thanks for the answer.
>>
>> On Friday, April 02, 2021 15:43 CEST, "Eric Voit (evoit)" <evoit@cisco.com>
>> wrote:
>>
>> > Hi Michal,
>> >
>> > This sounds like a tooling issue to me.  I would expect that any augments
>> > would inherit the conditional nature of anything augmented.
>>
>> Perhaps, but there is nothing in the specification to hint this. On the
>> contrary, leafrefs, for example, explicitly require to be conditional on
>> the same set of if-features than their targets. But you are right, there is
>> no such requirements for augments. Still, if the feature is disabled and
>> the augment should be applied, since its target does not technically exist
>> in the schema, it cannot be found. That is the error our tools currently
>> produce.
>>
>>
> Maybe this is not clear enough in RFC 7950.
>
> This seems valid:
>
>     container foo {
>        if-feature X;
>         leaf bar { type string; }
>     }
>
>     augment /foo {
>         container Y;
>     }
>
> The YANG syntax validation should be done as if all features are enabled.
> It is a tooling issue if this is rejected. This is clear because the
> augment-stmt argument specifies a schema node.

Agreed.

>
> Another related issue:
>
>    container zed {
>       leaf baz {
>            type leafref {
>               path /foo/bar;
>            }
>        }
>     }

This is not permitted, see section 9.9 in RFC 7950:

   If the leaf that the leafref refers to is conditional based on one or
   more features (see Section 7.20.2), then the leaf with the leafref
   type MUST also be conditional based on at least the same set of
   features.

Lada

>
>
> This example is not clear because the path-stmt argument specifies a data
> node.
>
> Is it also valid YANG to have a leafref in an unconditional leaf point at
> an if-feature conditional leaf?
> Does leaf baz need "if-feature X" added?
> Is this a syntax error? A run-time error?  Neither?
> Is it invalid or does leaf /zed/baz simply have an empty value set?
> Is it OK for a leafref node to have an empty value set?
>
> This corner case keeps coming up in real YANG modules so it would be great
> if the standard clarified this behavior.
>
>
> Andy
>
>
>
>> > If you disagree, perhaps a thread to the netmod alias would get you an
>> > 'official' answer on the proper behavior.
>>
>> I have sent the email to "netconf" because that is WG that published it
>> but no harm in adding a copy for "netmod".
>>
>> > Eric
>> >
>> > > -----Original Message-----
>> > > From: netconf <netconf-bounces@ietf.org> On Behalf Of Michal Vaško
>> > > Sent: Thursday, April 1, 2021 11:14 AM
>> > > To: netconf <netconf@ietf.org>
>> > > Subject: [netconf] YANG Push module errors
>> > >
>> > > Hi,
>> > >
>> > > we are led to believe there is an error in the ietf-yang-push module
>> > published in
>> > > RFC 8641 but I wanted to discuss it here before submitting an errata.
>> > There are 2
>> > > augments [1] on a notification that is conditional on "configured"
>> feature
>> > but
>> > > these 2 augments are not conditional. Having this feature disabled, we
>> > were not
>> > > able to load this module into our tools. Does anyone disagree with
>> this or
>> > with
>> > > submitting an errata?
>> > >
>> > > Regards,
>> > > Michal
>> > >
>> > > [1] https://tools.ietf.org/html/rfc8641#page-48 and the next page
>> > >
>> > > _______________________________________________
>> > > netconf mailing list
>> > > netconf@ietf.org
>> > > https://www.ietf.org/mailman/listinfo/netconf
>>
>> _______________________________________________
>> netconf mailing list
>> netconf@ietf.org
>> https://www.ietf.org/mailman/listinfo/netconf
>>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67