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

Kent Watsen <kwatsen@juniper.net> Mon, 13 February 2017 15:34 UTC

Return-Path: <kwatsen@juniper.net>
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 065EE1296DE for <netmod@ietfa.amsl.com>; Mon, 13 Feb 2017 07:34:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.787
X-Spam-Level:
X-Spam-Status: No, score=-3.787 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.887, SPF_HELO_PASS=-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=junipernetworks.onmicrosoft.com
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 VV9MPJezeh8D for <netmod@ietfa.amsl.com>; Mon, 13 Feb 2017 07:34:24 -0800 (PST)
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0113.outbound.protection.outlook.com [104.47.37.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 919C91296D5 for <netmod@ietf.org>; Mon, 13 Feb 2017 07:34:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=junipernetworks.onmicrosoft.com; s=selector1-juniper-net; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mtrQI2IvkrFRQdl1av4XLCUlNvDklD7C1fdXQKNIlOU=; b=GpgWoXET8Ruq771fXQliU3MgDCDUHBKIJOOrmTg25aeZPMzxC0J/K4ODaoICX19RakJ6BrsI8MPjkiwjVuoVEJXc5rV2P4P2PQ6mbWQgPiJ3lyXnkXA2UFtoF9WXqIt88qqxTqZdevDZLU0LErud50M4ZhJbKc0C+wnZpD1kH5E=
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com (10.160.117.151) by BN3PR0501MB1443.namprd05.prod.outlook.com (10.160.117.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Mon, 13 Feb 2017 15:34:21 +0000
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) by BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) with mapi id 15.01.0919.011; Mon, 13 Feb 2017 15:34:20 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Peipei Guo <peipeiguo@gmail.com>, 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/JlqFmvdUA
Date: Mon, 13 Feb 2017 15:34:20 +0000
Message-ID: <8CC0B1F3-BA5C-4A81-8472-15698BFB7AEF@juniper.net>
References: <DM5PR16MB18505351770C06DC5AFE27FCA1590@DM5PR16MB1850.namprd16.prod.outlook.com>
In-Reply-To: <DM5PR16MB18505351770C06DC5AFE27FCA1590@DM5PR16MB1850.namprd16.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.1e.0.170107
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kwatsen@juniper.net;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [66.129.241.11]
x-ms-office365-filtering-correlation-id: 5a69f931-7b59-478d-9e5c-08d45425c7c0
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:BN3PR0501MB1443;
x-microsoft-exchange-diagnostics: 1; BN3PR0501MB1443; 7:MK42lts4RgKtgA9P4ZC99mP1djEiqueI3GWqxOi0JZOs8fW2Bw2Oqh9di+d3/0vV+JxtuCpXR41O9PuE8IIUwiPCEYV3DEwuk40m2TZgchTlwtU+jIHjLbVKz+UYiyN734XqNZi2wNRC+Lf/k8GTGQuW5BOPGUuI6/ibKUw0zsWtu3zt6lnagbKnP6SwwRhSiCAToMke+DGPK3JnpXlh0X71MthNqUm3P21C8syyWST5tLfNI7K+ZIAzfeGJYeCQuJ1s+AuVIw/F6sB3IdiVCkVmh34fMECi0pbjRWI0YV67gZvsZ4GeviKDEo3jyEOecChz0vPzI/4Zv1hpTdPQ+ra+bfOX07lwX58OxpcRDzzh4w9WSrC21mK/h6JTqLmKoNvPeOKtmIDk2wIfmSQBm61wx9Y1G3sg1YQU2C+jOzou6iFI5zbf8QtZVbYd5Mq3c2lJlAzg2Kna8byVkiatjSbmmtTxaRJRrBAaaB1bqCjR1AQfdHKkwBwMBovRqi5ekh2RkYpxL3fOujHEy2jcbA==
x-microsoft-antispam-prvs: <BN3PR0501MB144357A13245E35F0C1FB4ADA5590@BN3PR0501MB1443.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(50582790962513)(100405760836317)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(20161123558025)(6072148); SRVR:BN3PR0501MB1443; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0501MB1443;
x-forefront-prvs: 02176E2458
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(7916002)(39850400002)(39410400002)(39840400002)(39860400002)(39450400003)(377454003)(199003)(24454002)(189002)(50944005)(33656002)(6436002)(106116001)(105586002)(25786008)(68736007)(229853002)(106356001)(2900100001)(189998001)(76176999)(54356999)(6506006)(6486002)(50986999)(77096006)(39060400001)(8936002)(5660300001)(3660700001)(2501003)(97736004)(83506001)(6246003)(53546003)(38730400002)(8676002)(3280700002)(2906002)(122556002)(2950100002)(6116002)(53936002)(81166006)(102836003)(3846002)(81156014)(36756003)(7736002)(86362001)(54896002)(6306002)(6512007)(92566002)(101416001)(4001350100001)(66066001)(99286003)(236005)(83716003)(82746002)(104396002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0501MB1443; H:BN3PR0501MB1442.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_8CC0B1F3BA5C4A81847215698BFB7AEFjunipernet_"
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2017 15:34:20.4862 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0501MB1443
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/XMnslpOcwN7yXl5Uf68WEy5hZVk>
Subject: Re: [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: Mon, 13 Feb 2017 15:34:26 -0000

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

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