Subject: Re: [netconf] Clarification on NETCONF edit-config default-operation replace

From: "Rob Wilton (rwilton)" <[email-masked]>
Date: Mon, 11 Jan 2021 14:47:47 +0000

Sorry, digging up an old thread here.

I agree with the outcome of the referenced thread, but I wonder whether it wouldn’t be helpful to have an errata to clarify the NETCONF RFC, at least so that we fix this text in future?

One of my colleagues read the NETCONF RFC and took “default-operation replace” to be equivalent to a copy-config operation.  I also note that some of the references on the web seem to the describe the wrong behaviour.

Specifically, I wonder whether we should change:

         replace:  The configuration data in the <config> parameter

            completely replaces the configuration in the target

            datastore.  This is useful for loading previously saved

            configuration data.

to:

         replace:  The configuration data in the <config> parameter

            replaces the related configuration in the target

            datastore.

Regards,
Rob

From: netconf <[email-masked]> On Behalf Of Sterne, Jason (Nokia - CA/Ottawa)
Sent: 09 March 2020 13:20
To: Ivory, William <[email-masked]>; [email-masked]
Subject: Re: [netconf] Clarification on NETCONF edit-config default-operation replace

Hello William,

There was a discussion about this on the list a few years ago.  See the thread with subject:

Clarification request for NETCONF edit-config default-operation replace

An edit-config can't be used as a replacement for a full "replace at root" of the entire config like a copy-config.

Jason

From: netconf <[email-masked]<mailto:[email-masked]>> On Behalf Of Ivory, William
Sent: Thursday, March 5, 2020 7:35 AM
To: [email-masked]<mailto:[email-masked]>
Subject: [netconf] Clarification on NETCONF edit-config default-operation replace

Hi,

I'd appreciate clarification on the following NETCONF operations relating to copy-config and edit-config:

My understanding is as follows:

- <copy-config> completely replaces any existing configuration

- <edit-config> with operation:replace attribute will replace any existing configuration with new configuration for nodes specified inside the <config> operation. The attribute may be at any level in the request, and applies only to the node specified and nodes under that node.

Where I'm not clear is the <edit-config> operation with the default-operation parameter set to replace. RFC 6241 section 7.2 states:

         replace:  The configuration data in the <config> parameter

            completely replaces the configuration in the target

            datastore.  This is useful for loading previously saved

            configuration data.

Does this mean that this is the equivalent of the <copy-config> operation, ie ALL existing configuration should be removed, even if there is no explicit replacement in the new <config> section?

Thanks,

William

---

From: Andy Bierman <[email-masked]>
Date: Mon, 11 Jan 2021 07:18:13 -0800

On Mon, Jan 11, 2021 at 6:48 AM Rob Wilton (rwilton) <rwilton=
[email-masked]> wrote:

> I agree with the outcome of the referenced thread, but I wonder whether it
> wouldn’t be helpful to have an errata to clarify the NETCONF RFC, at least
> so that we fix this text in future?
>
>
>
> One of my colleagues read the NETCONF RFC and took “default-operation
> replace” to be equivalent to a copy-config operation.  I also note that
> some of the references on the web seem to the describe the wrong behaviour.
>
>
>

No this should not be changed.
It has been in use for  about a decade.
You propose to remove the only way to replace the entire config and make a
huge NBC-change
to provide a redundant mechanism instead.

Regards,
> Rob

Andy

>
>
>
>
> *From:* netconf <[email-masked]> *On Behalf Of *Sterne, Jason
> (Nokia - CA/Ottawa)
> *Sent:* 09 March 2020 13:20
> *To:* Ivory, William <[email-masked]>; [email-masked]
> *Subject:* Re: [netconf] Clarification on NETCONF edit-config
> default-operation replace
>
>
>
> Hello William,
>
>
>
> *From:* netconf <[email-masked]> *On Behalf Of *Ivory, William
> *Sent:* Thursday, March 5, 2020 7:35 AM
> *To:* [email-masked]
> *Subject:* [netconf] Clarification on NETCONF edit-config
> default-operation replace
>
>
>
> Hi,
>
>
>
> - <edit-config> with operation:replace attribute will replace any existing
> configuration with new configuration for nodes specified inside the
> <config> operation. The attribute may be at any level in the request, and
> applies only to the node specified and nodes under that node.
>
>
>
> Where I'm not clear is the <edit-config> operation with the
> default-operation parameter set to replace. RFC 6241 section 7.2 states:
>
>
>
> Does this mean that this is the equivalent of the <copy-config> operation,
> ie ALL existing configuration should be removed, even if there is no
> explicit replacement in the new <config> section?
>
>
>
> Thanks,
>
>
>
> William
>
>
>
> _______________________________________________
> netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
>

---

From: "Rob Wilton (rwilton)" <[email-masked]>
Date: Mon, 11 Jan 2021 15:33:45 +0000

Hi Andy,

Perhaps we are crossing wires here.

I’m not trying to change the behaviour, just trying to ensure that the spec describes the behaviour unambiguously.  My proposed text was intended to clarify the behaviour to be consistent with Jason’s statement below and the conclusion of this thread: https://mailarchive.ietf.org/arch/msg/netconf/DTPlkJf4enKNHXkBWn49np2e-8c/

Are you disagreeing with Jason’s statement “An edit-config can't be used as a replacement for a full "replace at root" of the entire config like a copy-config” or the prior conclusion to the linked thread above?

Regards,
Rob

From: Andy Bierman <[email-masked]>
Sent: 11 January 2021 15:18
To: Rob Wilton (rwilton) <[email-masked]>
Cc: Sterne, Jason (Nokia - CA/Ottawa) <[email-masked]>; [email-masked]
Subject: Re: [netconf] Clarification on NETCONF edit-config default-operation replace

On Mon, Jan 11, 2021 at 6:48 AM Rob Wilton (rwilton) <rwilton=[email-masked]<mailto:[email-masked]>> wrote:
Sorry, digging up an old thread here.

            configuration data.

to:

            datastore.

No this should not be changed.
It has been in use for  about a decade.
You propose to remove the only way to replace the entire config and make a huge NBC-change
to provide a redundant mechanism instead.

Regards,
Rob

Andy

From: netconf <[email-masked]<mailto:[email-masked]>> On Behalf Of Sterne, Jason (Nokia - CA/Ottawa)
Sent: 09 March 2020 13:20
To: Ivory, William <[email-masked]<mailto:[email-masked]>>; [email-masked]<mailto:[email-masked]>
Subject: Re: [netconf] Clarification on NETCONF edit-config default-operation replace

Hello William,

Jason

Hi,

            configuration data.

Thanks,

William

_______________________________________________
netconf mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/netconf

---

From: Andy Bierman <[email-masked]>
Date: Mon, 11 Jan 2021 07:53:01 -0800

On Mon, Jan 11, 2021 at 7:33 AM Rob Wilton (rwilton) <[email-masked]>
wrote:

> I’m not trying to change the behaviour, just trying to ensure that the
> spec describes the behaviour unambiguously.  My proposed text was intended
> to clarify the behaviour to be consistent with Jason’s statement below and
> the conclusion of this thread:
> https://mailarchive.ietf.org/arch/msg/netconf/DTPlkJf4enKNHXkBWn49np2e-8c/
>
>
>
> Are you disagreeing with Jason’s statement “An edit-config can't be used
> as a replacement for a full "replace at root" of the entire config like a
> copy-config” or the prior conclusion to the linked thread above?
>
>
>

No.

I guess the wording in both cases is not correct.
There is a description of the operation attribute in sec 7.2 (not very
good, but normative).
The default-operation text should just say that "merge" or "replace" is the
assigned value of
the operation when the attribute is not present in the representation of
the data node.
The value "none" indicates that no operation is assigned if the attribute
is not present.

Andy

>
>
>
>
> *From:* Andy Bierman <[email-masked]>
> *Sent:* 11 January 2021 15:18
> *To:* Rob Wilton (rwilton) <[email-masked]>
> *Cc:* Sterne, Jason (Nokia - CA/Ottawa) <[email-masked]>;
> [email-masked]

---

From: Kent Watsen <[email-masked]>
Date: Mon, 11 Jan 2021 17:43:33 +0000

> On Jan 11, 2021, at 10:53 AM, Andy Bierman <[email-masked]> wrote:
> 
> There is a description of the operation attribute in sec 7.2 (not very good, but normative).
> The default-operation text should just say that "merge" or "replace" is the assigned value of
> the operation when the attribute is not present in the representation of the data node.
> The value "none" indicates that no operation is assigned if the attribute is not present.

Agreed.

It seems odd that the "default-operation” section provides (redundant) behavioral descriptions, rather than pointing to the descriptions provided in the “operation” section above.

Nit: replace "no operation” with "no default operation" in Andy’s last sentence.

K.

---

From: Andy Bierman <[email-masked]>
Date: Mon, 11 Jan 2021 10:17:09 -0800

On Mon, Jan 11, 2021 at 9:43 AM Kent Watsen <[email-masked]> wrote:

> It seems odd that the "default-operation” section provides (redundant)
> behavioral descriptions, rather than pointing to the descriptions provided
> in the “operation” section above.
>

No -- default-operation="none" means there is no operation on that node.
If so, it must exist already (or be an NP-container).

The algorithm is really:

        Start: effective-operation = none
        Setting effective-operation for a node in the config
(hierarchically)
        (1) explicit: if operation attribute is present, then use that
        (2) parent: if parent node has an effective-operation set, then use
that
        (3) default: if default-operation=merge or replace, use that
        (4) else effective-operation = none

The RFC is silent about multiple (possibly conflicting) operations within
the same subtree.

Andy