Subject: [Netconf] Two questions about the usage of confirmed commit and confirming commit in RFC6241

From: "Guopeipei (Peipei Guo)" <[email-masked]>
Date: Thu, 25 May 2017 09:44:47 +0000

Hi All,

In RFC6241 section 8.4.1, about the persist and persist-id description:
   If the <persist> element is not given in the confirmed commit
   operation, any follow-up commit and the confirming commit MUST be
   issued on the same session that issued the confirmed commit.  If the
   <persist> element is given in the confirmed <commit> operation, a
   follow-up commit and the confirming commit can be given on any
   session, and they MUST include a <persist-id> element with a value
   equal to the given value of the <persist> element.

   If the server also advertises the :startup capability, a
   <copy-config> from running to startup is also necessary to save the
   changes to startup.

Question 1: For below two operations, whether step2 rpc will confirm previous step 1 confirmed commit?
Step 1: user send below rpc.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <commit>
    <confirmed/>
    <persist>IQ,d4668</persist>
  </commit>
</rpc>

Step 2: user resend below rpc.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <commit>
    <confirmed/>
    <persist>IQ,d4668</persist>
  </commit>
</rpc>

Question 2: Whether below rpc is valid or not? I think it is invalid. It should not have <persis-id> and <confirmed> in one rpc at same time.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <commit>
    <confirmed/>
    <persist-id>IQ,d4668</persist-id>
  </commit>
</rpc>

Thanks!

---

From: Per Hedeland <[email-masked]>
Date: Thu, 25 May 2017 20:58:17 +0200

> Question 1: For below two operations, whether step2 rpc will confirm previous step 1 confirmed commit?

No - it seems you skipped the basic description in 8.4.1, which says

   The confirming commit is a <commit> operation without the <confirmed>
   parameter.

Thus if <confirmed> is present, it cannot be a confirming commit. It
"could" have been a "follow-up confirmed <commit>", but when <persist>
is given in the initial confirmed commit, as stated in the section you
quote above, "a follow-up commit and the confirming commit can be given
on any session, and they MUST include a <persist-id> element". So the
step2 rpc is just invalid.

> Question 2: Whether below rpc is valid or not? I think it is invalid. It should not have <persis-id> and <confirmed> in one rpc at same time.

It depends - it is valid as a "follow-up confirmed <commit>", if it has
been preceded by an initial confirmed commit giving the same "persist
id" in <persist>, and not preceded by another "follow-up confirmed
<commit>" that changed the "persist id" by giving both <persist-id> and
<persist> (with a new value) - otherwise not.

--Per

---

From: "Guopeipei (Peipei Guo)" <[email-masked]>
Date: Sat, 27 May 2017 08:49:58 +0000

Hi Per,

Thanks for your reply. I got the meaning.

-----邮件原件-----
发件人: Per Hedeland [mailto:[email-masked]] 
发送时间: 2017年5月26日 2:58
收件人: Guopeipei (Peipei Guo) <[email-masked]>
抄送: [email-masked]
主题: Re: [Netconf] Two questions about the usage of confirmed commit and confirming commit in RFC6241

Thus if <confirmed> is present, it cannot be a confirming commit. It "could" have been a "follow-up confirmed <commit>", but when <persist> is given in the initial confirmed commit, as stated in the section you quote above, "a follow-up commit and the confirming commit can be given on any session, and they MUST include a <persist-id> element". So the
step2 rpc is just invalid.

> <?xml version="1.0" encoding="UTF-8"?> <rpc message-id="101" 
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>    <commit>
>      <confirmed/>
> <?xml version="1.0" encoding="UTF-8"?> <rpc message-id="101" 
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>    <commit>
>      <confirmed/>

It depends - it is valid as a "follow-up confirmed <commit>", if it has been preceded by an initial confirmed commit giving the same "persist id" in <persist>, and not preceded by another "follow-up confirmed <commit>" that changed the "persist id" by giving both <persist-id> and <persist> (with a new value) - otherwise not.

--Per

> <?xml version="1.0" encoding="UTF-8"?> <rpc message-id="101" 
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
>    <commit>
>      <confirmed/>