Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo

Alexander Clemm <alexander.clemm@huawei.com> Wed, 15 February 2017 01:57 UTC

Return-Path: <alexander.clemm@huawei.com>
X-Original-To: i2rs@ietfa.amsl.com
Delivered-To: i2rs@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2107712944A for <i2rs@ietfa.amsl.com>; Tue, 14 Feb 2017 17:57:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.221
X-Spam-Level:
X-Spam-Status: No, score=-4.221 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, 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 0dm6rDmGLVJ2 for <i2rs@ietfa.amsl.com>; Tue, 14 Feb 2017 17:56:57 -0800 (PST)
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 7015C129486 for <i2rs@ietf.org>; Tue, 14 Feb 2017 17:56:56 -0800 (PST)
Received: from 172.18.7.190 (EHLO lhreml706-cah.china.huawei.com) ([172.18.7.190]) by lhrrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DGM62826; Wed, 15 Feb 2017 01:56:53 +0000 (GMT)
Received: from LHREML709-CAH.china.huawei.com (10.201.108.32) by lhreml706-cah.china.huawei.com (10.201.5.182) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 15 Feb 2017 01:56:53 +0000
Received: from SJCEML701-CHM.china.huawei.com (10.208.112.40) by lhreml709-cah.china.huawei.com (10.201.108.32) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 15 Feb 2017 01:56:52 +0000
Received: from SJCEML703-CHM.china.huawei.com ([169.254.5.69]) by SJCEML701-CHM.china.huawei.com ([169.254.3.132]) with mapi id 14.03.0235.001; Tue, 14 Feb 2017 17:56:50 -0800
From: Alexander Clemm <alexander.clemm@huawei.com>
To: Martin Bjorklund <mbj@tail-f.com>, "kwatsen@juniper.net" <kwatsen@juniper.net>
Thread-Topic: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo
Thread-Index: AQHShm7DGX1TjHFotkqv+yitC/fU9qFo3scAgAAukoCAAC4rAIAACldw
Date: Wed, 15 Feb 2017 01:56:48 +0000
Message-ID: <644DA50AFA8C314EA9BDDAC83BD38A2E0DF80205@SJCEML703-CHM.china.huawei.com>
References: <AA7FA7D3-ED7B-4482-BBAC-7144E4944D92@juniper.net> <20170214.120910.763903356597953031.mbj@tail-f.com> <447B5293-75CE-4CE2-ADA4-D9E55EC7EA35@juniper.net> <20170214.174106.332845199336010868.mbj@tail-f.com>
In-Reply-To: <20170214.174106.332845199336010868.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.213.48.114]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.58A3B566.014E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.5.69, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: 421a5ff6348e06f086431402a07a4120
Archived-At: <https://mailarchive.ietf.org/arch/msg/i2rs/w8w6cI0tj1aROBHLDRAa5Razn1c>
Cc: "i2rs@ietf.org" <i2rs@ietf.org>
Subject: Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo
X-BeenThere: i2rs@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Interface to The Internet Routing System \(IRS\)" <i2rs.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/i2rs>, <mailto:i2rs-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/i2rs/>
List-Post: <mailto:i2rs@ietf.org>
List-Help: <mailto:i2rs-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/i2rs>, <mailto:i2rs-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2017 01:57:00 -0000

Hi, 

One comment inline re: option 1, <ALEX>

Thanks
--- Alex

-----Original Message-----
From: i2rs [mailto:i2rs-bounces@ietf.org] On Behalf Of Martin Bjorklund
Sent: Tuesday, February 14, 2017 8:41 AM
To: kwatsen@juniper.net
Cc: i2rs@ietf.org
Subject: Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo

Kent Watsen <kwatsen@juniper.net> wrote:
> 
> 
> [moving yang-doctors to BCC]
> 
> 
> >> OPTION 1: separate /foo and /foo-state trees
> >> --------------------------------------------
> >> 
> >> This option was/is described here:
> >> https://www.ietf.org/mail-archive/web/i2rs/current/msg04316.html.
> >> 
> >> PROS:
> >>   a) does NOT break legacy clients (how we got here)
> >>   b) consistent with convention used in many IETF modules
> >>   c) able to show if/how opstate may differ from configured values
> >> 
> >> CONS:
> >>   a) questionably valid YANG leafref usage
> >
> > What does this mean?
> 
> I'm referring to how the description statement explains that the 
> server may look to operational state in order to resolve the leafref, 
> which is to result in behavior similar to pre-configuration in RFC 
> 7223.

Ok, I didn't pay close attention to the proposal in the quoted email.

I would design this a bit differently.  The config true leaf "dependency" should have a leafref to the config false node name, with require-instance false.  The description should explain that the configuration item will be used by the server if all dependencies exist.  When the configuration item is used, it shows up in the config false list.

This way, the leafref usage is valid and straight forward.

<ALEX> 
Hi Martin,
 
I don't understand one statement you are making "When the configuration item is used, it shows up in the config false list" - can you please elaborate? 

One of the issues that we are facing is that a configured topology might refer to a configured topology or a server-provided topology, and we would like to avoid making a case distinction as to which category we are referring to.  

At the same time, we are making use of leafrefs to express a number of integrity constraints which are part of the model:  as a node is part of a topology, and a topology has an underlay topology, we make sure that the underlay node is part of the underlay topology (and not just any arbitrary node).  Likewise for termination points and links (with some additional constraints, such as a TP's supporting TP be contained in the TP's containing node's supporting node, with supporting links of a link being terminated by supporting TPs of the link's TP, etc)  It would be really nice to capture these without resorting to description statements, and without overly complex path expressions (particularly as leafrefs refer to a single path, not a choice of alternative paths) 

What you describe above does not seem to address this entirely.  You describe having a leafref to a config false node.  We need to have a leafref that can effectively be pointed at a config false, or a config true node.  How can we achieve that when both nodes are in separate subtrees?

We could consider a solution in which we have two dependencies - one leafref to point to config false, another leafref to point to config true.  But this solution seems a bit awkward, as it requires different handling by applications of each case.  Perhaps use a union of two leafrefs with different paths.  This might be a solution, but the question regarding how to capture the overlay/underlay layering constraints remains.  

--- Alex

</ALEX>

> >>   b) complex server implementation (to handle require-instance 
> >> false)
> >
> >Can you elaborate on this one?
> 
> This is primarily a reflection of the CON listed above, in that it 
> seems that a server would need to have special handling for when 
> dependencies transition from being present to not-present and vice 
> versa, much like the code to handle when a physical card is plugged in 
> or removed.

Yes, but I think this is inherent to the problem at hand.  Even with the config true solution defined in the current draft, it is not clear how things that were created by the server would be deleted (if there were references to them).

> Note: I should've listed this as a CON for OPTION 2 as well.
> 
> 
> 
> >>   c) eventually the module would need to migrate to the long-term 
> >>      solution, which would result in needing to also rewrite all
> >>      modules that have augmented it (e.g., ietf-te-topology).
> >>   d) leafref path expressions really only work for configuration data,
> >>      though a clever server could have a special ability to peak at
> >>      the opstate values when doing validations.  Of course, with 
> >>      require-instance is false, the value of leafref based validation
> >>      checking is negated anyway, even for config true nodes, so this
> >>      may not matter much.
> >> 
> >> 
> >> 
> >> OPTION 2: explicit client-option to also return tagged opstate data
> >> -------------------------------------------------------------------
> >> 
> >> This option takes a couple forms.  The first is module-specific and 
> >> the second is generic.  In both cases, the idea is modeled after 
> >> the with-defaults solution (RFC6243), wherein the client passes a 
> >> special flag into <get-config> causing the server to also return 
> >> opstate data, having a special metadata flag set, intermingled with 
> >> the configuration data.
> >> 
> >> 
> >> 2A: Module-specific version
> >> 
> >>    module foo {
> >>       import ietf-netconf { prefix nc; }
> >>       import ietf-yang-metadata { prefix md; }
> >>       md:annotation server-provided {
> >>          type boolean;
> >>       }
> >>       container nodes {
> >>          config true;
> >>          list node {
> >>             key "name";
> >>             leaf name { type string; }
> >>             leaf dependency {
> >>                type leafref {
> >>                  path "../node/name"
> >>                  require-instance false;
> >>                }
> >>             }
> >>          }
> >>       }
> >>       augment /nc:get-config/nc:input {
> >>          leaf with-server-provided {
> >>             type boolean;
> >>          }
> >>       }
> >>    }
> >
> > I don't think this solution is substantially different from the 
> > solution in draft-ietf-i2rs-yang-network-topo-10.  You have just 
> > moved a config false leaf to a meta-data annotation.  This solution 
> > suffers from the same problems as the solution in 
> > draft-ietf-i2rs-yang-network-topo-10.
> 
> There are two primary differences:
> 
> 1) It doesn't break legacy clients

The solution in the draft doesn't break legacy clients either - there's a config false leaf among the config true.  No problem.

>    , because it requires the client to
>    explicitly pass a 'with-server-provided' flag in the <get-config>
>    request in order to get back the extended response.  Likewise, it
>    doesn't break backup/restore workflows, as the server can discard
>    any 'server-provided' nodes passed in an <edit-config> operation.

Huh?  This goes against the defined behavior of 6241 + 7950.  This is the main problem with the solution in the current draft.

If a client sends a <get-config> for data in running, the server cannot send back data that is not in running.

>    Lastly, it doesn't break <lock>/<unlock>, as there is no comingling
>    of opstate data in the 'running' datastore.
> 
> 2) It doesn't say anything about how the opstate data is stored on the
>    server.  The opstate data is not modeled at all.  This approach 
>    only defines a presentation-layer format for how opstate data can
>    be returned via an RPC.  The server is free to persist the opstate
>    data anyway it wants, perhaps in an internal datastore called 
>    'operational-state' or in an uber-datastore with the opstate data
>    flagged with a datastore='oper-state' attribute.  Regardless, it's
>    an implementation detail, and the conceptual datastore model is
>    preserved.

You are essentially defining a new operation, but do it by modifying the semantics of an existing one.  I don't think this is a good idea; it is better to define a new rpc.


/martin

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