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

Kent Watsen <kwatsen@juniper.net> Fri, 10 February 2017 18:55 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 9AAB212956D for <netmod@ietfa.amsl.com>; Fri, 10 Feb 2017 10:55:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.921
X-Spam-Level:
X-Spam-Status: No, score=-1.921 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_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-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 9icy0n5wbG_T for <netmod@ietfa.amsl.com>; Fri, 10 Feb 2017 10:55:33 -0800 (PST)
Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0134.outbound.protection.outlook.com [104.47.34.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6524512944E for <netmod@ietf.org>; Fri, 10 Feb 2017 10:55:33 -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=zz/5eF9gIwBKdGEzUz9K2xVpEbfX6Z/TN30k5v5HD0g=; b=aTOl8fm/QBYFOZ7J78bjI6mIerz7dSkTd0Xhea+xExsaNIOn4ygr8DU9NCK9Aepkz3iVqiHq7pN3vA05zrAmLhXyuZ2LlbOhwJfGAkTw7oIFa95UhFh+lmF4zIM3hB+tG2pjxu2+EPY3kDtOiH7P7O+DImsbM+AI8sNN5Dc0u0w=
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com (10.160.117.151) by BN3PR0501MB1444.namprd05.prod.outlook.com (10.160.117.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Fri, 10 Feb 2017 18:55:32 +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.0888.026; Fri, 10 Feb 2017 18:55:32 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: 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: AQHSg89B3/Vl76vPg0KjDwDdYx/Jlg==
Date: Fri, 10 Feb 2017 18:55:32 +0000
Message-ID: <663E4FAE-CA99-4FBB-B721-91455B2885CF@juniper.net>
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: 88adb76c-53e7-40b6-9104-08d451e663d3
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:BN3PR0501MB1444;
x-microsoft-exchange-diagnostics: 1; BN3PR0501MB1444; 7:e8ckC0QWWDztrDrP1Qj8ZHRbpObfjLsBnsSBrA4DgLhnATNJntWDLKN42nHPzqaVjsld4Wfdkl6JqFoNvpfliF5BfFGLaZDn+0o3B8SB4Tv5taEYuEXAe5ExWWkuA9T+4E45XE9D3T8+b98Z6eACnYkO4bCrHXgKUmSSL5J7yaUSBeK+b0kJVUwT1h5akSOghYyENirQURMngtlueNo1nGmOeLQwGqdQ5rBaBlbWzZvaLQqBLEfXY0tUH7fV9bvMzHTJAjQeR8enBEd9ng47B36kVLybHBgX6amwj8IKv+mM5IYxWfp76HJhFffSj+9rXxLsQMFpYlMudqCoHkL/affCBQ85UuqP2dSxB2FqXdGEEFjzwdHL32h1UyNNvxkDxHfT0LMz/6aCE8Ubke5mX74AEmirYlWXVeHam7XfgmrX4HBlXLtbMqIMV84TGIMstpQx0+p3EsryWGQ7UQR1qqVnNfZ6tqIbhMmyLk9dObsDBLBkQCT9zXffF0gWgzGc6DnQuea2GAv0MkBB+woiAQ==
x-microsoft-antispam-prvs: <BN3PR0501MB14443F607F2CFAEA691870A1A5440@BN3PR0501MB1444.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(50582790962513)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(20161123558025)(6072148); SRVR:BN3PR0501MB1444; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0501MB1444;
x-forefront-prvs: 0214EB3F68
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(7916002)(39850400002)(39410400002)(39840400002)(39450400003)(39860400002)(377454003)(24454002)(199003)(50944005)(189002)(8676002)(6506006)(6486002)(101416001)(81166006)(229853002)(82746002)(77096006)(9326002)(83506001)(33656002)(83716003)(53936002)(106116001)(81156014)(122556002)(106356001)(86362001)(4001350100001)(97736004)(2501003)(105586002)(66066001)(50986999)(54356999)(8936002)(25786008)(6436002)(99286003)(6306002)(236005)(189998001)(6512007)(54896002)(2900100001)(3846002)(68736007)(5660300001)(102836003)(6116002)(3660700001)(38730400002)(53546003)(92566002)(36756003)(3280700002)(6246003)(7736002)(2906002)(104396002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0501MB1444; 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_663E4FAECA994FBBB72191455B2885CFjunipernet_"
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2017 18:55:32.3970 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0501MB1444
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/mgQvwK3tTiHeCbbXTbxe7CjijhI>
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: Fri, 10 Feb 2017 18:55:35 -0000

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