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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id C474F6BBF4 for ; Mon, 14 Dec 2020 13:34:03 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B1E8A15F87 for ; Mon, 14 Dec 2020 13:33:33 +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 F26EA15F7A for ; Mon, 14 Dec 2020 13:33:32 +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 BCA1A4511B for ; Mon, 14 Dec 2020 13:33:32 +0100 (CET) Date: Mon, 14 Dec 2020 13:33:25 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Dominic =?iso-8859-1?b?SuRnZXI=?= , Proxmox VE development discussion References: <20201214102052.76711-1-d.jaeger@proxmox.com> <9dbd3c98-1413-23f3-b571-bf393e46140d@proxmox.com> In-Reply-To: <9dbd3c98-1413-23f3-b571-bf393e46140d@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1607949072.sr9bm66ztq.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL -0.226 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 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 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: Mon, 14 Dec 2020 12:34:03 -0000 On December 14, 2020 12:52 pm, Thomas Lamprecht wrote: > On 14.12.20 11:20, Dominic J=C3=A4ger wrote: >> The API standard_option pve-vmid always checks the format pve-vmid. The = format >> pve-vmid requires the vmid to be >=3D100. This is correct, because IDs 1= -99 are >> reserved. >>=20 >> To display this correctly in the API documentation (API viewer, qm man p= ages), >> we have to set the minimum to 100 in the API standard_option. >>=20 >> Signed-off-by: Dominic J=C3=A4ger >> --- >> https://forum.proxmox.com/threads/qm-importovf-man-page.80632/ >=20 > IIRC, we use this somewhere, albeit I'm currently not remembering where. >=20 > In any case, both Dietmar and I have the feeling that this will break som= e > things. I'd like to avoid that, maybe you could take another look if you = find > some case where values <100 are used for some special handling? I think the argument is that the associated format already enforces that=20 the ID is >=3D 100, so that the API allows less has no practical effect=20 except confusing users that read the man page/help output/api dump. we use special reserved VMIDs sometimes when parsing a temp config file,=20 or when querying the kvm binary by starting a fake VM, but neither the=20 API schema nor the format are involved in that at all AFAICT. >> src/PVE/JSONSchema.pm | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=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 >> register_standard_option('pve-node', { >>=20 >=20 >=20 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20 =