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

"Xufeng Liu" <xufeng.liu.ietf@gmail.com> Thu, 16 February 2017 21:16 UTC

Return-Path: <xufeng.liu.ietf@gmail.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 598F41296B1 for <i2rs@ietfa.amsl.com>; Thu, 16 Feb 2017 13:16:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 2xVXtgXi0ibK for <i2rs@ietfa.amsl.com>; Thu, 16 Feb 2017 13:16:50 -0800 (PST)
Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 12A961296CB for <i2rs@ietf.org>; Thu, 16 Feb 2017 13:16:43 -0800 (PST)
Received: by mail-lf0-x244.google.com with SMTP id q89so2398954lfi.1 for <i2rs@ietf.org>; Thu, 16 Feb 2017 13:16:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=TU7mZPSR9RJV01t+bw/8cQuABiHIAiUM6buNOgcwpyY=; b=kA3APcApk7rAYkTnYnn2AHqOwpwLT3q2S1aFSc9jqE2f9Q4fgK3V01S0Yn6UOnZjO/ npk18D+DFnGh9avPahaNlgebaYIzHBC8nBcisfhf0N9/mU0Hq5Nkkvfhi4Rhn/tBSqzX gYf1xIJTeXdKutWbsh/5riHn0MqWCC+dZMW0Qcli0NztXButmRpe1RnqclC+1yLWnl5l e6t8ouid/NBV0VOimakcEnfdWj3GdYAo3kylqv8E24e7QXy1oxthR3QHv0IGatJrAwGU stRNqw06Vr285Cnhmu++YvwowABIi59ZTShtirCaCwttwqEzMiZWMW/RES/jmcHahq+R KhxA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=TU7mZPSR9RJV01t+bw/8cQuABiHIAiUM6buNOgcwpyY=; b=DAVIuvXx0K4Y/rElUVXdSDkpOkUp6xA7VRetHAeMSaCuAIRwiTaP2Ig2N9QfF3alm3 KIJeu8mW8T95C1SL4taU6PkCogEX8AT0StsIcTKQcxw6QRiMJFwoe5C8eH53AudQt+9c wiO7HfJd+deQ9rB7l+pWS8/4WUqZBaZq3skwSJ3Z32irLmi9bI4eRMljdi8IA44QTLee jZM1nHs37q9oqNDIkiaueTVq7WKSviUeg9jIV15Sk2YbCZPrDn84tBBTk7wqR2I4B7r2 zdaZpYhF0MuVowzwtUYBbwQAQqhG6xvBlPDCWzAjjokfUN+k9ASh5sgR2CfDNp6/NS+n 4QPA==
X-Gm-Message-State: AMke39lAJa/1DBpNsgIWkzGnesjgw2N/m7AaUH6t5+tanFIxPPFnURgqGBVqNteO7biYGg==
X-Received: by 10.46.20.4 with SMTP id u4mr1130967ljd.89.1487279802175; Thu, 16 Feb 2017 13:16:42 -0800 (PST)
Received: from xliuus (wsip-98-191-72-170.dc.dc.cox.net. [98.191.72.170]) by smtp.gmail.com with ESMTPSA id v2sm1970856ljb.22.2017.02.16.13.16.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 13:16:41 -0800 (PST)
From: Xufeng Liu <xufeng.liu.ietf@gmail.com>
To: 'Susan Hares' <shares@ndzh.com>, 'Martin Bjorklund' <mbj@tail-f.com>, kwatsen@juniper.net
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> <007601d2886a$bf085170$3d18f450$@gmail.com> <050901d28887$25a887d0$70f99770$@ndzh.com> <00bd01d2888d$9fe53290$dfaf97b0$@gmail.com> <055801d2888e$50276ba0$f07642e0$@ndzh.com>
In-Reply-To: <055801d2888e$50276ba0$f07642e0$@ndzh.com>
Date: Thu, 16 Feb 2017 16:16:38 -0500
Message-ID: <00e801d28899$f7b231b0$e7169510$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQKQx8r72RrckYMhXWnaB0v1b2P4ZAEWoFNQAqHHXJ0B1BTo7AGVrx3gAjEJjgcB0cJWuwIlsb4Dn4VKLjA=
Content-Language: en-us
Archived-At: <https://mailarchive.ietf.org/arch/msg/i2rs/86iuMMgNkJvMfAIKp_fFY5r41fk>
Cc: 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: Thu, 16 Feb 2017 21:16:52 -0000

Hi Sue,

I agree that the revised data stores solutions is the long term solution,
but it may take a year to complete because it covers a much broader scope.
Are we ok with delaying all these models for another year? This could be the
decision of the Chairs and ADs. Also, this approach seems to be a sub-set of
the long term solution, and they are compatible. If the details can be
worked out, it would be good to have such an interim solution immediately,
which does not need to solve all the problems, but hopefully can migrate to
the long term solution smoothly.

Thanks,
- Xufeng

> -----Original Message-----
> From: Susan Hares [mailto:shares@ndzh.com]
> Sent: Thursday, February 16, 2017 2:53 PM
> To: 'Xufeng Liu' <xufeng.liu.ietf@gmail.com>; 'Martin Bjorklund'
<mbj@tail-
> f.com>; kwatsen@juniper.net
> Cc: i2rs@ietf.org
> Subject: RE: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo
> 
> Xufeng:
> 
> I suspect 2 rpcs will be needed, but Martin and Kent are the experts.   Do
> you think trying to accelerate the revised data stores solutions is a
better way to
> go?
> 
> Sue
> 
> -----Original Message-----
> From: i2rs [mailto:i2rs-bounces@ietf.org] On Behalf Of Xufeng Liu
> Sent: Thursday, February 16, 2017 2:48 PM
> To: 'Susan Hares'; 'Martin Bjorklund'; kwatsen@juniper.net
> Cc: i2rs@ietf.org
> Subject: Re: [i2rs] modeling options for draft-ietf-i2rs-yang-network-topo
> 
> Hi Sue,
> 
> > -----Original Message-----
> > From: Susan Hares [mailto:shares@ndzh.com]
> > Sent: Thursday, February 16, 2017 2:02 PM
> > To: 'Xufeng Liu' <xufeng.liu.ietf@gmail.com>; 'Martin Bjorklund'
> <mbj@tail-
> > f.com>; kwatsen@juniper.net
> > Cc: i2rs@ietf.org
> > Subject: RE: [i2rs] modeling options for
> > draft-ietf-i2rs-yang-network-topo
> >
> > To Xufeng:
> >
> > Clarifying question - Are you asking about I2RS topology as a generic
> > yang model for any configuration or are you asking about I2RS topology
> > model as
> an
> > ephemeral topology model.
> 
> [Xufeng] I was talking about I2RS topology as a generic yang model for any
> configuration, but I think that the same solution can be applied to
ephemeral
> case, though a separate rpc might be needed.
> 
> Thanks,
> - Xufeng
> 
> >
> > To Martin:
> > Clarifying questions:
> >
> > 1)  Is your rpc suggest target toward the I2RS topology model as a
> > generic topology model or an I2RS ephemeral state model or both?
> >
> > 2) Could we define rpcs now that operate as Alex desired for generic
> topology
> > models that could be replaced by more generic mechanisms later?
> > For example, the I2RS RIB has defined rpcs for all major functions
> (add/delete rib,
> > add/delete route, add/delete nexhop) plus notifications for changes.
> > Is
> this the
> > best approach here?
> >
> > Sue
> >
> > -----Original Message-----
> > From: i2rs [mailto:i2rs-bounces@ietf.org] On Behalf Of Xufeng Liu
> > Sent: Thursday, February 16, 2017 10:39 AM
> > To: 'Martin Bjorklund'; kwatsen@juniper.net
> > Cc: i2rs@ietf.org
> > Subject: Re: [i2rs] modeling options for
> > draft-ietf-i2rs-yang-network-topo
> >
> >
> >
> > > -----Original Message-----
> > > From: i2rs [mailto:i2rs-bounces@ietf.org] On Behalf Of Martin
> > > Bjorklund
> > > Sent: Tuesday, February 14, 2017 11: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.
> > >
> > > > >>   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.
> >
> > [Xufeng] Is using a new rpc is acceptable? If so, this could be a
> > viable
> option.
> >
> > >
> > >
> > > /martin
> > >
> > > _______________________________________________
> > > i2rs mailing list
> > > i2rs@ietf.org
> > > https://www.ietf.org/mailman/listinfo/i2rs
> >
> > _______________________________________________
> > i2rs mailing list
> > i2rs@ietf.org
> > https://www.ietf.org/mailman/listinfo/i2rs
> 
> 
> _______________________________________________
> i2rs mailing list
> i2rs@ietf.org
> https://www.ietf.org/mailman/listinfo/i2rs