Re: [Netconf] {+restconf}/data vs <running>

Qin Wu <bill.wu@huawei.com> Thu, 27 September 2018 03:44 UTC

Return-Path: <bill.wu@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 06709124C04 for <netconf@ietfa.amsl.com>; Wed, 26 Sep 2018 20:44:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=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 p81x9cg2bR-J for <netconf@ietfa.amsl.com>; Wed, 26 Sep 2018 20:44:37 -0700 (PDT)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2C373130FC1 for <netconf@ietf.org>; Wed, 26 Sep 2018 20:44:34 -0700 (PDT)
Received: from lhreml709-cah.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 7623FC1B77D33; Thu, 27 Sep 2018 04:44:29 +0100 (IST)
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.399.0; Thu, 27 Sep 2018 04:44:30 +0100
Received: from NKGEML513-MBX.china.huawei.com ([169.254.1.200]) by nkgeml414-hub.china.huawei.com ([10.98.56.75]) with mapi id 14.03.0399.000; Thu, 27 Sep 2018 11:44:25 +0800
From: Qin Wu <bill.wu@huawei.com>
To: Ladislav Lhotka <lhotka@nic.cz>, Martin Bjorklund <mbj@tail-f.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] {+restconf}/data vs <running>
Thread-Index: AQHUVYaZn5HU8OONKUG66edIR0CUn6UB4BcAgAAF4wCAAAIiAIAACEaAgAAGSwCAAAQgAIABgh0Q
Date: Thu, 27 Sep 2018 03:44:25 +0000
Message-ID: <B8F9A780D330094D99AF023C5877DABA9B054DE7@nkgeml513-mbx.china.huawei.com>
References: <59d2b505319a874964436ab8c488a6d4f3a59fe9.camel@nic.cz> <20180926.133242.469987738646017624.mbj@tail-f.com> <6972ffe5927fe9665d8c1e5fcf0837be55a07c99.camel@nic.cz> <20180926.142450.596442494013109121.mbj@tail-f.com> <52dd97d5adf40040d8b707c882dc6081a2a8965a.camel@nic.cz>
In-Reply-To: <52dd97d5adf40040d8b707c882dc6081a2a8965a.camel@nic.cz>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.138.33.244]
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/SqRCsKQ6Ktg6wmpNXh28rW3NQKE>
Subject: Re: [Netconf] {+restconf}/data vs <running>
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 27 Sep 2018 03:44:40 -0000

-----邮件原件-----
发件人: Netconf [mailto:netconf-bounces@ietf.org] 代表 Ladislav Lhotka
发送时间: 2018年9月26日 20:40
收件人: Martin Bjorklund
抄送: netconf@ietf.org
主题: Re: [Netconf] {+restconf}/data vs <running>

On Wed, 2018-09-26 at 14:24 +0200, Martin Bjorklund wrote:
> Ladislav Lhotka <lhotka@nic.cz> wrote:
> > On Wed, 2018-09-26 at 13:32 +0200, Martin Bjorklund wrote:
> > > Ladislav Lhotka <lhotka@nic.cz> wrote:
> > > > On Wed, 2018-09-26 at 13:04 +0200, Martin Bjorklund wrote:
> > > > > Ladislav Lhotka <lhotka@nic.cz> wrote:
> > > > > > Hi,
> > > > > > 
> > > > > > draft-ietf-netconf-nmda-restconf is silent about the 
> > > > > > relationship between the {+restconf}/data and the <running> 
> > > > > > datastore, and it
> cannot
> > > > > > be deduced from RFC 8040 either, because it only says in sec. 3.3.1:
> > > > > > 
> > > > > >    This mandatory resource [{+restconf}/data] represents the
> combined
> > > > > >    configuration and state data resources that can be accessed by a
> > > > > >    client.
> > > > > > 
> > > > > > I think this is a serious omission.
> > > > > 
> > > > > draft-ietf-netconf-nmda-restconf doesn't change 
> > > > > {+restconf}/data.  It works as before.  See RFC 8040 section 
> > > > > 1.4 for relationship to <running>.
> > > > 
> > > > Sec. 1.4 is about coexistence with NETCONF, whereas 
> > > > draft-lhotka-
> netconf-
> > > > restconf-transactions facilitates the use of RESTCONF *without* NETCONF.
> > > 
> > > As I wrote in my reply to the adoption poll, I think that a 
> > > staging datastore would be useful also for NETCONF.  As such, I 
> > > think it would be unfortunate to do a solution that is just for 
> > > RESTCONF, and even worse, doesn't work if the RESTCONF server is 
> > > co-located with a NETCONF server.
> > 
> > Section 1.4 assumes only two options for client's edits: either to 
> > <running> (with :writable-running) or to <candidate>. The staging 
> > datastore adds a new option that is essentially incompatible with those two.
> > 
> > I support adding the staging datastore to NETCONF as well but the 
> > datastore relationships need to be clarified.
> 
> Agreed.
> 
> > Specifically, I don't see any reason why sec. 1.4 of RFC 8040 cannot 
> > be updated to say:
> > 
> >    Otherwise, if the device supports :staging, all edits to
> >    configuration nodes in {+restconf}/data are performed in the
> >    staging configuration datastore.
> 
> But your draft also requires the client to send an additional "commit"
> rpc, which means that an old client that communicates with a server 
> that happens to implement staging won't work as expected.

This is true. One way to work around this (Rob's suggestion) is to require the user to explicitly start the "staging mode" with an operation (such as "clone"
or "checkout"). Until then, all edits would be as specified in Sec. 1.4.

Lada

[Qin]: Clone operation is similar to HTTP GET, but requires downloading and create a local copy in the client side,
I am wondering why not create private area in the running datastore of the server side?
> 
> 
> 
> /martin
> 
> 
> 
> > 
> > Lada
> > 
> > > 
> > > > > > Regarding draft-lhotka-netconf-restconf-transactions-00, I 
> > > > > > received
> a
> > > > > > lot of criticism for changing the semantics of 
> > > > > > {+restconf}/data. However, I don't think it was the case: 
> > > > > > according
> to
> > > > > > the above definition, it seems perfectly OK if 
> > > > > > {+restconf}/data represents combined configuration **from <staging>** and state data.
> > > > > 
> > > > > This would violate section 1.4 of RFC 8040, at least if the 
> > > > > RESTCONF server is co-located with a NETCONF server.
> > > > 
> > > > In fact, the use of the staging datastore makes sense only if 
> > > > <running>
> is
> > > not
> > > > writable and <candidate> not supported (or not used, at least).
> Moreover,
> > > > NETCONF server needn't be present at all.
> > > 
> > > 
> > > /martin
> > > 
> > > 
> > > > 
> > > > Lada
> > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > /martin
> > > > > 
> > > > > 
> > > > > > 
> > > > > > Lada
> > > > > > 
> > > > > > --
> > > > > > Ladislav Lhotka
> > > > > > Head, CZ.NIC Labs
> > > > > > PGP Key ID: 0xB8F92B08A9F76C67
> > > > > > 
> > > > > > _______________________________________________
> > > > > > Netconf mailing list
> > > > > > Netconf@ietf.org
> > > > > > https://www.ietf.org/mailman/listinfo/netconf
> > > > > > 
> > > > --
> > > > Ladislav Lhotka
> > > > Head, CZ.NIC Labs
> > > > PGP Key ID: 0xB8F92B08A9F76C67
> > > > 
> > --
> > Ladislav Lhotka
> > Head, CZ.NIC Labs
> > PGP Key ID: 0xB8F92B08A9F76C67
> > 
--
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

_______________________________________________
Netconf mailing list
Netconf@ietf.org
https://www.ietf.org/mailman/listinfo/netconf