Subject: Re: [Netconf] [Technical Errata Reported] RFC8072 (5131)

From: Benoit Claise <[email-masked]>
Date: Wed, 11 Oct 2017 08:56:37 +0200

Dear YANG Patch Media Type authors,

What do you think of this proposed errata?

Regards, B.
> The following errata report has been submitted for RFC8072,
> "YANG Patch Media Type".
>
> --------------------------------------
> You may review the report below and at:
> http://www.rfc-editor.org/errata/eid5131
>
> --------------------------------------
> Type: Technical
> Reported by: Robert Wilton <[email-masked]>
>
> Section: 2.2
>
> Original Text
> -------------
> Regarding section 2.2 of RFC 8072, the third paragraph states:
>
>
>                                         ... 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.
>
> Corrected Text
> --------------
>                                        ... If the edit does not identify
>     any existing resource instance and the operation for the edit is
>     "delete" or "move" then the request MUST NOT be processed and a
>     "404 Not Found" error response MUST be sent by the server.
>
> Notes
> -----
> As per the second paragraph of section 2.2 of RFC 8072, the operations are expected to mirror the semantics of the "operation" attribute described in Section 7.2 of [RFC6241].
>
> The spec also doesn't specify what happens if it is a "create" operation and the resource already exists.  It should probably also state that "400 Bad Request" is returned.
>
> 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.
>
> --------------------------------------
> RFC8072 (draft-ietf-netconf-yang-patch-14)
> --------------------------------------
> Title               : YANG Patch Media Type
> Publication Date    : February 2017
> Author(s)           : A. Bierman, M. Bjorklund, K. Watsen
> Category            : PROPOSED STANDARD
> Source              : Network Configuration
> Area                : Operations and Management
> Stream              : IETF
> Verifying Party     : IESG
> .
>

---

From: Kent Watsen <[email-masked]>
Date: Wed, 11 Oct 2017 15:36:09 +0000

I think the existing text is correct.  If the resource instance doesn't exist, it can only be created.  If it doesn't exist, then it cannot be merged, replaced, deleted, or removed.

Kent (co-author)

--

Regards, B.
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rfc-2Deditor.org_errata_eid5131&d=DwICaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=KLQjPIYskU70WRcZ0nCQYZ4njobUB-tkMpQKKEBb8eE&s=5HhVTU7yZdrq0Ztpkqoqb2_yUmZJ9pk7jGCpEDJSLr0&e=
>

---

From: Andy Bierman <[email-masked]>
Date: Wed, 11 Oct 2017 09:08:48 -0700

On Wed, Oct 11, 2017 at 8:36 AM, Kent Watsen <[email-masked]> wrote:

>
> I think the existing text is correct.  If the resource instance doesn't
> exist, it can only be created.  If it doesn't exist, then it cannot be
> merged, replaced, deleted, or removed.
>
> Kent (co-author)
>
> --
>
looks OK

Andy

> > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rfc-
> 2Deditor.org_errata_eid5131&d=DwICaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-
> ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=
> KLQjPIYskU70WRcZ0nCQYZ4njobUB-tkMpQKKEBb8eE&s=5HhVTU7yZdrq0Ztpkqoqb2_
> yUmZJ9pk7jGCpEDJSLr0&e=
> >
> > As per the second paragraph of section 2.2 of RFC 8072, the operations
> are expected to mirror the semantics of the "operation" attribute described
> in Section 7.2 of [RFC6241].
> >
> > The spec also doesn't specify what happens if it is a "create" operation
> and the resource already exists.  It should probably also state that "400
> Bad Request" is returned.
> >
> > Instructions:
> > -------------

---

From: Robert Wilton <[email-masked]>
Date: Wed, 11 Oct 2017 17:09:23 +0100

Hi Kent,

But the previous paragraph in the draft states:

    The "merge", "replace", "create", "delete", and "remove" edit
    operations have exactly the same meanings as those defined for the
    "operation" attribute described inSection 7.2 of [RFC6241] <https://tools.ietf.org/html/rfc6241#section-7.2>.

That NETCONF section allows "merge" and "replace" on nodes that don't 
exist (they are just created).  Also a "remove" on a data node that 
doesn't exist doesn't return any error.  It is just a silent no-op.

So, it seems that the YANG Patch semantics are not the same as for 
NETCONF, which seems to conflict with the previous paragraph quoted above.

Thanks,
Rob

---

From: Andy Bierman <[email-masked]>
Date: Wed, 11 Oct 2017 09:14:52 -0700

On Wed, Oct 11, 2017 at 9:09 AM, Robert Wilton <[email-masked]> wrote:

>    "operation" attribute described in Section 7.2 of [RFC6241] <https://tools.ietf.org/html/rfc6241#section-7.2>.
>
>
>
> exist (they are just created).  Also a "remove" on a data node that doesn't
> exist doesn't return any error.  It is just a silent no-op.
>

YANG Patch returns an error for delete on a missing target resource  and
none of the
the other operations listed in that paragraph.  They do behave the same.

Andy

> You may review the report below and at:https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rfc-2Deditor.org_errata_eid5131&d=DwICaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=KLQjPIYskU70WRcZ0nCQYZ4njobUB-tkMpQKKEBb8eE&s=5HhVTU7yZdrq0Ztpkqoqb2_yUmZJ9pk7jGCpEDJSLr0&e=
>
> Reported by: Robert Wilton <[email-masked]> <[email-masked]>
>
> Section: 2.2
>
> Original Text
> -------------

---

From: Robert Wilton <[email-masked]>
Date: Wed, 11 Oct 2017 17:18:11 +0100

On 11/10/2017 17:08, Andy Bierman wrote:
>
>
> On Wed, Oct 11, 2017 at 8:36 AM, Kent Watsen <[email-masked] 
> <mailto:[email-masked]>> wrote:
>
>
>     I think the existing text is correct.  If the resource instance
>     doesn't exist, it can only be created.  If it doesn't exist, then
>     it cannot be merged, replaced, deleted, or removed.
>
>     Kent (co-author)
>
>     --
>
Do you mean the existing text looks OK, or the errata looks OK?

Thanks,
Rob

>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rfc-2Deditor.org_errata_eid5131&d=DwICaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=KLQjPIYskU70WRcZ0nCQYZ4njobUB-tkMpQKKEBb8eE&s=5HhVTU7yZdrq0Ztpkqoqb2_yUmZJ9pk7jGCpEDJSLr0&e=>
>     >
>     > Reported by: Robert Wilton <[email-masked]
>     <mailto:[email-masked]>>
>     >
>     > Section: 2.2
>     >
>     > Original Text
>     > -------------
>     > As per the second paragraph of section 2.2 of RFC 8072, the
>     operations are expected to mirror the semantics of the "operation"
>     attribute described in Section 7.2 of [RFC6241].
>     >
>     > The spec also doesn't specify what happens if it is a "create"
>     operation and the resource already exists.  It should probably
>     also state that "400 Bad Request" is returned.
>     >
>     > Instructions:
>     > -------------

---

From: Andy Bierman <[email-masked]>
Date: Wed, 11 Oct 2017 09:23:37 -0700

> Do you mean the existing text looks OK, or the errata looks OK?

errata

>> 2Deditor.org_errata_eid5131&d=DwICaQ&c=HAkYuh63rsuhr6Scbfh0U
>> jBXeMK-ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjI
>> SlaJdcZo&m=KLQjPIYskU70WRcZ0nCQYZ4njobUB-tkMpQKKEBb8eE&s=5Hh
>> VTU7yZdrq0Ztpkqoqb2_yUmZJ9pk7jGCpEDJSLr0&e=
>> >
>> not
>> operation and the resource already exists.  It should probably also state
>> that "400 Bad Request" is returned.
>> >
>> > Instructions:
>> > -------------

---

From: Kent Watsen <[email-masked]>
Date: Wed, 11 Oct 2017 17:48:29 +0000

That NETCONF section allows "merge" and "replace" on nodes that don't exist (they are just created).  Also a "remove" on a data node that doesn't exist doesn't return any error.  It is just a silent no-op.

So, it seems that the YANG Patch semantics are not the same as for NETCONF, which seems to conflict with the previous paragraph quoted above.

<KENT> good point.  I forgot that merge/replace are unintuitive that way.  Our software calculates the right operation to use every time.

---

From: Andy Bierman <[email-masked]>
Date: Wed, 11 Oct 2017 11:12:05 -0700

On Wed, Oct 11, 2017 at 10:48 AM, Kent Watsen <[email-masked]> wrote:

> <KENT> good point.  I forgot that merge/replace are unintuitive that way.
> Our software calculates the right operation to use every time.
>
But merge and replace do not cause errors if the target is missing, just
like NETCONF.
The only edit operations that require the target to exist (or an error is
returned)
are delete and move (as specified in the errata)

Andy

---

From: Benoit Claise <[email-masked]>
Date: Thu, 12 Oct 2017 09:57:01 +0200

Dear all,

I approved this errata.

Regards, B.
>
>
> On Wed, Oct 11, 2017 at 10:48 AM, Kent Watsen <[email-masked] 
>     That NETCONF section allows "merge" and "replace" on nodes that
>     don't exist (they are just created). Also a "remove" on a data
>     node that doesn't exist doesn't return any error.  It is just a
>     silent no-op.
>
>     <KENT> good point.  I forgot that merge/replace are unintuitive
>     that way.  Our software calculates the right operation to use
>     every time.
>
> But merge and replace do not cause errors if the target is missing, 
> just like NETCONF.
> The only edit operations that require the target to exist (or an error 
> is returned)

---

From: Kent Watsen <[email-masked]>
Date: Thu, 12 Oct 2017 12:49:25 +0000

The Errata itself has an error.  It should be “remove” (not “move”).

Sent from my iPhone

On Oct 12, 2017, at 3:57 AM, Benoit Claise <[email-masked]<mailto:[email-masked]>> wrote:

Dear all,

I approved this errata.

Regards, B.

On Wed, Oct 11, 2017 at 10:48 AM, Kent Watsen <[email-masked]<mailto:[email-masked]>> wrote:

<KENT> good point.  I forgot that merge/replace are unintuitive that way.  Our software calculates the right operation to use every time.
But merge and replace do not cause errors if the target is missing, just like NETCONF.
The only edit operations that require the target to exist (or an error is returned)
are delete and move (as specified in the errata)

Andy

---

From: Andy Bierman <[email-masked]>
Date: Thu, 12 Oct 2017 06:08:10 -0700

> The Errata itself has an error.  It should be “remove” (not “move”).

No -- "delete" and "move" are errors if the resource instance is missing.
The "remove" operation is like NETCONF "remove".  It is is not an error
if "remove" fails (that's why it exists, separate from "delete")

Andy

> Sent from my iPhone
>
> On Oct 12, 2017, at 3:57 AM, Benoit Claise <[email-masked]> wrote:
>
> Dear all,
>
> I approved this errata.
>
> Regards, B.
>
>
>
>> <KENT> good point.  I forgot that merge/replace are unintuitive that
>> way.  Our software calculates the right operation to use every time.
>>

---

From: Robert Wilton <[email-masked]>
Date: Thu, 12 Oct 2017 14:12:21 +0100

Hi Kent,

No, I think that "move" is right.

You don't want to fail a "remove" operation because the node doesn't 
exist (otherwise it would be exactly the same as a NETCONF "delete" 
operation).  But you do want to fail a "move" operation that attempts to 
move a data node that doesn't exist.

Thanks,
Rob

On 12/10/2017 13:49, Kent Watsen wrote:
>>>     So, it seems that the YANG Patch semantics are not the same as
>>>     for NETCONF, which seems to conflict with the previous paragraph
>>>     quoted above.
>>>