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

Peipei Guo <peipeiguo@gmail.com> Mon, 13 February 2017 08:13 UTC

Return-Path: <peipeiguo@gmail.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 36FBF129551 for <netmod@ietfa.amsl.com>; Mon, 13 Feb 2017 00:13:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 iI0pyFBz4OAF for <netmod@ietfa.amsl.com>; Mon, 13 Feb 2017 00:13:57 -0800 (PST)
Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3AD09129416 for <netmod@ietf.org>; Mon, 13 Feb 2017 00:13:57 -0800 (PST)
Received: by mail-pg0-x244.google.com with SMTP id 75so9224240pgf.3 for <netmod@ietf.org>; Mon, 13 Feb 2017 00:13:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:thread-topic:thread-index:date:message-id :content-language:mime-version; bh=V4lOQWmhoQi5FmTbZMFsMr69obCFb/ko4REwkrtl+PM=; b=agR6FQYeLSqy4gid6N63n71U2Eliwo3rkBhYFrVtMP9fjFX7qEN2FlnmImZbq3jtjh m65JsjfP0vsmSliYtmUUR+xL8xhXsp9tfsh7/9lec8v0oQeE1hKRXgEpLQNPfB7eOSaN Up6cKWiGh0lPOwtMNcIr+P01TR7GRcHDcFCPV3akd0S1zLaMYomQ33blo8wGgUmzlmHB zLr/QyxuTImEi4Vs4i+PPd0rrIV1a9uTksGNHaINGLM0QAU6o6AvM+ILEYbe7IoEClp4 n0u1LElDmifFHS5VUsHC129Z3qOOTvFfznYm1nTXCqevNCe7jO9ohGlNZe+Q979+0w79 6irw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:thread-topic:thread-index:date :message-id:content-language:mime-version; bh=V4lOQWmhoQi5FmTbZMFsMr69obCFb/ko4REwkrtl+PM=; b=QL+3GqFwTgvEaPaOq3pNI1MkD4e1BPbBlByg7iEN40+saxEDkVWXdKiRqyApF/wi6I XvoHdqhTOjl2EsC04DCs0JSWyHYJFkESOuilQp8Iix+grg4k9wv20IAlOkAj+kv3srjG KL+dFkr708Y9aVnYN6B9zqBM/W65SIBUKTNThXs3fseI12ghlaladrDkZFWg0LdbvkPy mf/wZld3NiZiaf8gVHLllVlwkOhEHdf9/RVBjTK/tfqIvgh3Sx2DGVu6gNzA32aj/ryr l3IbK1LO5KkVbIMCjeU9mTIkpRZwqXUegQPsmElmhrd4/4LZPKQLwVDlLQxMpyh0NAIA LHJQ==
X-Gm-Message-State: AMke39n+qcbP/umED+97aWh0bGQFLK1ugJnRhDSO/MCle1X6nR0BvZGODWBAoc2r9NQ/uw==
X-Received: by 10.84.140.133 with SMTP id 5mr28566296plt.178.1486973635968; Mon, 13 Feb 2017 00:13:55 -0800 (PST)
Received: from DM5PR16MB1850.namprd16.prod.outlook.com ([40.97.129.5]) by smtp.gmail.com with ESMTPSA id l71sm19122419pga.13.2017.02.13.00.13.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Feb 2017 00:13:55 -0800 (PST)
From: Peipei Guo <peipeiguo@gmail.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/Jlg==
X-MS-Exchange-MessageSentRepresentingType: 1
Date: Mon, 13 Feb 2017 08:13:48 +0000
Message-ID: <DM5PR16MB18505351770C06DC5AFE27FCA1590@DM5PR16MB1850.namprd16.prod.outlook.com>
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Content-Type: multipart/alternative; boundary="_000_DM5PR16MB18505351770C06DC5AFE27FCA1590DM5PR16MB1850namp_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/jYHSJ7yq2frRWmBqt6PGHWp1KVk>
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 08:13:59 -0000

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 ¨C 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