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

"Guopeipei (Peipei Guo)" <guopeipei@huawei.com> Sat, 27 May 2017 08:50 UTC

Return-Path: <guopeipei@huawei.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 A7386128A32 for <netconf@ietfa.amsl.com>; Sat, 27 May 2017 01:50:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.222
X-Spam-Level:
X-Spam-Status: No, score=-4.222 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 BYQJ9hvDvWER for <netconf@ietfa.amsl.com>; Sat, 27 May 2017 01:50:06 -0700 (PDT)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6119D1279E5 for <netconf@ietf.org>; Sat, 27 May 2017 01:50:05 -0700 (PDT)
Received: from 172.18.7.190 (EHLO lhreml709-cah.china.huawei.com) ([172.18.7.190]) by lhrrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DNW57566; Sat, 27 May 2017 08:50:03 +0000 (GMT)
Received: from NKGEML414-HUB.china.huawei.com (10.98.56.75) by lhreml709-cah.china.huawei.com (10.201.108.32) with Microsoft SMTP Server (TLS) id 14.3.301.0; Sat, 27 May 2017 09:50:01 +0100
Received: from NKGEML513-MBX.china.huawei.com ([169.254.1.160]) by nkgeml414-hub.china.huawei.com ([10.98.56.75]) with mapi id 14.03.0235.001; Sat, 27 May 2017 16:49:59 +0800
From: "Guopeipei (Peipei Guo)" <guopeipei@huawei.com>
To: Per Hedeland <per@tail-f.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] Two questions about the usage of confirmed commit and confirming commit in RFC6241
Thread-Index: AdLVOyY5mf3xlBIJSJeD+ovOaEu+uwACqn+AADnJ2DA=
Date: Sat, 27 May 2017 08:49:58 +0000
Message-ID: <9FC7EF52C614284C896188640F8C655FB6F1CC11@nkgeml513-mbx.china.huawei.com>
References: <9FC7EF52C614284C896188640F8C655FB6F1C097@nkgeml513-mbx.china.huawei.com> <d70320bd-8fbe-99e9-3635-56f1f3b270df@tail-f.com>
In-Reply-To: <d70320bd-8fbe-99e9-3635-56f1f3b270df@tail-f.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.134.137.162]
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.59293DBB.0055, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.1.160, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: 8d2d7cf7501d5f39056b25b978c03cd5
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/AhnBLsR6U5gIk5v7U5J5diK0xoU>
Subject: [Netconf] 答复: Two questions about the usage of confirmed commit and confirming commit in RFC6241
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Network Configuration WG mailing 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: Sat, 27 May 2017 08:50:08 -0000

Hi Per,

Thanks for your reply. I got the meaning.

-----邮件原件-----
发件人: Per Hedeland [mailto:per@tail-f.com] 
发送时间: 2017年5月26日 2:58
收件人: Guopeipei (Peipei Guo) <guopeipei@huawei.com>
抄送: netconf@ietf.org
主题: Re: [Netconf] Two questions about the usage of confirmed commit and confirming commit in RFC6241

On 2017-05-25 11:44, Guopeipei (Peipei Guo) wrote:
> 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?

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.

> 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.

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/>
>      <persist-id>IQ,d4668</persist-id>
>    </commit>
> </rpc>
> 
> Thanks!