From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 9F4651FF0AA for ; Tue, 06 Oct 2026 12:50:52 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 953C3213A3; Tue, 06 Oct 2026 12:50:50 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 06 Oct 2026 12:50:47 +0200 Message-Id: To: =?utf-8?q?Michael_K=C3=B6ppl?= , Subject: Re: [PATCH test-tools,e2e-tests 0/6] randomly select VMIDs for test From: "Lukas Wagner" X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260917162324.1926056-1-m.koeppl@proxmox.com> In-Reply-To: <20260917162324.1926056-1-m.koeppl@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791283847650 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.355 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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 Message-ID-Hash: J3CFMUKTGUU7BEEQW3Q5JZNCQD54QZY7 X-Message-ID-Hash: J3CFMUKTGUU7BEEQW3Q5JZNCQD54QZY7 X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu Sep 17, 2026 at 6:23 PM CEST, Michael K=C3=B6ppl wrote: > Instead of using `/cluster/nextid`, VMIDs are randomly selected from a > range (by default from 1000000 to 9999999). This is supposed to make 2 > problems that would occur very unlikely: > 1) Some tests would fail if multiple guests were created sequentially > because `/cluster/nextid` would return an ID that was already free > after the VM using it had been destroyed, but the cleanup process for > the VM was still running. By randomly selecting, this is vanishingly > unlikely. As briefly discussed off-list, I wonder if this shouldn't be fixed in the API instead, if possible at all. It's a bit odd that `/cluster/nextid` returns a VMID that cannot be used immediately due to running cleanups. That being said, randomly sampling the VMID sounds like an okay workaround for now. > 2) When multiple test runs run in parallel (e.g. on different nodes of > the same cluster), it could also happen that `/cluster/nextid` > returned the same VMID for both runs, resulting in an error upon > creation of the guest in one of the runs. > > The initial plan was to add a lock file in > /etc/pve/priv/proxmox-e2e-tests (or a similarly named dir) for each VMID > currently in use. However, this would not solve the first issue, making > the random selection necessary anyway. In addition, the file lock could > leave behind lock files on a user's test system upon interrupted test > runs. > > Thus, the patch series adds a new library function to the test > repository, replaces all uses of `/cluster/nextid` to `random_vmid()` in > the 3 test suites, and adds a runner param for manipulating the range. >