Re: [alto] Yangdoctors early review of draft-ietf-alto-oam-yang-06

Andy Bierman <andy@yumaworks.com> Wed, 12 April 2023 18:32 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: alto@ietfa.amsl.com
Delivered-To: alto@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0A5F4C1522D9 for <alto@ietfa.amsl.com>; Wed, 12 Apr 2023 11:32:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.096
X-Spam-Level:
X-Spam-Status: No, score=-7.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2JLeHapIGK-2 for <alto@ietfa.amsl.com>; Wed, 12 Apr 2023 11:32:10 -0700 (PDT)
Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 04626C151B37 for <alto@ietf.org>; Wed, 12 Apr 2023 11:32:09 -0700 (PDT)
Received: by mail-lj1-x233.google.com with SMTP id j11so463182ljq.10 for <alto@ietf.org>; Wed, 12 Apr 2023 11:32:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1681324327; x=1683916327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=QRl4sG2/4jHaNmkuRXleYBYkYhQc22UExUVtJdHjK/U=; b=EQ6R/c3j5aSPbSuhFZlH/JiOXxIfDmbN0DC7AFZHos5Azb6UMwJhH/298WpA/liXBF GOaqypmQs0j86vPlW0bCyO5eajCRj9NFwJ6gHZUnAD06dt9zFgvu9QDw8AuUH7ngqUQR 7A+brEyfQYFOPhtCK6CPNS5r8xPcbzMMLc4U/lgyGl99aV7vk9Uo56jh5yd2EL4JwwFU vp3vc8d+37onknVMXsJfH03+f4N8gXVAGU8CVeDm5bTs6j3RLYvbVLK6V0Uzfu1WJVlJ +hR3+3t8hRlmUG4adIifxtNUPdomI0jchHr4BMYNRUoTuJbb3N5vgyRrtsEWhi4ZlyC8 W6dQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681324327; x=1683916327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QRl4sG2/4jHaNmkuRXleYBYkYhQc22UExUVtJdHjK/U=; b=ZhcGU+nQ9jWrdtsGkyHjuyWUj0OmnzcMN2SmrQjqgP4xCgklUx43nygwN9tmVDPtfy N9kqBHVg6GJCGwoWyJkdHH9E18b+IqvuclTouLNHcEWgeCgoZdWPwanFq/LcwrYEM662 0HgI5+3DOkbnmcRp75Np3F7R8X96C7u2kp4Z2UYZozKThO9dk7f1Fxar6fQYQ3WbcDOf lBUO3Hi0S5SmbYDZnNMpbEDzP+N/m7VhYnVRGFPhqr5R07jz3IyLt+LUh5mRrvkf3p/O KZu+UXNnODqYgbT0GKLuPOiPri4n4tUf42x108Er+1xr3i11j+8G+z7EoUBlB980zh0o 0gjQ==
X-Gm-Message-State: AAQBX9cUykVnuqPGEGhx9wXP4TtSp8F9hyE208ZM///bO3H413WzFWxz U/xsdzzGviyLmPXeA+4LQFDT/MnV3Yq5kGJe9LcXmx1GjgQVCvf3
X-Google-Smtp-Source: AKy350a+h957AFsSOnce2BkFQuLt8S2CvwZxwd+XUxNpSsGlH9v6BfcP319z+lAlyy9vrYU9b9cLcQrg6hy0oXwWpkc=
X-Received: by 2002:a2e:9417:0:b0:2a7:9f4c:ce94 with SMTP id i23-20020a2e9417000000b002a79f4cce94mr901193ljh.8.1681324327290; Wed, 12 Apr 2023 11:32:07 -0700 (PDT)
MIME-Version: 1.0
References: <168057075381.60470.15904062424172120890@ietfa.amsl.com> <CAAbpuyoJXFiBAHZ4hrLuSxrivdCt2i=TFZbkF1eNrg+kpGDOKQ@mail.gmail.com>
In-Reply-To: <CAAbpuyoJXFiBAHZ4hrLuSxrivdCt2i=TFZbkF1eNrg+kpGDOKQ@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 12 Apr 2023 11:31:55 -0700
Message-ID: <CABCOCHRvKQD89C5N5Ab9H9FcuABwcq1iEqmu5cYHsqXs7vOr+A@mail.gmail.com>
To: Jensen Zhang <jingxuan.n.zhang@gmail.com>
Cc: yang-doctors@ietf.org, alto@ietf.org, draft-ietf-alto-oam-yang.all@ietf.org
Content-Type: multipart/alternative; boundary="00000000000047df6905f927d308"
Archived-At: <https://mailarchive.ietf.org/arch/msg/alto/ygx78Sb8md86B1HebS02Ov8AWhY>
Subject: Re: [alto] Yangdoctors early review of draft-ietf-alto-oam-yang-06
X-BeenThere: alto@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Application-Layer Traffic Optimization \(alto\) WG mailing list" <alto.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/alto>, <mailto:alto-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/alto/>
List-Post: <mailto:alto@ietf.org>
List-Help: <mailto:alto-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/alto>, <mailto:alto-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Apr 2023 18:32:15 -0000

On Tue, Apr 11, 2023 at 7:52 AM Jensen Zhang <jingxuan.n.zhang@gmail.com>
wrote:

> Hi Andy,
>
> Great thanks for your thorough yangdoctors review. We have gone over all
> your comments. Please see our responses inline.
>
> You can also check details of our proposed changes in the [GitHub
> issues][1].
>
> [1]:
> https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues?q=is%3Aissue+is%3Aopen+label%3Ayangdoctors
>
> Looking forward to your feedback.
>
>
I checked some of the issues.
Just responding about the JSON issue (40)
The choices are (1) convert JSON to YANG anydata nodes or (2) embed JSON in
a string.
If the RFC 7951 mapping is sufficient, then use anydata. Seems like it
isn't in this case.


Thanks,
> Jensen
>
>
Andy


>
> On Tue, Apr 4, 2023 at 9:12 AM Andy Bierman via Datatracker <
> noreply@ietf.org> wrote:
>
>> Reviewer: Andy Bierman
>> Review result: Almost Ready
>>
>> # Review: draft-ietf-alto-oam-yang-06.txt
>>
>>
>> ## module ietf-alto
>>
>> - General:
>>
>>   - very well written
>>   - large module but quite understandable for implementors
>>
>> ### List Key Issues
>>
>> - there are 3 list keys that use unconstrained 'string'
>>   as the data type
>>
>>   - /alto/alto-client/client-id
>>   - /alto/alto-server/cost-type/cost-type-name
>>   - /alto/alto-server/role/role-name
>>   - /alto/alto-server/data-source/source-id
>>
>>
>> - the 'resource-id' is done correctly, using a well-constrained
>>   typedef to define the key leaf.
>>
>> - A similar typedef for each of these 3 types is needed.
>>   The constraints do not have to be the same.
>>   Machine-readable stmts are preferred but description
>>   is just as normative as 'pattern'.
>>
>> - the typedef should clarify the following issues:
>>
>>   - semantics:
>>
>>     - it should be clear if the name has any
>>       special meaning or derived from a field defined
>>       in a document.
>>     - Use 'reference' if possible to define the linkage.
>>
>>   - whitespace:
>>     - leading or trailing whitespace allowed?
>>     - whitespace within the key string value allowed?
>>
>>   - zero-length: if not allowed then a minimum length of 1
>>     should be specified.
>>
>>   - max-length:
>>     - it may be desirable to pick a maximum string length
>>       - example with limit: range "1 .. 64";
>>       - without limit: range "1 .. max";
>>     - there are some engineering trade-offs to consider.
>>       Details are out of scope here.
>>
>>   - allowed characters:
>>     - use of plain string means the server is expected to
>>       support the entire character set.  If this is not
>>       what is desired then limit the character set with a
>>       pattern or a description-stmt.
>>
>
> Agree. We have added typedefs for them.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/37
>
>
>>
>> ### /alto/alto-client
>>
>> - mentioned in sec 5, 5.1, 5.2
>>
>> - not clear if alto-client and alto-server would be implemented on the
>>   same device or expected that a device will implement one container
>>   or the other
>>
>>
> Agree. We have added two features "alto-client" and "alto-server" to
> indicate if a device would implement the "alto-client" container and
> "alto-server" container.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/38
>
>
>
>>
>>
>> ### /alto/alto-server/logging-system/syslog-params/config-file
>>
>> -  It is unusual to have an implementation or OS-specific
>>    default value for this sort of parameter.
>>
>>         leaf config-file {
>>           type inet:uri {
>>             pattern 'file:.*';
>>           }
>>           default "file:/etc/syslog.conf";
>>           description
>>             "The file location of the syslog configuration.";
>>         }
>>
>>
> The default value has been removed.
>
>
>>
>> ### /alto/alto-server/meta
>>
>> - The referenced RFC text is not sufficient to implement
>>   this list.
>>
>> - It appears each list entry is a map entry and
>>   the meta-key is a JSONString, and meta-value is
>>   a JSONValue.
>>
>> -  Not clear how arbitrary JSON is encoded here
>>
>>
>>        list meta {
>>         key "meta-key";
>>         description
>>           "Mapping of custom meta information";
>>         reference
>>           "Section 8.4.1 of RFC 7285.";
>>         leaf meta-key {
>>           type string;
>>           description
>>             "Custom meta key";
>>         }
>>         leaf meta-value {
>>           type string;
>>           mandatory true;
>>           description
>>             "Custom meta value";
>>         }
>>        }
>>
>> - the entire referenced section
>>
>>       Meta information is encoded as a map object for flexibility.
>>       Specifically, ResponseMeta is defined as:
>>
>>         object-map { JSONString -> JSONValue } ResponseMeta;
>>
>>
> That is a very good catch. We proposed 2 potential options to address this:
>
> - Option 1: use `binary` to encode the arbitrary JSONValue using base64.
> This requires the server to validate the syntax of the encoded value.
> - Option 2: use `anydata` statement. But yang data is not fully equivalent
> to JSON. This may need the implementors to provide documents to explain how
> the yang data will be translated to JSON.
>
> We would like to see your opinion.
>
> Please also see
> https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/40
>
>
>>
>> ### /alto/alto-server/auth-client/authentication
>>
>> - this choice is not mandatory and there is no default.
>> - either add a mandatory-stmt, or a default-stmt, or explain
>>   what should happen if no authentication method is configured.
>>
>>
> If a client has no authentication method, it should be ignored because the
> server cannot identify it. We have updated the description to clarify this.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/41
>
>
>>
>> ### /alto/alto-server/data-source/source-params
>>
>> - Not much guidance or description on this placeholder choice.
>>   I understand you do not want to reference the 'example'
>>   YANG modules that augment this choice.
>>
>> - Please add a reference or description mentioning the
>>   section in this RFC that explains the source params
>>   augmentation model.
>>
>>
>>         choice source-params {
>>           description
>>             "Data source specific configuration.";
>>         }
>>
>> ### grouping algorithm
>>
>> - Same comment as source-params.
>> - Provide reference or other guidance how this mandatory
>>   empty choice is used.
>>
>>
>>          grouping algorithm {
>>           description
>>             "This grouping defines the base data model for information
>>              resource creation algorithm.";
>>           choice algorithm {
>>             mandatory true;
>>             description
>>               "Information resource creation algorithm to be augmented.";
>>           }
>>         }
>>
>>
> We have added references to these two placeholders.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/42
>
>
>>
>> ### /alto/alto-server/data-source/feed-interval
>>
>> - Add a units statement
>> - Is value zero allowed? If so what does it mean?
>>   If not then use a range-stmt
>>
>>
>> ### /alto/alto-server/data-source/poll-interval
>>
>> - Add a units statement
>> - Is value zero allowed? If so what does it mean?
>>   If not then use a range-stmt
>>
>>
> We have added units to these two nodes and updated descriptions to explain
> the semantics of the zero value.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/43
>
>
>>
>> ### /alto/alto-server/resource/alto-costmap-params/cost-type-names
>>
>> - Why is the type 'string' instead of a leafref
>>   to /alto/alto-server/cost-type/cost-type-name?
>>
>> - Do not use a plural name for a leaf-list. (Use cost-type-name here)
>>
>> ###
>> /alto/alto-server/resource/alto-costmap-params/testable-cost-type-names
>>
>> - Why is the type 'string' instead of a leafref
>>   to /alto/alto-server/cost-type/cost-type-name?
>>
>> - Do not use a plural name for a leaf-list.
>>
>
> We have defined a new typedef "cost-type-ref" for leafref of
> cost-type-name.
>
> All the plural names of leaf-lists have been fixed.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/44
>
>
>>
>> ### /alto/alto-server/resource/alto-endpointprop-params/prop-types
>>
>> - Is there some other YANG data structure that this list
>>   of property types references?
>>
>> - What are the allowed values for this string?
>>   Add a reference or description.
>>
>> - Do not use a plural name for a leaf-list.
>>
>>
>>               leaf-list prop-types {
>>                 type string;
>>                 min-elements 1;
>>                 description
>>                   "Supported endpoint properties.";
>>               }
>>
>
> We have added a new typedef "endpoint-property" to narrow the values.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/44
>
>
>>
>> ## module ietf-alto-stats
>>
>> ###  container for statistics
>>
>> - Suggest using a container (e.g., 'statistics') instead  of
>>   adding this many counter leafs directly to a list entry.
>>   This makes retrieval of all counters easier.
>>
>>   - augment "/alto:alto/alto:alto-server"
>>   - augment "/alto:alto/alto:alto-server/alto:resource"
>>
>
> We have put all the server-level and resource-level stats into the
> containers.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/45
>
>
>>
>> ### 5 minute counters
>>
>> - Should be type gauge64, not counter64 because the value can go down.
>>
>>   - num-total-last-req
>>   - num-total-last-succ
>>   - num-total-last-fail
>>
>> ### size counters
>>
>> - Should be type uint64, not counter64 because the value is a size.
>>
>>   - res-mem-size
>>   - res-enc-size
>>
>> ### update event counters
>>
>> - It is not clear what the correct data type should be. Not counter64.
>>
>>   - num-event-max
>>   - num-event-min
>>
>> - Are these leafs maintained over a 5 minute interval perhaps?
>>   Then they should be gauge64.
>>
>> - The procedure to determine min and max should be specified or
>> referenced.
>>
>>
> We have corrected the types of those stats.
> For "num-total-last-*" and "num-event-*", Med and I think "gauge64" should
> be good. But Qin suggests "uint32". I have no strong opinion about this. We
> are willing to see your suggestion.
>
> About how to determine max and min stats, we have updated descriptions of
> the metrics to clarify them.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/15
> for the concrete changes.
>
> The reporting interval can be configured right now instead of a fixed
> value (5 minutes).
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/19
>
>
>>
>> ## Example modules
>>
>> ### Leafref Typedefs
>>
>> - There should be typedefs defined in ietf-alto to simplify
>>   usage in an extension module.
>>
>>   - source-datastore
>>   - top-name
>>
>>   - Example: source-datastore
>>
>>           leaf source-datastore {
>>             type leafref {
>>               path '/alto:alto/alto:alto-server/alto:data-source'
>>                  + '/alto:source-id';
>>             }
>>
>>   - Add a typedef to ietf-alto.yang
>>
>>           typedef data-source-ref {
>>             type leafref {
>>               path '/alto:alto/alto:alto-server/alto:data-source'
>>                  + '/alto:source-id';
>>             }
>>           }
>>
>>   - Change the leaf to use the typedef
>>
>>           leaf source-datastore {
>>             type alto:data-source-ref;
>>           }
>>
>> - The topo-name leafref definition should be a typedef.
>>   It is not clear which module should define the typedef.
>>
>>           leaf topo-name {
>>             type leafref {
>>               path '/alto:alto/alto:alto-server/alto:data-source'
>>                  + '[alto:source-id = current()/../source-datastore]'
>>                  + '/alto-ds:yang-datastore-source-params'
>>                  + '/alto-ds:target-paths/alto-ds:name';
>>             }
>>             description
>>               "The name of the IETF layer 3 unicast topology.";
>>           }
>>
>
> I agree that a typedef for the leafref of source-id can be useful for
> other modules. It has been added.
>
> See https://github.com/ietf-wg-alto/draft-ietf-alto-oam-yang/issues/46
>
> However, topo-name can only be used when the "when" condition of the
> source-datastore leaf is true. They are combined for the
> implementation-specific data source. I cannot imagine how it can be reused
> by other modules.
>
>