[netmod] 答复: Conflicting usage scenario for "invalid-value" error-tag between RFC 6241 & RFC 6020

"Guopeipei (Peipei Guo)" <guopeipei@huawei.com> Tue, 14 February 2017 08:25 UTC

Return-Path: <guopeipei@huawei.com>
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 41D6D129420 for <netmod@ietfa.amsl.com>; Tue, 14 Feb 2017 00:25:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.221
X-Spam-Level:
X-Spam-Status: No, score=-4.221 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 GgQycAGjs2nS for <netmod@ietfa.amsl.com>; Tue, 14 Feb 2017 00:25:11 -0800 (PST)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CC50412940E for <netmod@ietf.org>; Tue, 14 Feb 2017 00:25:10 -0800 (PST)
Received: from 172.18.7.190 (EHLO lhreml702-cah.china.huawei.com) ([172.18.7.190]) by lhrrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DAP09238; Tue, 14 Feb 2017 08:25:07 +0000 (GMT)
Received: from NKGEML411-HUB.china.huawei.com (10.98.56.70) by lhreml702-cah.china.huawei.com (10.201.5.99) with Microsoft SMTP Server (TLS) id 14.3.301.0; Tue, 14 Feb 2017 08:24:51 +0000
Received: from NKGEML513-MBS.china.huawei.com ([169.254.2.43]) by nkgeml411-hub.china.huawei.com ([10.98.56.70]) with mapi id 14.03.0235.001; Tue, 14 Feb 2017 16:24:38 +0800
From: "Guopeipei (Peipei Guo)" <guopeipei@huawei.com>
To: Kent Watsen <kwatsen@juniper.net>, Rohit pobbathi <rohit.pobbathi@huawei.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Conflicting usage scenario for "invalid-value" error-tag between RFC 6241 & RFC 6020
Thread-Index: AQHShdEZ3/Vl76vPg0KjDwDdYx/JlqFmvdUAgAFmq7A=
Date: Tue, 14 Feb 2017 08:24:39 +0000
Message-ID: <9FC7EF52C614284C896188640F8C655FB6EA3C8E@nkgeml513-mbs.china.huawei.com>
References: <DM5PR16MB18505351770C06DC5AFE27FCA1590@DM5PR16MB1850.namprd16.prod.outlook.com> <8CC0B1F3-BA5C-4A81-8472-15698BFB7AEF@juniper.net>
In-Reply-To: <8CC0B1F3-BA5C-4A81-8472-15698BFB7AEF@juniper.net>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.134.137.162]
Content-Type: multipart/alternative; boundary="_000_9FC7EF52C614284C896188640F8C655FB6EA3C8Enkgeml513mbschi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.58A2BEE4.03A8, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.2.43, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: 144194e6c0a2b57462f7f4db5ecd76e3
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/99Q3oZGQtBfPf2qgN22TJ1pWqPE>
Subject: [netmod] 答复: Conflicting usage scenario for "invalid-value" error-tag between RFC 6241 & RFC 6020
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 14 Feb 2017 08:25:15 -0000

Thanks Kent. My personally opinion is: it might be RFC6241’s errata. The reasons are:
1. RFC6020/7950 is more clear than RFC6241 for the usage of error-tag. And it is a MUST rule for Payload Parsing in YANG 1.0 and YANG 1.1.
2. RFC6241 is just give it as the example when define the well-known error-tag “invalid-value” and “bad-element”.

Hi Andy, Eric,
What is your opinion?

Regards,
Peipei Guo
发件人: netmod [mailto:netmod-bounces@ietf.org] 代表 Kent Watsen
发送时间: 2017年2月13日 23:34
收件人: Peipei Guo; Rohit pobbathi; netmod@ietf.org
主题: Re: [netmod] Conflicting usage scenario for "invalid-value" error-tag between RFC 6241 & RFC 6020

By "personally, I think YANG got it wrong and so it should be fixed there", I'm suggesting that this might be RFC 7950/6020 errata.   But it is just my opinion, whether it matches group consensus remains to be seen...

Kent


On 2/13/17, 3:13 AM, "Peipei Guo" <peipeiguo@gmail.com<mailto:peipeiguo@gmail.com>> wrote:


Hi Kent,

Your conclusion is conflict with the above analysis. So do you means YANG RFC7950/6020 should be correct, RFC6241 is wrong and should fix it. Right?

Regards,
Peipei Guo

发件人: Kent Watsen
已发送: 2月11日星期六 上午2:56
主题: Re: [netmod] Conflicting usage scenario for "invalid-value" error-tag between RFC 6241 & RFC 6020
收件人: Rohit pobbathi, netmod@ietf.org<mailto:netmod@ietf.org>

Hi Rohit,



On one hand, this seems like a protocol issue, so opting for NETCONF's definitions makes sense.   On the other hand, RFC 6241 is just defining the error-tag without mandating when it's used, whereas RFC 7950 is specifying when it's to be used, so opting for YANG's normative language makes sense (it does no harm).



Personally, I think YANG got it wrong and so it should be fixed there.



Kent // as a contributor





On 2/10/17, 9:25 AM, "Rohit pobbathi" <rohit.pobbathi@huawei.com<mailto:rohit.pobbathi@huawei.com>> wrote:



Hi,



Repeating a query about RFC Section conflict for the usage of error-tag usage during leaf data value mismatch in range/length/pattern.



RFC 6241 Appendix A.  NETCONF Error List – provides the below description for “invalid-value” & “bad-element”

   error-tag:         invalid-value

   error-type:       protocol, application

   error-severity: error

   error-info:       none

   Description:    The request specifies an unacceptable value for one

                             or more parameters.



   error-tag:         bad-element

   error-type:       protocol, application

   error-severity: error

   error-info:        <bad-element> : name of the element w/ bad value

   Description:     An element value is not correct; e.g., wrong type,

                              out of range, pattern mismatch.



RFC 6020 Section 8.3.1.  Payload Parsing

   o  If a leaf data value does not match the type constraints for the

      leaf, including those defined in the type's "range", "length", and

      "pattern" properties, the server MUST reply with an

      "invalid-value" error-tag in the rpc-error, and with the error-

      app-tag and error-message associated with the constraint, if any

      exist.



For leaf data value mismatch in range/length/pattern there is conflict in the error-tag suggested by RFC 6241 & RFC 6020.

Please confirm which is the right error-tag to be used in a standard Netconf Server implementation.



Regards,

Rohit Pobbathi