Re: [netmod] schema mount open issue #1

Ladislav Lhotka <lhotka@nic.cz> Thu, 31 August 2017 11:48 UTC

Return-Path: <lhotka@nic.cz>
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 208DF132D5D for <netmod@ietfa.amsl.com>; Thu, 31 Aug 2017 04:48:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 Rdstnpc_QZ-E for <netmod@ietfa.amsl.com>; Thu, 31 Aug 2017 04:48:09 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id C95FB132D69 for <netmod@ietf.org>; Thu, 31 Aug 2017 04:48:05 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id 14B881820E76; Thu, 31 Aug 2017 13:48:02 +0200 (CEST)
Received: from localhost (unknown [195.113.220.126]) by trail.lhotka.name (Postfix) with ESMTPSA id 1F47F1820E6E; Thu, 31 Aug 2017 13:47:58 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Lou Berger <lberger@labn.net>, Per Hedeland <per@tail-f.com>
Cc: netmod@ietf.org
In-Reply-To: <15e2e384bf8.27d3.9b4188e636579690ba6c69f2c8a0f1fd@labn.net>
References: <7c99497f-d719-0fe2-01f5-a06d53c8fc68@labn.net> <1503929779.1715.65.camel@nic.cz> <81b138c6-9941-3313-979c-61edad7819a7@labn.net> <20170829.093743.762532630259333653.mbj@tail-f.com> <647a5ef0-968a-4eb7-322e-b3862a1252bd@labn.net> <59A565F3.5030808@tail-f.com> <15e2e384bf8.27d3.9b4188e636579690ba6c69f2c8a0f1fd@labn.net>
Mail-Followup-To: Lou Berger <lberger@labn.net>, Per Hedeland <per@tail-f.com>, netmod@ietf.org
Date: Thu, 31 Aug 2017 13:48:29 +0200
Message-ID: <87y3q0t0tu.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/1UWr_LVgFJqLgKToqoQCutRMJUU>
Subject: Re: [netmod] schema mount open issue #1
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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, 31 Aug 2017 11:48:13 -0000

Lou Berger <lberger@labn.net> writes:

> On August 29, 2017 9:03:22 AM Per Hedeland <per@tail-f.com> wrote:
>
>> On 2017-08-29 14:34, Lou Berger wrote:
>>> On 08/29/2017 03:37 AM, Martin Bjorklund wrote:
>>>> Lou Berger <lberger@labn.net> wrote:
>>>>> Lada,
>>>>>
>>>>>
>>>>> On 8/28/2017 10:16 AM, Ladislav Lhotka wrote:
>>>>>> Lou Berger píae v Po 28. 08. 2017 v 09:40 -0400:
>>>>>>> Lada,
>>>>>>>
>>>>>>> On 8/28/2017 9:30 AM, Ladislav Lhotka wrote:
>>>>>>>>> Can you please take a look at it and see if we have any other disconnects?
>>>>>>>> This is really scary.
>>>>>>> I agree!
>>>>>>>
>>>>>>>> How can we expect poor data modellers to understand the
>>>>>>>> concept if we have such fundamental disconnects, after so many hours of
>>>>>>>> discussing it?
>>>>>>> This highlights why getting the text in (any) document is so important,
>>>>>>> and why discussions shouldn't be viewed as being closed until the impact
>>>>>>> on the text is agreed to!
>>>>>> I think many people still don't make much distinction between schema mount
>>>>>> (manipulation of the schema) and data mount. I still believe we need to clearly
>>>>>> separate these two concepts, preferably using two different mechanisms.
>>>>>
>>>>> Frankly, I'm focused on removing blocking issues on the current WG
>>>>> deliverable, i.e., schema mount.
>>>>> ...
>>>>>>> Lou
>>>>>>>
>>>>>>> PS is your view aligned with martin or our example?
>>>>>> If you mean shifting the XPath context node to the mount point instance, then
>>>>>> yes.
>>>>>
>>>>> funny, you answered yes to a choice!  I was asking if you think the
>>>>> mount point shows up as a node in the data tree, i.e., as shown in the
>>>>> example in
>>>>> https://tools.ietf.org/html/draft-ietf-rtgwg-ni-model-03#appendix-B.1?
>>>>>
>>>>> from my perspective and my co-authors in the RTG area using schema
>>>>> mount, we've never heard of a (filesystem) mount point that doesn't show
>>>>> in the (directory) structure and this is the mental analogue we've been
>>>>> assuming. Since there never was an explicit example/discussion or text
>>>>> to dissuade us of this
>>>>
>>>> The current text says:
>>>>
>>>>   A "container" or "list" node becomes a mount point if the
>>>>   "mount-point" extension (defined in the "ietf-yang-schema-mount"
>>>>   module) is used in its definition.
>>>
>>> interesting, read that a few times to (now) get the gist of your intent.
>>>
>>>>
>>>> But of course we should clarify this.
>>>>
>>>
>>>
>>>
>>>>> , this disconnect was never noticed.  Certainly
>>>>> this needs to be explicit in the document (either way). The following
>>>>> change could be made to the schema mount draft (at a minimum):
>>>>>
>>>>> OLD
>>>>>           A mount point defines a place in the node hierarchy where
>>>>>           other data models may be attached. A server that implements a
>>>>> NEW
>>>>>           A mount point defines a node in a data tree under which
>>>>> instances of
>>>>>           other data models may be attached. A server that implements a
>>>>
>>>> I strongly object to letting the extension define a new data node.
>>>
>>>> This would be a new type of data node that presumably look a lot like
>>>> a container,
>>>
>>> agreed, just like a mount point looks a lot like a directory in a unix
>>> file system.
>>
>> It seems to me that the schema mount concept is 100% equivalent to the
>> Unix file system analogy in this particular respect. You need a
>> pre-existing directory to mount a remote file system (or for that matter
>> a disk device). The directory gains the property of being a mount point
>> by the process of mounting, and loses it by the process of unmounting:
>>
>
> This point was at the root of the discussion of whether or not we even 
> needed the mount Point extension at all and whether just having the scheme 
> amount module identify mounts with in a container was sufficient.

I don't like this analogy very much (and, for that matter, the term
"mount" itself) because Unix mount deals with data.

>
> I believe the perspective from Lada and Martin was that it didn't really 
> add value. Those of us in the routing area working on models using scheme

In fact, I think Martin was never in favour of getting rid of the extension.

> mount uniformly agreed that it was important to keep the extension to 
> enable module designers to indicate to implementers where Mount points were 
> intended to be used in the modules they were defining and for client users/ 
> implementers to reliably identify where modules would be mounted. We
> also

Without the extra data specifying what is going to be added here, the
extension itself doesn't tell you much.

YANG already has an analogy: each container and list is basically an
implicit "augment point" where external modules can place stuff. Yet we
apparently don't need any explicit indication of the augment point in
the recipient module.

So I wonder why we need it for schema mount.

> thought that the use of the mount Point extension in modules would have 
> certain tooling benefits over just putting a comment in the description of 
> a container that it was to be used as a mount point.
>
> Yes, we can make the current node-less Mount Point extension work, but it 
> certainly seems like a clumsier and more complex solution

I don't agree. The current "node-less" solution is more flexible in that
it allows you to have a container or list as the mount point.

It would be a completely different story though (and IMO the cleanest
solution) to implement the schema mount concept directly in YANG with a
specification of the mounted schema (i.e. as a design-time thing),
perhaps something like embedded grammars in RELAX NG:

http://books.xmlschemata.org/relaxng/relax-CHP-10-SECT-1.html#relax-CHP-10-SECT-1.3

This would however need a fairly massive redesign. We tried to avoid
changes to YANG but ended up with something that is, I am afraid, too
complex and non-intuitive.

Lada

>
> Lou
>
>
>
>
>> # mount earth:/home /foo
>> mount: /foo: No such file or directory
>> # mkdir /foo
>> # mount earth:/home /foo
>> # ls /foo
>> (... lots of user directories ...)
>> # umount /foo
>> # ls /foo
>> #
>>
>> --Per
>>
>>>> and you'd have to define all sorts of rules for this new
>>>> node (how it is encoded in XML, JSON, CBOR; how it is handled in
>>>> edit-config, how it is mapped to RESTCONF resources etc etc).
>>>
>>> I'm don't see this, the rules would be the same as a container, as in
>>> "mount points in data trees are encoded identically as containers".
>>>
>>>>
>>>> If you thought that the extension implicitly creates a node, adding an
>>>> explicit container won't do any harm; it will not change the schema
>>>> tree from what you thought it was.
>>>
>>> Well we could make this work, but it feels like every model that uses
>>> schema has added complexity to its definition and use to perhaps avoid
>>> making some minor tooling changes.  Keep in mind that any use of the
>>> mount point extension will required changes in tooling.
>>>
>>>>
>>>> But I think we should also restrict the mount-point extension so that
>>>> there cannot be more than one mount-point in a given container.
>>>>
>>> In this case, I'd go further and say that the only thing in the
>>> container (of the module schema) is the mount point and a mount point
>>> extension is only valid within a container. (Then the semantics are the
>>> same as we expected, just the syntax is different.)
>>>
>>> Lou
>>>
>>>
>>>>
>>>> /martin
>>>>
>>>>
>>>
>>> _______________________________________________
>>> netmod mailing list
>>> netmod@ietf.org
>>> https://www.ietf.org/mailman/listinfo/netmod
>>>
>>
>>
>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67