From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Michael Köppl" <m.koeppl@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH test-tools,e2e-tests 0/6] randomly select VMIDs for test
Date: Tue, 06 Oct 2026 12:50:47 +0200 [thread overview]
Message-ID: <DLXP4N91TDKV.7F3I6IF2TCX2@proxmox.com> (raw)
In-Reply-To: <20260917162324.1926056-1-m.koeppl@proxmox.com>
On Thu Sep 17, 2026 at 6:23 PM CEST, Michael Köppl 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.
>
prev parent reply other threads:[~2026-10-06 10:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:23 [PATCH test-tools,e2e-tests 0/6] randomly select VMIDs for test Michael Köppl
2026-09-17 16:23 ` [PATCH test-tools 1/6] runner: add vmid-range option for test guest VMIDs Michael Köppl
2026-10-06 10:45 ` Lukas Wagner
2026-09-17 16:23 ` [PATCH e2e-tests 2/6] lib: add function for drawing a random unused VMID Michael Köppl
2026-09-17 16:23 ` [PATCH e2e-tests 3/6] storage-plugin: use random_vmid function for getting VMIDs Michael Köppl
2026-09-17 16:23 ` [PATCH e2e-tests 4/6] hw-validation: " Michael Köppl
2026-09-17 16:23 ` [PATCH e2e-tests 5/6] tests: " Michael Köppl
2026-09-17 16:23 ` [PATCH e2e-tests 6/6] storage-plugin: README: document the vmid-range option Michael Köppl
2026-10-06 10:50 ` Lukas Wagner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DLXP4N91TDKV.7F3I6IF2TCX2@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=m.koeppl@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox