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

"Eric Voit (evoit)" <evoit@cisco.com> Mon, 16 April 2018 19:19 UTC

Return-Path: <evoit@cisco.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A9F2D120725; Mon, 16 Apr 2018 12:19:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.511
X-Spam-Level:
X-Spam-Status: No, score=-14.511 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 ydSxRfVHhoJP; Mon, 16 Apr 2018 12:19:10 -0700 (PDT)
Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 07FD21201FA; Mon, 16 Apr 2018 12:19:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=14387; q=dns/txt; s=iport; t=1523906350; x=1525115950; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WFf7t4mjRQM7DaWPEXOcv+nFWHU5mIvcN1cj6GEZ/is=; b=iRFXWE3VMfxCvd9O1Kh1DP1D5EqL/1D37ExXgKsyc1TYclqFkXkLNJti tKOJNeIlfUb0403y6VyeM3+mQAeZ91RcFLzjbdgSjMfpuuR0l7sZ9dCVz n6WkeX0qzZwt1tAMQqAr3n2yGvgmat12+DMYc9z+SddMCYg3u5D5o5oo9 c=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BOAgBw9tRa/4kNJK1dGwEBAQEDAQE?= =?us-ascii?q?BCQEBAYMXK2F6KAqLX40UgXSBD5JogXsLJYReAoJEITQYAQIBAQEBAQECbBw?= =?us-ascii?q?MhSIBAQEBAgE6PQIFCwIBCA4HAw0REDIlAgQOBQiEfQgPqAKIQYIgBYgGgVQ?= =?us-ascii?q?/gQ+CXS6DEQKBQAEBCIVKIAKHSYQ7gR6KQggChVeIWos8gReJLIZMAhETAYE?= =?us-ascii?q?kARw4gVJwFYJ+giAXEWkBCYJBhRSFPm+LeoEfgRcBAQ?=
X-IronPort-AV: E=Sophos;i="5.48,460,1517875200"; d="scan'208";a="164207160"
Received: from alln-core-4.cisco.com ([173.36.13.137]) by rcdn-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2018 19:19:08 +0000
Received: from XCH-RTP-015.cisco.com (xch-rtp-015.cisco.com [64.101.220.155]) by alln-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id w3GJJ8QE026535 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 16 Apr 2018 19:19:08 GMT
Received: from xch-rtp-013.cisco.com (64.101.220.153) by XCH-RTP-015.cisco.com (64.101.220.155) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 16 Apr 2018 15:19:06 -0400
Received: from xch-rtp-013.cisco.com ([64.101.220.153]) by XCH-RTP-013.cisco.com ([64.101.220.153]) with mapi id 15.00.1320.000; Mon, 16 Apr 2018 15:19:06 -0400
From: "Eric Voit (evoit)" <evoit@cisco.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "andy@yumaworks.com" <andy@yumaworks.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>, "draft-ietf-netconf-subscribed-notifications.all@ietf.org" <draft-ietf-netconf-subscribed-notifications.all@ietf.org>, "ietf@ietf.org" <ietf@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] Yangdoctors last call review of draft-ietf-netconf-subscribed-notifications-10
Thread-Index: AQHTvP9v9ARZDJYwE0mt60SgwmbJJaPbVUpwgAKqJYCAA7598IAAuKcAgAz+D1CABLwjAP//zBBwgA92PoCAABV+oA==
Date: Mon, 16 Apr 2018 19:19:06 +0000
Message-ID: <0dc97d09daa04b64ba6b2e412920f9c6@XCH-RTP-013.cisco.com>
References: <eb62ab2757f0425d8fd634241a838367@XCH-RTP-013.cisco.com> <20180406.163048.26297343506061195.mbj@tail-f.com> <21245b8e7746477687f2db78b13a43eb@XCH-RTP-013.cisco.com> <20180416.093201.158616296578047837.mbj@tail-f.com>
In-Reply-To: <20180416.093201.158616296578047837.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.118.56.230]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/GG4ddMtMIZqv9pcIqvqcR2eRb0I>
Subject: Re: [yang-doctors] [Netconf] Yangdoctors last call review of draft-ietf-netconf-subscribed-notifications-10
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Apr 2018 19:19:12 -0000

Hi Martin,

> Hi,
> 
> "Eric Voit (evoit)" <evoit@cisco.com> wrote:
> > > From: Martin Bjorklund, April 6, 2018 10:31 AM
> > >
> > > Hi,
> > >
> > > "Eric Voit (evoit)" <evoit@cisco.com> wrote:
> > > > Hi Martin,
> > > >
> > > > After reflecting on this for a bit, I am ok with your argument
> > > > that if the system is quickly generating notification-messages,
> > > > then the replay buffer might be continuously emptying.  And
> > > > therefore a hint for replay start time might not be accurate for
> > > > very long.  As a result, it is better to start the replay
> > > > immediately with the oldest buffered event.
> > > >
> > > > I have updated the establish-subscription RPC as follows.  Does
> > > > this cover your concern (per this sub-thread)?
> > > >
> > > >   rpc establish-subscription {
> > > >     input {     }
> > > >     output {
> > > >       leaf identifier {      }
> > > >       leaf replay-start-time {
> > > >         if-feature "replay";
> > > >         type yang:date-and-time;
> > > >           description
> > > >             "If a replay has been requested, this represents the
> > > >             earliest time covered by the event buffer for the requested
> > > >             stream.  The value of this object is the
> > > >             'replay-log-aged-time' if it exists.  Otherwise it is the
> > > >             'replay-log-creation-time'.  All buffered event records
> > > >             after this time will be replayed to a receiver.  Note that
> > > >             this object will only be sent if the 'replay-start-time' is
> > > >             later than the time requested by the subscriber.";
> > >
> > > I am ok with this.   But the output leaf should probably not have the
> > > same name as the input leaf; it is not clear which one you refer to
> > > in the last sentence in the description.
> >
> > Done.  It is now:
> >
> >   rpc establish-subscription {...
> >     output {
> >       leaf identifier {      }
> >       leaf replay-start-time-revision {
> >         if-feature "replay";
> >         type yang:date-and-time;
> >           description
> >             "If a replay has been requested, this represents the
> >             earliest time covered by the event buffer for the requested
> >             stream.  The value of this object is the
> >             'replay-log-aged-time' if it exists.  Otherwise it is the
> >             'replay-log-creation-time'.  All buffered event records
> >             after this time will be replayed to a receiver.
> >             This object will only be sent if the start time has been
> >             revised to be later than the time requested by the
> >             subscriber.";
> >       }
> >     }
> >   }
> >
> > >  Also, I suggest you do:
> > >
> > >   s/Note that this/This/
> > >
> > > in the last sentence.
> >
> > Done
> 
> I noted that this change did not make it into -11.

It is in the next version.  You can see it here:
https://github.com/netconf-wg/rfc5277bis/blob/master/draft-ietf-netconf-subscribed-notifications-12.txt 

> > > Reading the definition of 'replay-log-aged-time' again, it says:
> > >
> > >    The timestamp of the last event record aged out of the log.
> > >
> > > The document doesn't define what "the timestamp" of an event record
> > > is.
> > > Is this the time that is sent in the "eventTime" field in the
> > > <notification>?   I think this needs to be clarified.
> >
> > How about:
> >
> >       leaf replay-log-aged-time {
> >         if-feature "replay";
> >         type yang:date-and-time;
> >         description
> >           "The timestamp associated with last event record which has
> >            been aged out of the log.  This timestamp identifies how far
> >            back into history this replay log extends, if it doesn't
> >            extend back to the 'replay-log-creation-time'.  This object
> >            MUST be present if replay is supported and any event records
> >            have been aged out of the log.";
> >       }
> >
> >
> > To complement this description, in the "Event Record Delivery"
> > section, I placed the following sentence after the example RFC 5277
> > notification:
> >
> > "In the figure above, the "eventTime" is populated with a timestamp
> > matching the time an originating process identified as when this event
> > occurred."
> 
> I think you need to explain this in more general terms than just in an
> example of a 5277 notification.  Specifically, I think you should introduce a
> generic term for when an event record is generated (maybe "event creation
> time", or even "event timestamp"), and then use this term consistently, and
> also explain in section 2.6 that the 5277 "eventTime" element contains the
> "event timestamp".

Added the term:
Event occurrence time: a timestamp matching the time an originating process identified as when an event happened.
In the Terminology section.

In the "Event Record Delivery" Section, the text before the example now says:
This notification message MUST be encoded in a <notification> message as defined within [RFC5277], Section 4. And per [RFC5277]'s "eventTime" object definition, the "eventTime" is populated with the event occurrence time.

Updated subscribed-notification document can be seen at:
https://github.com/netconf-wg/rfc5277bis/blob/master/draft-ietf-netconf-subscribed-notifications-12.txt 

Also imported the "event occurrence time" text into the notification-messages draft.

Eric

> Then this term should be imported by
> draft-ietf-netconf-notification-messages and used there as well.
> 
> 
> /martin
> 
> 
> >
> > Eric
> >
> > > /martin
> > >
> > >
> > >
> > > >       }
> > > >     }
> > > >   }
> > > >
> > > > If you are ok, I will spread the change through the rest of the
> > > > document.
> > > >
> > > > Eric
> > > >
> > > >
> > > > > "Eric Voit (evoit)" <evoit@cisco.com> wrote:
> > > > > > > From: Martin Bjorklund, March 23, 2018 7:37 AM
> > > > > > >
> > > > > > > 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.htm
> > > > > > > > l
> > > > > > > >
> > > > > > > > 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.
> > > > > >
> > > > > > The current definition of replay-start-time is:
> > > > > >
> > > > > > "Used to trigger the replay feature and indicate that the
> > > > > > replay should start at the time specified..."
> > > > > >
> > > > > > To me, that means the replay-start-time has to be covered by
> > > > > > the scope of the replay buffer.  It does not mean that it is
> > > > > > required that the requested replay-start-time needs to exactly
> > > > > > match the time of a buffered event.
> > > > >
> > > > > The text is quite unclear:
> > > > >
> > > > >   Used to trigger the replay feature and indicate that the
> > > > >   replay should start at the time specified.
> > > > >
> > > > > and:
> > > > >
> > > > >   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
> > > > >
> > > > > In lack of a clear definition, I assume that "content stored
> > > > > [in] replay buffer"
> > > > > refers to event records, since I assume that nothing else can be
> > > > > stored in the replay buffer?
> > > > >
> > > > > Next question is what it means that a time value is earlier than
> > > > > "content"?
> > > > > Again, my assumption is that it means "earlier than the 'eventTime'
> > > > > of the event records".  Is this not what is intended?
> > > > >
> > > > > From what you write here though, I think that what you propose
> > > > > is
> > > > > that:
> > > > >
> > > > >   If "replay-start-time" is less than the latest of
> > > > >   "replay-log-aged-time" and "replay-log-creation-time", then the
> > > > >   request is rejected.
> > > > >
> > > > > This must be clarified.  Also, ensure that the required behavior
> > > > > is clearly defined in the YANG module, and not just in the text
> > > > > in the document.
> > > > >
> > > > > But I still think that there should be some way for the client
> > > > > to get all buffered event records, just like what was supported
> > > > > in RFC 5277, without extra round trips.  Note that if the system
> > > > > is quickly generating notifs, the client might need many round
> > > > > trips before it manages to replay anything.
> > > > >
> > > > >
> > > > > > > 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.
> > > > > >
> > > > > > Why would this mean it might have lost some notifs?  In the
> > > > > > current embodiment, the replay will not start unless the
> > > > > > subscriber asked for a time that is within the scope covered
> > > > > > by the buffer.  I.e., a time later than both "replay-log-creation-
> time"
> > > > > > and
> > > "replay-log-aged-time".
> > > > >
> > > > > See above.  But the reason for rejection is that the client
> > > > > 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.";
> > > > > > >   }
> > > > >
> > > > > If we add something like this, the leaf name and description
> > > > > text needs to be tweaked for the clarified semantics of
> > > > > replay-start-time.
> > > > >
> > > > > > Something like this parameter *might* be applicable if we
> > > > > > choose to respond to a dynamic replay request with events
> > > > > > later than those requested.  (i.e., in the
> > > > > > establish-subscription success
> > > > > > response.) As noted in other threads, this is a legitimate way
> > > > > > to approach the issue.  However if the WG chooses this way,
> > > > > > this will result in an exception to the design pattern of
> > > > > > requiring the subscriber to ask for what they are going to receive.
> > > > >
> > > > > I disagree.  The client explicitly asks the server to send all
> > > > > buffered event records.
> > > > >
> > > > > > In addition, we might end up sending a stream of information
> > > > > > to the subscriber which is not sufficient, and therefore not
> > > > > > verifiably relevant.
> > > > >
> > > > > It is up to the client to define what is relevant.  Maybe I just
> > > > > want to view the replay buffer for trouble shooting purposes.
> > > > >
> > > > >
> > > > >
> > > > > /martin
> > > >
> >