Re: [netmod] explicit mount

Robert Wilton <rwilton@cisco.com> Thu, 25 February 2016 15:15 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 482121B2A2A for <netmod@ietfa.amsl.com>; Thu, 25 Feb 2016 07:15:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.507
X-Spam-Level:
X-Spam-Status: No, score=-14.507 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, RP_MATCHES_RCVD=-0.006, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
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 qjPeAEx5Jm02 for <netmod@ietfa.amsl.com>; Thu, 25 Feb 2016 07:15:22 -0800 (PST)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4D7DE1B2A2B for <netmod@ietf.org>; Thu, 25 Feb 2016 07:15:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4408; q=dns/txt; s=iport; t=1456413322; x=1457622922; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=YTu6cc123L/0YcMZMUbcvS0xVl1nHD10u50Qj8+kbAI=; b=cHOA404h1KDYcDWv+rKIvb9312hSMqQE72WJpNFgu1sBzj7Epi59mMSl 7PzS8AGoIozGwG77DgIGEdiBFO2aM79DyCTKTa/O1NYaOMh233SyTie+R 031L+nuFz4/ljRKrCwmnGzhhM0clFIQn2bhupaTenBawxa04pZrj9Dhmx I=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DOAQCCGc9W/xbLJq1ehHm6PAENgWaGDQKBdhQBAQEBAQEBZCeEQQEBAQMBOEABEAsOAggJFg8JAwIBAgFFBg0GAgEBF4d8CL5SAQEBAQEBAQEBAQEBAQEBAQEBAReGEoQ6hB2EUgEEjSqJXo1fiSSFUI5JHgEBQoNkPC6IGAEBAQ
X-IronPort-AV: E=Sophos;i="5.22,498,1449532800"; d="scan'208";a="632887473"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2016 15:15:19 +0000
Received: from [10.63.23.69] (dhcp-ensft1-uk-vla370-10-63-23-69.cisco.com [10.63.23.69]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id u1PFFJ93030417; Thu, 25 Feb 2016 15:15:19 GMT
To: Martin Bjorklund <mbj@tail-f.com>
References: <20160225092623.GA19620@elstar.local> <20160225.103143.1397687839661509108.mbj@tail-f.com> <56CED453.6080009@cisco.com> <20160225.121636.2137433316176193967.mbj@tail-f.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <56CF1A86.1050809@cisco.com>
Date: Thu, 25 Feb 2016 15:15:18 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <20160225.121636.2137433316176193967.mbj@tail-f.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/cKnc2UaPqVf6qnwcqpixEUWCEHw>
Cc: netmod@ietf.org
Subject: Re: [netmod] explicit mount
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
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: Thu, 25 Feb 2016 15:15:24 -0000


On 25/02/2016 11:16, Martin Bjorklund wrote:
> Robert Wilton <rwilton@cisco.com> wrote:
>> Hi Martin,
>>
>> On 25/02/2016 09:31, Martin Bjorklund wrote:
>>> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
>>>> On Thu, Feb 25, 2016 at 10:14:05AM +0100, Martin Bjorklund wrote:
>>>>> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
>>>>>> On Thu, Feb 25, 2016 at 09:43:34AM +0100, Martin Bjorklund wrote:
>>>>>>> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
>>>>>>>> On Thu, Feb 25, 2016 at 09:23:57AM +0100, Martin Bjorklund wrote:
>>>>>>>>
>>>>>>>>>> I think the use cases are rather obvious. I build a device and I like
>>>>>>>>>> to rearrange existing models into a beautiful hierarchy (for some
>>>>>>>>>> definition of beauty).
>>>>>>>>> This would be pretty complicated.  Suppose I define my own beautiful
>>>>>>>>> structure like this:
>>>>>>>>>
>>>>>>>>>     container my-interfaces {
>>>>>>>>>       x:mount-point "if" {
>>>>>>>>>         x:mount-module "ietf-interfaces";
>>>>>>>>>       }
>>>>>>>>>     }
>>>>>>>>>     container my-routing {
>>>>>>>>>       x:mount-point "rtr" {
>>>>>>>>>         x:mount-module "ietf-routing";
>>>>>>>>>       }
>>>>>>>>>     }
>>>>>>>>>
>>>>>>>>> Note that with the mount-point defined in my draft, each mount-point
>>>>>>>>> becomes itw own "jailed" or "chrooted" tree.  So references cannot
>>>>>>>>> cross mount points.
>>>>>>>> Could be the same here.
>>>>>>>>    
>>>>>>>>> In this case, we have references between ietf-routing and
>>>>>>>>> ietf-interfaces.  How would they work?
>>>>>>>> How do they work in your solution? If interfaces is jailed and routing
>>>>>>>> is jailed, how does routing refer to the interfaces?
>>>>>>> My solution does not support "name module mount".  It only supports
>>>>>>> mouting of a "complete" set of modules (that are chrooted) - simply
>>>>>>> because this is what we understand, have implemented, and have been
>>>>>>> running for the last ~5 years.  (The same goes for ODL, I believe).
>>>>>> OK. I understand now that the whole set of modules on a mount point
>>>>>> form one chroot environment. This was not clear to me yet but of
>>>>>> course makes a lot of sense. So a static schema mount would have to
>>>>>> define a set of modules and not just a single module to lead to the
>>>>>> same chrooted behavior.
>>>>> Yes, but then you can't use it to define your own beautiful
>>>>> structure.
>>>> I am not sure yet why this is the case.
>>> Each such mount point is chrooted.  This implies that if you want to
>>> put module A in some place, and B has a reference to A, A and B must
>>> be mounted together.  Thus I cannot put them anywhere to form a
>>> beautiful hierarchy.
>> As long as B is mounted in the same datastore as A then is it possible
>> that B could moved to be mounted on some other path?
> Yes, but then you'd need some special syntax to say that they are
> related.
Wouldn't any path references be sufficient to indicate whether the 
modules are related?

>
>> References to/from B would need to be fixed up, or are you saying that
>> fixing the references is intractable?
> I think it would be extremely complicated, both on the server and on
> the client side.
This probably feels similar (but actually simpler) than mapping between 
different sets of modules.  E.g. mapping from OpenConfig modules to IETF 
modules, or from OpenConfig/IETF modules to a native device schema.

I doubt whether this idea will be particularly well received, but:

Would it be possible to programmatically generate a new set of YANG 
module definitions from the originals with updated paths/references.  
I.e. both sets of module definitions model exactly the same data, just 
the location of that data is in different places.  A client could then 
solely interact with the new set of YANG modules if they wished.  A 
function can be programmatically generated and used to map between the 
two equivalent models with different node paths.  I would imagine that 
this mapping could be done either on the client side or server side.

Even if this approach is valid, it would appear to only really solve the 
"can't use it to define your own beautiful structure.", and I'm not sure 
whether that's an actual requirement here.

Rob


>
>
> /martin
> .
>