From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id B468D6099C for ; Tue, 15 Dec 2020 09:55:07 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id ABD8EF4E0 for ; Tue, 15 Dec 2020 09:55:07 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 33FFEF4D6 for ; Tue, 15 Dec 2020 09:55:07 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id EF78445176 for ; Tue, 15 Dec 2020 09:55:06 +0100 (CET) To: =?UTF-8?Q?Dominic_J=c3=a4ger?= , =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= Cc: Proxmox VE development discussion References: <20201214102052.76711-1-d.jaeger@proxmox.com> <9dbd3c98-1413-23f3-b571-bf393e46140d@proxmox.com> <1607949072.sr9bm66ztq.astroid@nora.none> <20201215081139.GA383434@mala.proxmox.com> From: Thomas Lamprecht Message-ID: <680c7504-9b6d-08f2-3b72-a8a2bcec16b6@proxmox.com> Date: Tue, 15 Dec 2020 09:55:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: <20201215081139.GA383434@mala.proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL -0.317 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [jsonschema.pm] Subject: Re: [pve-devel] [PATCH pve-common] JSONSchema: Increase vmid option minimum to 100 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2020 08:55:07 -0000 On 15.12.20 09:11, Dominic J=C3=A4ger wrote: > On Mon, Dec 14, 2020 at 01:33:25PM +0100, Fabian Gr=C3=BCnbichler wrote= : >> I think the argument is that the associated format already enforces th= at=20 >> the ID is >=3D 100, so that the API allows less has no practical effec= t=20 >> except confusing users that read the man page/help output/api dump. >=20 > This is exactly what I meant. But I'm not 100% sure if some schema mag= ic could > happen that circumvents the pve-vmid format, so I can certainly start >=20 FWIW; I never questioned that and this was 100% clear to me, but it still= does not help if we have some use here, even if only legacy or restore wi= se or what not, touch such things can easily break things in a subtle way, a= nd only get noticed in months or even years, we had such stuff a few times a= lready, so I'd be really cautious here - adding the "actual enforced limit" into = the description can also help. I mean, I really do not think this crucial limit slipped and was left as = is for years... > On Mon, Dec 14, 2020 at 12:52:35PM +0100, Thomas Lamprecht wrote: >> maybe you could take another look if you find >> some case where values <100 are used for some special handling? >=20 > looking for this. >=20 >>>> diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm >>>> index 29ada5b..b4596d3 100644 >>>> --- a/src/PVE/JSONSchema.pm >>>> +++ b/src/PVE/JSONSchema.pm >>>> @@ -58,7 +58,7 @@ sub get_standard_option { >>>> register_standard_option('pve-vmid', { >>>> description =3D> "The (unique) ID of the VM.", >>>> type =3D> 'integer', format =3D> 'pve-vmid', >>>> - minimum =3D> 1 >>>> + minimum =3D> 100, >>>> }); >>>> =20