all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH test-tools,e2e-tests 0/6] randomly select VMIDs for test
@ 2026-09-17 16:23 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
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Michael Köppl @ 2026-09-17 16:23 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-17 16:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-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

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal