Re: [netconf] [Technical Errata Reported] RFC8040 (5565)

Ignas Bagdonas <ibagdona@gmail.com> Fri, 18 October 2019 15:03 UTC

Return-Path: <ibagdona@gmail.com>
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 E0CF21202DD for <netconf@ietfa.amsl.com>; Fri, 18 Oct 2019 08:03:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 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_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 (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 dRKNRlNTPQOo for <netconf@ietfa.amsl.com>; Fri, 18 Oct 2019 08:03:25 -0700 (PDT)
Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (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 980E9120CB3 for <netconf@ietf.org>; Fri, 18 Oct 2019 08:03:24 -0700 (PDT)
Received: by mail-lj1-x232.google.com with SMTP id m7so6586693lji.2 for <netconf@ietf.org>; Fri, 18 Oct 2019 08:03:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MusNR0sbuxs2wm3VUD1RvTyaBQ2Emhv9vTjSeyIIFPo=; b=JtEzqimZHBEFuk83pmI/vbVYO3zGwpN1sW2MBpKj5nY4gCKOVAc/YK7xD1G8nfMew+ iqNoOzM3D/blJ6v6VtJ5mfUj+Vw5PYQyYJSe0aj5i8bYNL+Pk6FUZ0If5g75/kImQ3XA 3LASWmf66RHtCDWVXWzGvHhnmskT68ZtuStGnPXX8zcOMPLMbsAHnNZLM5nPLyeLvFur 7Fc5rFkcFZTh7yhzxUjQTU2WVd+tclPw/WXW/EhT/T5ixZ15Q/r2RK+74fzstucslo58 PF4WJ4BcuotyPUdPkp0M0kYEXXdXEWIpqaWKpdFKFZxPyStvz3pfZvjZNF5I1+U2+d7G zp6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MusNR0sbuxs2wm3VUD1RvTyaBQ2Emhv9vTjSeyIIFPo=; b=jxBRTCFYdwhhGjzS2BvscaZ1zmwue2pIkPRwLg8x8VTQtVvj6swcVifVfe03EAJ7Ze T13/MKDFuZDWyNZPUxD5tjrA42tkFF2sC0Hsbr824cuInLIZnBXNtx20J9R62WTQA01e ZR++kEmOv6vcfKseQPSoJ78iGB9C5jltq7EoRfeUOKYRoMtIwWUZuy2UWMQBArzO5AX8 5tpDkvwRnRCZDABeZLcVIQj3QY6cflDSOqmElWaJQmFvI3krEdO16+pfk5AD/toSf1VC A+GCDA2fyzFmu0w8wNbBhfOVN+gDkxTEMWA5aSfPrcYSHrC2LyPAdDyDeJj50m1ntPBn +ePQ==
X-Gm-Message-State: APjAAAVvG425TOWcF67Zk+hP8IbIlbm+oKQkuWZf0F/g6sAmOFGye/uy KHOex4KEAwn/of305SGvZrl5ao2qufTi+UUQsEM=
X-Google-Smtp-Source: APXvYqy/XlEZcuGdAtJFTwydQc+1Z9T5eZ0k0sovG2BdLPdRtq+YchuBdVDm00RVZbN2QoneYN2XkrOPTRzQPOdqG0w=
X-Received: by 2002:a2e:b4a8:: with SMTP id q8mr6489462ljm.106.1571411002291; Fri, 18 Oct 2019 08:03:22 -0700 (PDT)
MIME-Version: 1.0
References: <B8F9A780D330094D99AF023C5877DABA9B177661@nkgeml513-mbs.china.huawei.com> <20181203.104808.838283353261944785.mbj@tail-f.com> <B8F9A780D330094D99AF023C5877DABA9B1B0305@nkgeml513-mbx.china.huawei.com> <20181218.124653.2050609264975088634.mbj@tail-f.com>
In-Reply-To: <20181218.124653.2050609264975088634.mbj@tail-f.com>
From: Ignas Bagdonas <ibagdona@gmail.com>
Date: Fri, 18 Oct 2019 16:03:10 +0100
Message-ID: <CABwpohvXiRjYNeL4-R1UNp6Br4OnjpH+CFPO5Mc3eOxevAn4RQ@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: Qin Wu <bill.wu@huawei.com>, RFC Errata System <rfc-editor@rfc-editor.org>, Andy Bierman <andy@yumaworks.com>, Kent Watsen <kwatsen@juniper.net>, Warren Kumari <warren@kumari.net>, Mahesh Jethanandani <mjethanandani@gmail.com>, netconf@ietf.org
Content-Type: multipart/alternative; boundary="000000000000967cf7059530a225"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/aUJKWm2HM6x60_PYxAenKWvHuv4>
Subject: Re: [netconf] [Technical Errata Reported] RFC8040 (5565)
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: Fri, 18 Oct 2019 15:03:28 -0000

Let's split the discussion into two parts - 8040 and 8072.

For RFC 8072 a separate errata would need to be raised. Or likely a
document on error handling clarifications, or a -bis to a base document.

For RFC 8040 section 7 status codes, it does not appear to be practical to
require full equivalence of protocol semantics and error handling between
8040 and 6241 at the cost of additional ambiguities and complexity. What
might be of value is to look at the existing implementations and how do
they treat such error cases, and publish either an implementation
recommendation document, or a -bis for a base specification. Errata is not
a suitable mechanism for this.

Rejected if no objections?





On Tue, Dec 18, 2018 at 11:46 AM Martin Bjorklund <mbj@tail-f.com> wrote:

> Qin Wu <bill.wu@huawei.com> wrote:
> > -----邮件原件-----
> > 发件人: Martin Bjorklund [mailto:mbj@tail-f.com]
> > 发送时间: 2018年12月3日 17:48
> > 收件人: Qin Wu
> > 抄送: rfc-editor@rfc-editor.org; andy@yumaworks.com; kwatsen@juniper.net;
> ibagdona@gmail.com; warren@kumari.net; mjethanandani@gmail.com;
> netconf@ietf.org
> > 主题: Re: [Technical Errata Reported] RFC8040 (5565)
> >
> > Qin Wu <bill.wu@huawei.com> wrote:
> > > See data-missing definition in RFC6241:
> > > "
> > >    error-tag:      data-missing
> > >    error-type:     application
> > >    error-severity: error
> > >    error-info:     none
> > >    Description:    Request could not be completed because the relevant
> > >                    data model content does not exist.  For example,
> > >                    a "delete" operation was attempted on
> > >                    data that does not exist.
> > >
> > > "
> > > And status code 409 definition in RFC7231 "
> > > 6.5.8.  409 Conflict
> > >
> > >    The 409 (Conflict) status code indicates that the request could not
> > >    be completed due to a conflict with the current state of the target
> > >    resource.  This code is used in situations where the user might be
> > >    able to resolve the conflict and resubmit the request.  The server
> > >    SHOULD generate a payload that includes enough information for a
> user
> > >    to recognize the source of the conflict.
> > >
> > > 6.5.4.  404 Not Found
> > >
> > >    The 404 (Not Found) status code indicates that the origin server did
> > >    not find a current representation for the target resource or is not
> > >    willing to disclose that one exists.  A 404 status code does not
> > >    indicate whether this lack of representation is temporary or
> > >    permanent; the 410 (Gone) status code is preferred over 404 if the
> > >    origin server knows, presumably through some configurable means,
> that
> > >    the condition is likely to be permanent.
> > >
> > > "
> > > Which make me feel data missing is more related to 404 instead of 409.
> Wrong?
> >
> > 404 means that *the requested resource* doesn't exist.
> >
> > The example "delete" operation in 6241 refers to an edit-config with
> operation "delete".  The corresponding RESTCONF operation is "delete"
> > within a YANG PATCH.  In this case, the requested resource exists, so a
> 404 would not be correct.
> >
> > So there are certainly cases where "data-missing" does not mean 404.
> >
> > But I guess there are also cases where "data-missing" will actually
> correspond to a 404.  For example an edit-config that just tries to delete
> a non-existing node will be a "data-missing", and if the corresponding
> RESTCONF request is a DELETE on the resource, it will be
> > 404 - but if the corresponding RESTCONF request is a YANG PATCH with a
> "delete" edit, it will be 409.
> >
> >
> > So, maybe the proper fix is
> >
> >                | data-missing            | 404, 409           |
> >
> > [Qin]: Tend to agree, but YANG patch supporting the ability to delete
> child resources defined in RFC8072 also support return 404,
> > See section 2.2 of RFC8072:
> > "
> >    If the edit does not identify
> >    any existing resource instance and the operation for the edit is not
> >    "create", then the request MUST NOT be processed and a "404 Not
> >    Found" error response MUST be sent by the server.
> > "
>
> This seems to be an error.  RFC 5789 (HTTP PATCH) has this:
>
>    Conflicting state:  Can be specified with a 409 (Conflict) status
>       code when the request cannot be applied given the state of the
>       resource.  For example, if the client attempted to apply a
>       structural modification and the structures assumed to exist did
>       not exist (with XML, a patch might specify changing element 'foo'
>       to element 'bar' but element 'foo' might not exist).
>
>
> /martin
>
>
>
> >
> > /martin
> >
> >
> >
> > >
> > > -Qin
> > > -----邮件原件-----
> > > 发件人: Martin Bjorklund [mailto:mbj@tail-f.com]
> > > 发送时间: 2018年12月3日 16:54
> > > 收件人: rfc-editor@rfc-editor.org
> > > 抄送: andy@yumaworks.com; kwatsen@juniper.net; ibagdona@gmail.com;
> > > warren@kumari.net; mjethanandani@gmail.com; Qin Wu; netconf@ietf.org
> > > 主题: Re: [Technical Errata Reported] RFC8040 (5565)
> > >
> > > Hi,
> > >
> > > I don't think this errata should be accepted.  404 means that the
> requested resource doesn't exist, but "data-missing" can be returned e.g.
> if you try to patch an existing resource of type leafref to point to a
> non-existing leaf.
> > >
> > >
> > > /martin
> > >
> > >
> > > RFC Errata System <rfc-editor@rfc-editor.org> wrote:
> > > > The following errata report has been submitted for RFC8040,
> > > > "RESTCONF Protocol".
> > > >
> > > > --------------------------------------
> > > > You may review the report below and at:
> > > > http://www.rfc-editor.org/errata/eid5565
> > > >
> > > > --------------------------------------
> > > > Type: Technical
> > > > Reported by: Qin Wu <bill.wu@huawei.com>
> > > >
> > > > Section: 7
> > > >
> > > > Original Text
> > > > -------------
> > > >               +-------------------------+------------------+
> > > >               | error-tag               | status code      |
> > > >               +-------------------------+------------------+
> > > >               | in-use                  | 409              |
> > > >               | lock-denied             | 409              |
> > > >               | resource-denied         | 409              |
> > > >               | data-exists             | 409              |
> > > >               | data-missing            | 409              |
> > > >
> > > >
> > > > Corrected Text
> > > > --------------
> > > >               +-------------------------+------------------+
> > > >               | error-tag               | status code      |
> > > >               +-------------------------+------------------+
> > > >               | in-use                  | 409              |
> > > >               | lock-denied             | 409              |
> > > >               | resource-denied         | 409              |
> > > >               | data-exists             | 409              |
> > > >               | data-missing            | 404              |
> > > >
> > > >
> > > > Notes
> > > > -----
> > > > The <error-tag> data missing should be mapped to status code '404'
> instead of '409' to get consistent with the defintion of data-missing in
> RFC6241.
> > > >
> > > > Instructions:
> > > > -------------
> > > > This erratum is currently posted as "Reported". If necessary, please
> > > > use "Reply All" to discuss whether it should be verified or rejected.
> > > > When a decision is reached, the verifying party can log in to change
> > > > the status and edit the report, if necessary.
> > > >
> > > > --------------------------------------
> > > > RFC8040 (draft-ietf-netconf-restconf-18)
> > > > --------------------------------------
> > > > Title               : RESTCONF Protocol
> > > > Publication Date    : January 2017
> > > > Author(s)           : A. Bierman, M. Bjorklund, K. Watsen
> > > > Category            : PROPOSED STANDARD
> > > > Source              : Network Configuration
> > > > Area                : Operations and Management
> > > > Stream              : IETF
> > > > Verifying Party     : IESG
> > > >
>