1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/vrtManager
catborise ffb2ce6bfa fix(instances): destroy and volume delete no longer lose disks
Destroy:
- Stops every active state, not only running; a paused VM used to keep
  running as a transient domain after the undefine.
- Undefines with MANAGED_SAVE and SNAPSHOTS_METADATA, before any disk is
  deleted. A managed-save image used to make the undefine fail after the
  disks were already gone; now a failed undefine deletes nothing.
- Keeps disks that another domain references, directly or as a backing
  file anywhere in its chain (running domains' backingStore, and the
  backingStore of the volumes in the active pools for stopped ones), and
  says so; they used to be deleted with the VM.

Volume delete:
- Detaches from the live domain in every active state, including paused.
- Deletes the volume only after neither the live nor the persistent
  definition has the disk (bounded wait for the guest to release it),
  and refuses a volume another VM references. Otherwise the volume is
  kept and the user is told why.

Both hold the compute exclusively for the usage scan and the deletion,
so another VM cannot attach the disk in between; the destroy
confirmation page (GET) takes no lock.

Live tests reproduce each case on a RHEL qemu-kvm host and fail on the
previous code; unit tests cover the destroy ordering and the locks.
2026-10-04 01:08:11 +03:00
..
__init__.py Initial commit 2015-02-27 10:53:51 +02:00
connection.py network interface model selection added for new instance and new interface 2023-08-16 09:13:11 +03:00
create.py network interface model selection added for new instance and new interface 2023-08-16 09:13:11 +03:00
hostdetails.py fix cpu_usage waiting for instance creation. 2023-05-18 14:35:19 +03:00
instance.py fix(instances): destroy and volume delete no longer lose disks 2026-10-04 01:08:11 +03:00
interface.py reorg imports and black format 2022-11-02 16:05:41 +03:00
network.py feat(security): harden storage uploads and vrtManager snapshot XML handling 2026-09-27 13:28:17 +03:00
nwfilters.py format python code with black 2022-11-02 08:54:35 +03:00
rwlock.py fix(vrtManager): modernize rwlock for Python 3.12 compatibility and add tests 2026-09-24 21:49:52 +03:00
storage.py Detect RDB pools too 2025-03-14 10:31:40 +01:00
test_change_network.py fix(instances): change the edited NIC instead of adding a new one 2026-10-04 01:08:11 +03:00
test_network_ip.py test: expand unit test coverage across admin, accounts, vrtManager, logs, appsettings, and datasource 2026-09-25 11:26:53 +03:00
test_rwlock.py ci: replace super-linter with ruff 2026-10-04 01:08:11 +03:00
test_util.py ci: replace super-linter with ruff 2026-10-04 01:08:11 +03:00
test_xml_safety.py ci: replace super-linter with ruff 2026-10-04 01:08:11 +03:00
util.py ci: replace super-linter with ruff 2026-10-04 01:08:11 +03:00
virtsecrets.py Django 3.2.4 LTS upgrade 2021-06-15 13:28:47 +03:00