Re: [Anima] question about future-proofing of GRASP objectives

Brian E Carpenter <brian.e.carpenter@gmail.com> Sun, 13 December 2020 02:53 UTC

Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: anima@ietfa.amsl.com
Delivered-To: anima@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BFAA13A1058 for <anima@ietfa.amsl.com>; Sat, 12 Dec 2020 18:53:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.2
X-Spam-Level:
X-Spam-Status: No, score=-0.2 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 7ZrlKh-I4IJ1 for <anima@ietfa.amsl.com>; Sat, 12 Dec 2020 18:53:46 -0800 (PST)
Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C6C463A1057 for <anima@ietf.org>; Sat, 12 Dec 2020 18:53:46 -0800 (PST)
Received: by mail-pj1-x1031.google.com with SMTP id lb18so4353837pjb.5 for <anima@ietf.org>; Sat, 12 Dec 2020 18:53:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=CS/MgZhvRlkugS3zKtYLMoRSn+ULIAp0OS5wk6sdrVI=; b=jKYs5xObRG3j4crPt9c9d+B2f6zo7KSTVzoZTx5CsdWLq1WB7SKfVzAmnltrP2+lBA 15YFJ5kXT4DLOCepXI1xe8cnw4Y+QjIbLEAdv/b+AnkzpIR6cHuLqBD2fRMjuJr+iSgG FM8U1oS1C98tHe5vsPuZjT9lt0rC87M8N/yqzwVbvzhV7i2ib07MDJOXTUNUu6UdN6c+ 10YbRlkNqAnceH4MJpljskOlRI+WD+fLSPA33kHTOd+6tfMYABNR24adE3RKhjld+TYi iG2zYJ6B7IXS+/PS9PTm2OGLlf4kQMN+xsRCnz1mWZQ+/ghQICTRsvvSyaiuQzQxdNVQ 6iHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CS/MgZhvRlkugS3zKtYLMoRSn+ULIAp0OS5wk6sdrVI=; b=Dck7vEv1yjEt/nArN6WD5i2BhPeZ3G0BXSB1kpJMJ6iD+KUa9e8zPwqaSbm+X1qaFS bkXpY9dVbPUKlOaXVFiSRcLAWXgIuzzDpr0SNlE1aoW+Gg254TU82nCfWU4dQW5E3QdF 486OMbh5Eu5UhIW7O906yPA9ubnyobCAhVnIPsqDGUohTBiwx7XVoZMUC5prcSy95ePj BeG7P7eoTI/owZzUvQA479hOdWMOAAo2SCpFKRdMlb5S8duiEqp/iU8qVtBlPhZBZvbk vuaSaFxQ+HY3rszpqrfeX1uyt8N50stdzaFS6060ssZYT3rsKw9iJsv+W2bDJfiMVDIu IT2g==
X-Gm-Message-State: AOAM53230o25noH8XS2xxm3oZrIcZChAp8E3Vg3HUf7k5Bnnvm0JuEWV VfI7Nxjdg5F71MTEy0hku4cRJWVfd3XpZA==
X-Google-Smtp-Source: ABdhPJxxJNylIFMD6C9UICyNFY2zNqSIYUhyNtOmaMASdHEf3iMFMwRUmeaEdyxGJNJBOeysy6OImw==
X-Received: by 2002:a17:90b:16cd:: with SMTP id iy13mr19302186pjb.182.1607828025830; Sat, 12 Dec 2020 18:53:45 -0800 (PST)
Received: from [172.20.15.112] ([202.134.35.146]) by smtp.gmail.com with ESMTPSA id r68sm15567030pfr.113.2020.12.12.18.53.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Dec 2020 18:53:45 -0800 (PST)
To: Michael Richardson <mcr+ietf@sandelman.ca>, anima@ietf.org
References: <31729.1607817912@localhost>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Message-ID: <2800d166-48af-e081-8356-c6295ba30704@gmail.com>
Date: Sun, 13 Dec 2020 15:53:42 +1300
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <31729.1607817912@localhost>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/CGm__x7yS1W5_bzLVZSiWYxU2TU>
Subject: Re: [Anima] question about future-proofing of GRASP objectives
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Autonomic Networking Integrated Model and Approach <anima.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima>, <mailto:anima-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima/>
List-Post: <mailto:anima@ietf.org>
List-Help: <mailto:anima-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima>, <mailto:anima-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 13 Dec 2020 02:53:48 -0000

On 13-Dec-20 13:05, Michael Richardson wrote:
> 
> GRASP objectives look like:
> 
>   objective = [objective-name, objective-flags, loop-count, ?objective-value]
>   objective-name = text ;see section "Format of Objective Options"
>   objective-flags = uint .bits objective-flag
>   loop-count = 0..255
> 
> so, ['string', uint, uint, otherstuff]
> 
> There can be an array of objectives.

Right, but only in an M_FLOOD message at present. Of course, we could
in theory add other message formats with multiple objectives.

> If any of the objectives do not match the above CDDL, what do I do?

A related question was raised on the API draft by Ben Kaduk: how do we
apply the (new) recommendations on CBOR validation in RFC8949?

> Options are:
>   1) throw away that objective and move on to the others, which maybe
>      look right?

I would say that by the nature of M_FLOOD,  that is the logically
correct approach.

>   2) throw away the entire message.
> 
> (2) is certainly easier to code.

Each objective is a self-contained CBOR array, so could
be parsed quite independently of the others.
[pause to glance at my code]
However, I did do it the lazy way, i.e. the parsing loop exits
on the first error. (If you look at my code, that's in the
elif ... M_FLOOD case inside _parse_msg().) 

It would indeed be a little more work to skip the faulty objectives
and process the valid ones. I probably should add that to my
code since it would be useful for debugging.

> (1) seems way more future proof.

It depends on whether you prefer the Postel principle or
draft-iab-use-it-or-lose-it. 

Regards
     Brian