1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/vrtManager/tests
catborise c970f8e853 fix(storages): keep volumes a VM still needs
libvirt deletes any volume it is asked to. The storage page and the API
deleted a VM's disk, the base image of another volume or the file a
snapshot was taken on without a check, breaking the VM or its
snapshots.

wvmStorage.del_volume now refuses a volume a domain on the compute uses
as a disk or a backing file of one, a file of a domain's snapshots, or
the backing file of another volume. The check is the one destroy
already used, moved to wvmConnect and extended to snapshot files, so
destroy also keeps the files of another VM's snapshots. The storage
page shows the refusal; the API answers 400 with it, as for other
refusals. Deleting a disk from a VM refuses after the detach when the
VM's own snapshots need the volume, and says the volume was kept.

Network disks count by their source name, pool volume disks by their
volume's path. A volume whose metadata cannot be read stops the check
instead of counting as unused; only one removed meanwhile is skipped.
The check and the delete hold the compute lock, so no VM operation
attaches the volume in between; a busy compute is a message on the page
and 409 in the API.
2026-10-13 09:13:02 +03:00
..
__init__.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_change_network.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_clone_nvram.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_connection.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_console_setters.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_device_edits.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_dhcp_leases.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_external_snapshots.py fix(instances): deleting a VM's data takes its snapshot files too 2026-10-13 09:03:05 +03:00
test_host_reads.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_instance_getters.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_interface_addresses.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_iso_media.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_connection.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_live_nvram.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_migration.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_network_ip.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_persistent_edits.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_read_cache.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_remove_nvram.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_resize_disk.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_rwlock.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_usage.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_util.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00
test_volume_in_use.py fix(storages): keep volumes a VM still needs 2026-10-13 09:13:02 +03:00
test_xml_safety.py feat(instances): external snapshots use libvirt's snapshot API 2026-10-12 15:25:44 +03:00
test_xpath_values.py test: each app keeps its tests in a tests package 2026-10-12 15:17:30 +03:00