Re: [Netconf] subscription-id management across applications

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Mon, 09 July 2018 16:42 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
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 AD4A4130E55 for <netconf@ietfa.amsl.com>; Mon, 9 Jul 2018 09:42:43 -0700 (PDT)
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] 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 fMc2i5NGc3Xg for <netconf@ietfa.amsl.com>; Mon, 9 Jul 2018 09:42:37 -0700 (PDT)
Received: from anna.localdomain (firewallix.jacobs-university.de [212.201.44.247]) by ietfa.amsl.com (Postfix) with ESMTP id BF4D5130E2A for <netconf@ietf.org>; Mon, 9 Jul 2018 09:42:37 -0700 (PDT)
Received: by anna.localdomain (Postfix, from userid 501) id 25A2822FD295; Mon, 9 Jul 2018 18:42:36 +0200 (CEST)
Date: Mon, 09 Jul 2018 18:42:36 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Andy Bierman <andy@yumaworks.com>
Cc: Netconf <netconf@ietf.org>
Message-ID: <20180709164236.pxoegcmb7emszhn4@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Andy Bierman <andy@yumaworks.com>, Netconf <netconf@ietf.org>
References: <CABCOCHTuSSKeoUwMBDRwtrQCfXD29xqM+n7xNtaNFMbZrE6Cjg@mail.gmail.com> <20180709163144.x3ltgh7spzbz26km@anna.jacobs.jacobs-university.de> <CABCOCHStZfsAPWN0sgTP_zcvSbhHU4832C_BvRjTYCFO_3aObg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABCOCHStZfsAPWN0sgTP_zcvSbhHU4832C_BvRjTYCFO_3aObg@mail.gmail.com>
User-Agent: NeoMutt/20180622
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/NjxEwSt2CQaF63-05_BWvlVF144>
Subject: Re: [Netconf] subscription-id management across applications
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.27
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: Mon, 09 Jul 2018 16:42:44 -0000

On Mon, Jul 09, 2018 at 09:34:17AM -0700, Andy Bierman wrote:
> On Mon, Jul 9, 2018 at 9:31 AM, Juergen Schoenwaelder <
> j.schoenwaelder@jacobs-university.de> wrote:
> 
> > On Mon, Jul 09, 2018 at 09:12:57AM -0700, Andy Bierman wrote:
> > > Hi,
> > >
> > > The configured subscriptions use a uint32 subscription-id.
> > > There is text in 5.2 about splitting the range for dynamic and configured
> > > subscriptions:
> > >
> > >    To support deployments including both configured and dynamic
> > >    subscriptions, it is recommended to split subscription identifiers
> > >    into static and dynamic halves.  That way it eliminates the
> > >    possibility of collisions if the configured subscriptions attempt to
> > >    set a subscription-id which might have already been dynamically
> > >    allocated.  A best practice is to use lower half the "identifier"
> > >    object's integer space when that "identifier" is assigned by an
> > >    external entity (such as with a configured subscription).  This
> > >    leaves the upper half of subscription identifiers available to be
> > >    dynamically assigned by the publisher.
> >
> > Why would a server accept a dynamic subscription that clashes with
> > a configured subscription?
> >
> >
> I don't think it would.
> The issue is how applications share the range allocated for configured
> subscriptions.

This is not how I read the text. Splitting between dynamic and
configured does not solve the problem you think needs to be solved.
The problem, which I think the text hints at, is a situation where a
saved configuration cannot be restored due to dynamic subscriptions
clashing. To avoid this, separating the number spaces for configured
and dynamic subscriptions may be a good idea.

I think applications creating subscriptions should coordinate by
picking random values and being prepared to handle a failure if the
randomly picked value is already taken. Given the number space,
clashes should be rare.

/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/>