From: "Michael Köppl" <m.koeppl@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH test-tools,e2e-tests 0/6] randomly select VMIDs for test
Date: Thu, 17 Sep 2026 18:23:18 +0200 [thread overview]
Message-ID: <20260917162324.1926056-1-m.koeppl@proxmox.com> (raw)
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.
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.
proxmox-test-tools:
Michael Köppl (1):
runner: add vmid-range option for test guest VMIDs
README.md | 7 ++-
proxmox-test-runner/src/cli.rs | 28 ++++++++++--
proxmox-test-runner/src/main.rs | 1 +
proxmox-test-runner/src/types.rs | 78 ++++++++++++++++++++++++++++++++
4 files changed, 109 insertions(+), 5 deletions(-)
create mode 100644 proxmox-test-runner/src/types.rs
proxmox-e2e-tests:
Michael Köppl (5):
lib: add function for drawing a random unused VMID
storage-plugin: use random_vmid function for getting VMIDs
hw-validation: use random_vmid function for getting VMIDs
tests: use random_vmid function for getting VMIDs
storage-plugin: README: document the vmid-range option
Proxmox/Test/StorageGuest.pm | 4 +-
Proxmox/Test/Util.pm | 39 ++++++++++++++++++-
hw-validation-tests/tests/kvm_linux.pl | 3 +-
hw-validation-tests/tests/lxc_lifecycle.pl | 3 +-
hw-validation-tests/tests/storage_local.pl | 3 +-
storage-plugin-tests/README | 4 ++
storage-plugin-tests/tests/backup_ct.pl | 4 +-
storage-plugin-tests/tests/backup_restore.pl | 4 +-
storage-plugin-tests/tests/backup_running.pl | 4 +-
storage-plugin-tests/tests/backup_vm.pl | 4 +-
.../tests/cluster_migration.pl | 4 +-
storage-plugin-tests/tests/ct_create.pl | 4 +-
storage-plugin-tests/tests/disk_clone.pl | 6 +--
storage-plugin-tests/tests/disk_migration.pl | 4 +-
storage-plugin-tests/tests/disk_purge.pl | 4 +-
storage-plugin-tests/tests/disk_resize.pl | 4 +-
storage-plugin-tests/tests/disk_snapshot.pl | 6 +--
.../tests/disk_thin_discard.pl | 4 +-
storage-plugin-tests/tests/io_integrity.pl | 4 +-
.../tests/snapshot_volume_chain.pl | 4 +-
.../tests/template_linked_clone.pl | 6 +--
.../tests/vm_additional_disk_vtpm.pl | 4 +-
.../tests/vm_create_default.pl | 4 +-
.../tests/vm_destroy_with_snapshots.pl | 4 +-
storage-plugin-tests/tests/vm_disk_buses.pl | 4 +-
tests/pbs/test_pbs_s3_datastore.pl | 5 ++-
tests/pve_backup_job.pl | 3 +-
tests/pve_create_pool.pl | 3 +-
tests/pve_create_vm.pl | 4 +-
tests/pve_firewall.pl | 4 +-
tests/pve_ha_resource_config.pl | 3 +-
tests/pve_ha_resource_state.pl | 4 +-
tests/pve_ha_rules_config.pl | 5 ++-
tests/pve_ha_status.pl | 3 +-
tests/pve_migration.pl | 4 +-
tests/pve_replication.pl | 3 +-
tests/pve_storage_basic.pl | 3 +-
37 files changed, 116 insertions(+), 66 deletions(-)
Summary over all repositories:
41 files changed, 225 insertions(+), 71 deletions(-)
--
Generated by murpp 0.12.1
next reply other threads:[~2026-09-17 16:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:23 Michael Köppl [this message]
2026-09-17 16:23 ` [PATCH test-tools 1/6] runner: add vmid-range option for test guest VMIDs Michael Köppl
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
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=20260917162324.1926056-1-m.koeppl@proxmox.com \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.