Re: [Netconf] Yangdoctors last call review of draft-ietf-netconf-subscribed-notifications-10

Andy Bierman <andy@yumaworks.com> Fri, 23 March 2018 12:07 UTC

Return-Path: <andy@yumaworks.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 C4F9912D885 for <netconf@ietfa.amsl.com>; Fri, 23 Mar 2018 05:07:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 MXG1SDqdor1T for <netconf@ietfa.amsl.com>; Fri, 23 Mar 2018 05:07:13 -0700 (PDT)
Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (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 EB9BB12D881 for <netconf@ietf.org>; Fri, 23 Mar 2018 05:07:12 -0700 (PDT)
Received: by mail-lf0-x232.google.com with SMTP id x205-v6so17944654lfa.0 for <netconf@ietf.org>; Fri, 23 Mar 2018 05:07:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+8V11+Xn2XkFwxckGy7HjwoBFoq95TdYGf4ucMQhW/8=; b=fTd1kAesNrvgnBkXNzFDI+Nv53YFgK7+dajzpCBf4v8SM3YCJyokwaR17EtHT8n/JE kzvIBBOF2kz+xdRJzXBS5ehYBgd8scyGWD4bb63MBSfxxBhqNlIu6LvinGZJvctRTAQh avv+/zOvIvWDwsfKb2yyh8F+6AYyiOzKB6AYJ0Ty0OkHdH8yMd3+YSNX11bmJSPbyDue WRmwAzjC15JQDDEJawRBHN4r9h50AOtzDyNBPM7oKQU8/oGRPW4kg5+5snGWS8ECnLj/ mofIe6kf9Sl5xUwuIWcN4I3nBmoIZdzuwenW0euCXRVYFNA6FPdO2UvTZ5kZ6UXCPiFv cxQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+8V11+Xn2XkFwxckGy7HjwoBFoq95TdYGf4ucMQhW/8=; b=tnAAP5znV30UKYV1y4Gqqk8tBKVbRtowlVVj5b4gOvdzucqPlfSuOFR0TaBG22ymaP 7hAueJiX+EN+QdRviw3wk1IdU29XAVsVgZuv6j/GMiuo9L002GzJ+6zjG8OtR6OC04US kUZxfwMfokvsXHmC6kcdtj2QBPmSFIPwDDE5ThvYOHGyGyDTJAuCxvvMq0W+rrm/ITAT mAfmuvFG1nrHaN3kvafezhZPMT4ygX9394SAs10WYViaYrMU6cnYDxw+zhHeNwGXa2Fv nVyETxnmaNFiHIJujD6jRnF3on9CXNzQr85vsshTxWLQ4KFsFvCcDkbYTG23PEj4zmzB v8jA==
X-Gm-Message-State: AElRT7E5aYvwfSrz3DIAgi33lIPQjcuXnTviXEZd0qM8bP7Eru+MZQcx kEEqu0/QyvreyAkMZWFyn/uh+si2dCavzQyYG+xRxw==
X-Google-Smtp-Source: AIpwx4+tc/qKyCksQB68USio4N2dXy3IAVnM/qaxzgck5zOlekGNghJkKIKRXG6GHWnnP/ZwyRpS3GItxaUiAdOCkTM=
X-Received: by 10.46.124.2 with SMTP id x2mr2166307ljc.6.1521806831129; Fri, 23 Mar 2018 05:07:11 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:1a50:0:0:0:0:0 with HTTP; Fri, 23 Mar 2018 05:07:10 -0700 (PDT)
In-Reply-To: <20180323.123631.1717671339304960054.mbj@tail-f.com>
References: <152115125179.4495.9379808208471040239@ietfa.amsl.com> <20180316.091848.1111565634082704625.mbj@tail-f.com> <f675d003813f4212975167c35ed751c6@XCH-RTP-013.cisco.com> <20180323.123631.1717671339304960054.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 23 Mar 2018 05:07:10 -0700
Message-ID: <CABCOCHSO-y4+tNLGSHuLUv6Ba+799y_isDxKAFQJ3iv3Sw+LNQ@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: "Eric Voit (evoit)" <evoit@cisco.com>, YANG Doctors <yang-doctors@ietf.org>, draft-ietf-netconf-subscribed-notifications.all@ietf.org, IETF discussion list <ietf@ietf.org>, Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="f4f5e8072f9c962e3605681343c3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/_0G_pkjVUzq0_Mmb-K8cTd-aRx4>
Subject: Re: [Netconf] Yangdoctors last call review of draft-ietf-netconf-subscribed-notifications-10
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: Fri, 23 Mar 2018 12:07:17 -0000

On Fri, Mar 23, 2018 at 4:36 AM, Martin Bjorklund <mbj@tail-f.com> wrote:

> Hi,
>
>
> "Eric Voit (evoit)" <evoit@cisco.com> wrote:
> > Hi Martin,
> >
> > > From: Martin Bjorklund, March 16, 2018 4:19 AM
> > >
> > > Hi,
> > >
> > > Andy Bierman <andy@yumaworks.com> wrote:
> > >
> > > [...]
> > >
> > > > 2.4.2.1.  Replay Subscription
> > > >
> > > >    If the "replay-start-
> > > >    time" contains a value that is earlier than content stored within
> the
> > > >    publisher's replay buffer, then the subscription MUST be rejected,
> > > >    and the leaf "replay-start-time-hint" MUST be set in the reply.
> > > >
> > > >    >> this is a significant and bad change from RFC 5277 behavior
> > > >    >> the start-time says "send all events that you have stored
> > > >       since this time" The server sends its oldest event and does
> > > >       not reject the request.  This draft incorrectly interprets
> > > >       the request as "the server MUST have an event stored at least
> > > >       this old"
> > >
> > > I agree, and I have pointed this out in earlier reviews.
> >
> > In our past discussions, it looked like you were ok after reading Yves
> > requirement here:
> >
> > https://www.ietf.org/mail-archive/web/netconf/current/msg12154.html
> >
> > Beyond this functional requirement, the design pattern used is that an
> > establish-subscription RPC must send the exact parameters accepted by
> > the publisher.
> >
> >
> > > If a client sends a too early time, and the server doesn't send the
> > > optional
> > > hint, the client will have to guess the time.  Not very robust.
> > >
> > > If the motivation is that the client should be informed that he might
> > > have
> > > missed some notifs b/c the replay-start-time is too early, this
> > > information
> > > can be passed in the rpc-reply from establish-subscription instead.
> >
> > Yes this could be done.  But this doesn't follow the design pattern of
> > making the client explicitly ask for what they want.  Consistent
> > design patterns do matter.
>
> Well, "what they want" depends on the semantics of this leaf!  If we
> keep the old semantics, then if the client passes this parameter with
> some start time, it "explicitly asked for what it wanted".
>
> Anyway, if the objective is to ensure that no notifs are sent unless
> the replay-start-time exactly matches the event-time of a notification
> in the buffer, then we can add a parameter to ensure that.
>
> In all cases, if the client receives a notif with a time later than
> what it asked for, it knows that it might have lost some notifs.
>
>   leaf replay-exact-start-time {
>     if-feature "replay";
>     when "../replay-start-time";
>     type empty;
>     description
>       "If this parameter is present, and the server does not have any
>        stored event record with 'eventTime' equal to the requested
>        'replay-start-time', then the server MUST reject the request.";
>   }
>
>

I would like to hear the use-case for this leaf.
The existing leaf (in 5277) supports a very common use-case, which is
a collector that connects periodically and retrieves all the events of
interest
since the last connect time.  The client has no idea when specific events
occurred on the device. It only knows its own last connect time.


Andy



>
>
> > > >    If a "stop-time" parameter is included, it MAY also be earlier
> than
> > > >    the current time and MUST be later than the "replay-start-time".
> The
> > > >    publisher MUST NOT accept a "replay-start-time" for a future time.
> > > >
> > > >    >> MUST be later (if the start-time) if supplied
> > > >    >> MAY be before current time?  Inconsistent with start-time
> > > >       MUST have events that exist
> > > >    >> MUST NOT accept future start-time different than 5277, but OK
> > > >       because that was a bad requirement
> > >
> > > I have also pointed out in earlier reviews that the requirement that
> > > the
> > > replay-start-time cannot be in the future is problematic:
> >
> > Yes.  The thinking both of you passed along drove this modification.
> >
> > >   I know that this text is also present in RFC 5277, but I think it
> > >   needs to be changed.  Which current time?  Probably the server's,
> > >   but how would a client know that?  This is a problem that we faced
> > >   when implementing 5277.   I think we should remove this
> > >   requirement, since it doesn't add any value anyway.
> > >
> > > IMO, if the server gets a replay-start-time that is later than the
> > > latest stored
> > > notif, it will send a <replay-completed> notif, and then move on.
> > > This is a
> > > very simple behavior that doesn't rely on synchronized clocks or
> > > anything
> > > like that.
> >
> > The text which I suggested back to Andy :
> >
> >    If the "replay-start-time" is later the scope of time covered by the
> >    replay buffer, then the publisher MUST send a "replay-completed"
> >    notification immediately after the after a successful establish-
> >    subscription RPC response.
>
> Good.
>
> > > [...]
> > >
> > > > 2.5.2.  Creating a Configured Subscription
> > > >
> > > >        In this case, when there is
> > > >    something to transport for an active subscription, transport
> specific
> > > >    call-home operations will be used to establish the connection.
> > > > When
> > > >
> > > >    >> is this normative or is callhome optional-to-implement?
> > > >
> > > >    With active configured subscriptions, it is allowable to buffer
> event
> > > >    records even after a "subscription-started" has been sent.
> However
> > > >    if events are lost (rather than just delayed) due to replay buffer
> > > >    overflow, a new "subscription-started" must be sent.  This new
> > > >    "subscription-started" indicates an event record discontinuity.
> > > >
> > > >   >> this is confusing to send multiple "subscription-started"
> events.
> > > >
> > > >    To see an example at subscription creation using configuration
> > > >    operations over NETCONF, see Appendix A of
> > > >    [I-D.draft-ietf-netconf-netconf-event-notifications].
> > > >
> > > >    >> IMO the examples should be moved to this draft
> > >
> > > +1
> >
> > But those examples are transport specific.  This will make the
> > document less applicable for other transports.
>
> I don't think it will.  Just write that the example is using NETCONF
> XML or RESTCONF JSON or whatever.  Compare with the RESTCONF draft, it
> has plenty of examples despite the fact that it supports two
> encodings.
>
> I think having the examples in this draft is the right thing to do.
>
>
> > > > 2.7.1.  subscription-started
> > > > 2.7.2.  subscription-modified
> > > >
> > > >   >> what is the value of returning all the input or configuration
> > > >     parameters in these notifications?  For a dynamic subscription,
> > > >     the only receiver just sent that info and does not need it.
> > > >     For a configured subscription, that data can be read from
> > > >     the configuration datastore.
> > >
> > > I agree.  Removing these redundant parameters would also simplify the
> > > models quite a bit.
> >
> > I replied on the thinking here to Andy.
> >
> > Basically it is possible that you could only send the contents of the
> > leafref for dynamic subscriptions.  However this introduces
> > complexity, as should have a notification type and set a different
> > expectation of what would be populated with a dynamic subscription.
> > So in the end, we can do it.  But it makes the model more complicated
> > (although the tree gets smaller.)
> >
> > Also this assumes that the receiver can do a read.  (For IoT, this
> > might not be the case.)
> >
> > Beyond that, if the parameters change multiple times on a configured
> > subscription, you might not be quick enough to do a read in time to
> > know the parameters during a transient period.
> >
> > Finally, a configured receiver might have lost state, so why not
> > refresh the full set?  There is little cost to refreshing the full
> > view of the subscription.
> >
> > So in the end, this a complex simplification drives error cases and
> > more variations to process for the receiver.
> >
> > > [...]
> > >
> > > > 4A) message encoding
> > > >
> > > >   feature encode-json {
> > > >     description
> > > >       "This feature indicates that JSON encoding of notification
> > > >        messages is supported.";
> > > >   }
> > > >
> > > >   feature encode-xml {
> > > >     description
> > > >       "This feature indicates that XML encoding of notification
> > > >        messages is supported.";
> > > >   }
> > > >
> > > >   identity encodings {
> > > >     description
> > > >       "Base identity to represent data encodings";
> > > >   }
> > > >
> > > >   identity encode-xml {
> > > >     base encodings;
> > > >     if-feature "encode-xml";
> > > >     description
> > > >       "Encode data using XML";
> > > >   }
> > > >
> > > >   identity encode-json {
> > > >     base encodings;
> > > >     if-feature "encode-json";
> > > >     description
> > > >       "Encode data using JSON";
> > > >   }
> > > >
> > > >   typedef encoding {
> > > >     type identityref {
> > > >       base encodings;
> > > >     }
> > > >     description
> > > >       "Specifies a data encoding, e.g. for a data subscription.";
> > > >   }
> > > >
> > > >     leaf encoding {
> > > >       type encoding;
> > > >       mandatory true;
> > > >       description
> > > >         "The type of encoding for the subscribed data.";
> > > >     }
> > > >
> > > >   >> IMO all YANG definitions related to message encoding should
> > > >      be removed because they are in conflict with existing protocols.
> > > >      NETCONF defines XML encoding. HTTP already defines
> > > >      media type handling for message encoding (Accept, Content-Type)
> > > >      There is no definition how to use JSON with NETCONF.
> > >
> > > +1
> >
> > Per response to Andy:
> >
> > It is true that it is possible to populate unsupported mixtures of
> > protocol and encoding.  However:
> > (a) for configured subscriptions, we must be able to select different
> > encodings for a single type of transport
> > (b) checking what is an invalid/unsupported combination for a platform
> > is quite easy
> >
> > While it is possible to build a structure which enforces valid
> > combinations with YANG, this would add complexity, especially as
> > vendor custom encodings will also become new identities under the base
> > encoding.  If there is some YANG structure which exists for such
> > enforcement of protocol and encoding (which would be something likely
> > common with other solutions), do you have a link?
>
> I replied to this issue in the other thread, so let's continue the
> discussion there.
>
>
> /martin
>