Re: [netmod] Adoption poll for draft-wwx-netmod-event-yang

Qin Wu <bill.wu@huawei.com> Mon, 24 February 2020 10:54 UTC

Return-Path: <bill.wu@huawei.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8199E3A0747 for <netmod@ietfa.amsl.com>; Mon, 24 Feb 2020 02:54:54 -0800 (PST)
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, 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 v5HluV33gn5e for <netmod@ietfa.amsl.com>; Mon, 24 Feb 2020 02:54:51 -0800 (PST)
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 9340B3A0743 for <netmod@ietf.org>; Mon, 24 Feb 2020 02:54:19 -0800 (PST)
Received: from lhreml702-cah.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id E72812EA2C2A339C7E15; Mon, 24 Feb 2020 10:54:17 +0000 (GMT)
Received: from lhreml716-chm.china.huawei.com (10.201.108.67) by lhreml702-cah.china.huawei.com (10.201.108.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 24 Feb 2020 10:54:17 +0000
Received: from lhreml716-chm.china.huawei.com (10.201.108.67) by lhreml716-chm.china.huawei.com (10.201.108.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 24 Feb 2020 10:54:17 +0000
Received: from DGGEML405-HUB.china.huawei.com (10.3.17.49) by lhreml716-chm.china.huawei.com (10.201.108.67) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Mon, 24 Feb 2020 10:54:17 +0000
Received: from DGGEML511-MBX.china.huawei.com ([169.254.1.89]) by dggeml405-hub.china.huawei.com ([10.3.17.49]) with mapi id 14.03.0439.000; Mon, 24 Feb 2020 18:54:13 +0800
From: Qin Wu <bill.wu@huawei.com>
To: "Schönwälder, Jürgen" <J.Schoenwaelder@jacobs-university.de>, Benoit Claise <bclaise@cisco.com>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Adoption poll for draft-wwx-netmod-event-yang
Thread-Index: AdXq/X9Nzpg1AfSxQbu77+4fPq+GnA==
Date: Mon, 24 Feb 2020 10:54:13 +0000
Message-ID: <B8F9A780D330094D99AF023C5877DABAAD4D4F22@dggeml511-mbx.china.huawei.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.138.33.123]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/GLT_3x2VaPC5iscsqZHYUyW3eYk>
Subject: Re: [netmod] Adoption poll for draft-wwx-netmod-event-yang
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Feb 2020 10:54:55 -0000

-----邮件原件-----
发件人: netmod [mailto:netmod-bounces@ietf.org] 代表 Sch?nw?lder, Jürgen
发送时间: 2020年2月19日 20:18
收件人: Benoit Claise <bclaise@cisco.com>
抄送: netmod@ietf.org
主题: Re: [netmod] Adoption poll for draft-wwx-netmod-event-yang

Benoit,

thanks for the clarification.

I still believe that the approach taken is wrong. I doubt that network operators are interested in an assembly level approach for expressing threshold triggers. I am not sure xpath is the answer either. What was perhaps reasonable to try in the 90s (RMON, DISMAN work) may not be reasonably today anymore.

The example starting on page 43 seems to be doing this

  every 10 minutes
  if    exists(/ietf-interfaces:interfaces='eth0')
  and   if:interface[if:name='eth0']/if:statistic/if:in-errors >= 100
  then  /if:interfaces/if:interface[if:name='eth0']/if:enable = false

but it requires 1.5 pages of XML to express this (and then the rule is not even meaningful since comparing an absolute value of a counter is not useful).

If we are serious about policies, I believe we need to think about a language-based approach that can be read and understood and which does the things that are meaningful. Let me makeup some pseudo code based on the example that can work for all eth* interfaces and that gets the delta calculation of the counter right.

  if = /ietf-interfaces:interfaces/interface # json style namespace binding
  dt = 600 # 10 minutes in seconds
  every dt
  foreach name in $if/name:
    this = $if/[name=$name]
    if   $name matches 'eth.*'
    and  delta($this/statistic/in-errors, dt) >= 100
    then $this/enable = false

If people are serious about doing this kind of work, start by collecting real-world policies that need to be expressable, then identify the "language" mechanisms that are needed (loops over lists, bindings, variables and substitutions, pattern matching, ...) and then find a suitable representation. Yes, this is also something that people wanted SUPA to do and it did fail because it was already hard to collect real-world policies that help to understand what kind of mechanisms are needed and why.

[Qin]: This work has been for a while. The scope could be further narrow down. One of use cases we proponents all agrees is event based telemetry, the ECA configuration can be pushed down to the device, and then the script on the server can be automatically generated and manage the data object that is monitored on the device.
What ECA is doing is to find a suitable representation to express condition and logical and mathematical expressions
With XPATH expression language or extension, it is still difficult to come up with a suitable representation and trigger the action invoked on the device. But with ECA configuration populated on the device, the device can generate script based on network control logic described by ECA configuration. I am not sure there is better solution.
Also I believe what is not reasonable in the 90s for the legacy device may be ready for today now.
/js

On Wed, Feb 19, 2020 at 11:45:39AM +0100, Benoit Claise wrote:
> Jürgen,
> 
> To tell that I was skeptical about the SUPA work is just wrong.
> 
> I had great hopes for SUPA, as having consistent policy constructs in 
> YANG module was key. The big hope was that those SUPA constructs could 
> be re-used in other YANG modules
>     example: routing, ACL, security ...
>     Regardless of the location: in a network element or in a 
> controller/orchestrator
>     Regardless of the function: network element and service YANG 
> modules If successful, in the end, SUPA would have helped to reuse code.
> 
> Was I disappointed by the progress? Yes. The results were not there 
> while the rest of the world uses their YANG policy constructs. Timing 
> was key so, as AD, I had to pull the plug.
> The world has moved on. So be it.
> You can't infer skepticism from pragmatism.
> 
> Now, back to the draft.
> From a network element point, I stressed the need to take have _simple 
> _ECA rules directly routers.
> Think about RMON event/alarm but for YANG. Think about removing the 
> RMON event/alarm restrictions that it works only for integer/counter.
> If your point is that the draft is not perfect, fair point.
> Should we solve attempt to solve that issue? Yes.
> 
> A confusion comes from the abstract that implies that this work is 
> based on SUPA.
> 
> Abstract
> 
>    RFC8328 defines a policy-based management framework that allows
>    definition of a data model to be used to represent high-level,
>    possibly network-wide policies.  Policy discussed in RFC8328 are
>    classified into imperative policy and declarative policy, Event
>    Condition Action (ECA) policy is an typical example of imperative
>    policy.  This document defines a YANG data model for the ECA policy
>    management.  The ECA policy YANG provides the ability for the network
>    management function (within a network element) to control the
>    configuration and monitor state change and take simple and instant
>    action on the server when a trigger condition on the system state is
>    met.
> 
> Actually, in my mind, the abstract should be simplified to something 
> such as (and yes, it could be improved)
> 
> Abstract
> 
>    This document defines a YANG data model for the ECA policy
>    management.  The ECA policy YANG provides the ability for the network
>    management function (within a network element) to control the
>    configuration and monitor state change and take simple and instant
>    action on the server when a trigger condition on the system state is
>    met.
> 
> And then, somewhere in the introduction, the following text should be
> reused:
> 
>    RFC8328 defines a policy-based management framework that allows
>    definition of a data model to be used to represent high-level,
>    possibly network-wide policies.  Policy discussed in RFC8328 are
>    classified into imperative policy and declarative policy, Event
>    Condition Action (ECA) policy is an typical example of imperative
>    policy.
> 
> 
> Regards, Benoit.
> > On Tue, Feb 18, 2020 at 08:44:18AM -0800, Joel Jaeggli wrote:
> > > This email begins a 2 week working group adoption poll for:
> > > 
> > > https://tools.ietf.org/html/draft-wwx-netmod-event-yang-06
> > > 
> > > Please voice your support or objections before the poll completes 
> > > on March 3rd.
> > I am against adoption of this draft. I wonder whether Benoit will 
> > explain his contributions to this document; Benoit was added as a 
> > co-author in -06 and he used to be rather sceptical about the SUPA 
> > work (and this is essentially part of the SUPA work resubmitted to 
> > the NETMOD WG). Despite this, the YANG definitions are clearly not 
> > up to the level one would expect for WG adoption. Many descriptions 
> > are just repetition of leaf names and there are obvious errors such 
> > as
> > 
> >            leaf-list day-of-month {
> >              type uint8 {
> >                range "0..59";
> >              }
> >              description
> >                "A set of days of the month at which this
> >                 scheduling timing will trigger.";
> >            }
> > 
> > Despite the strange range, it is unclear how a number will in the 
> > range will identify a set. Note, this is an example, there are lots 
> > of them in the document. The examples provides are not convincing 
> > and technically wrong (how can <interval>10m</interval> match
> > 
> >            leaf interval {
> >              type uint32 {
> >                range "1..max";
> >              }
> >              units "seconds";
> >              mandatory true;
> >              description
> >                "The number of seconds between two triggers
> >                 generated by this periodic timing object.";
> >            }
> > 
> > and I have serious doubts that the design is anywhere close to be 
> > practically usable. There need to be mechanisms to bind 'variables'
> > while matching conditions that and be reused in action definitions, 
> > it is not scalable to have constants such as interface names in the 
> > examples hard-coded in policy rules - this would lead to a huge 
> > number of rules if you want to apply policy rules to all interfaces.
> > 
> > There is also a lack of extensibility, which is important for a core 
> > policy language, and definitions like:
> > 
> >    identity function-type {
> >      description
> >        "Possible values are:
> >         plus, minus, mult, divide, remain.";
> >    }
> > 
> > without ever defining these operators feels strange. I also not 
> > convinced that the resulting expressions are expressive enough for 
> > real-world use.
> > 
> > This document is in a state that requires way too much effort to fix 
> > in a WG process. I also doubt that expressing policies in such a 
> > low-level format is usable in practice. Policy languages for network 
> > management have a long history and this proposal seems to ignore the 
> > lessons learned in the past.
> > 
> > /js
> > 
> 

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

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