1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/computes
catborise 51dedb7b8f fix(instances): disk edits keep their XML; changes lock per VM
Disk edits:
- edit_disk built a new <disk> from the form and replaced the old one,
  losing what the form does not show (e.g. encryption and virtio
  driver options); a bus change detached and re-attached the disk.
  The disk of the persistent definition is now edited in place and the
  domain defined once; a bus change picks a free device name and drops
  the old address and virtio-only options. Pending persistent changes of
  a running VM are kept.
- Clone omits empty disk devices, refuses a disk without a supported
  source and destination, and checks the name before allocating storage.

Locks:
- Every VM change held its compute's exclusive lock, so one slow
  operation blocked all VMs on that compute. A VM change now holds its
  own VM lock plus a shared compute lock; reconciliation, migration and
  cloning hold the compute exclusively (two clones of different VMs
  must not pass the name check together).
- Quota-checked changes of one user (CPU, memory and disk resize,
  clone) run one at a time under a per-user lock, also across computes,
  so concurrent requests cannot all pass the check against the old
  allocation. It is the outermost lock; superusers, who have no quota,
  skip it.
- A busy lock answers 409 to the API and a message in the web UI. API
  power and destroy actions return the view's error instead of success.
2026-10-04 01:08:11 +03:00
..
api fix(api): typed URLs and accurate response schemas 2026-10-04 01:08:11 +03:00
migrations Added missing migrations 2020-06-15 12:38:44 +06:00
templates fix icon missing bug 2023-12-13 13:57:38 +08:00
__init__.py Initial commit 2015-02-27 10:53:51 +02:00
apps.py fix: track migrations; installs apply them instead of generating them 2026-10-04 01:08:11 +03:00
forms.py format python code with black 2022-11-02 08:54:35 +03:00
models.py fix cpu_usage waiting for instance creation. 2023-05-18 14:35:19 +03:00
test_api_security.py fix(instances): disk edits keep their XML; changes lock per VM 2026-10-04 01:08:11 +03:00
test_operation_locks.py fix(instances): disk edits keep their XML; changes lock per VM 2026-10-04 01:08:11 +03:00
test_reconciliation.py fix(reconciliation): implement UUID-based domain reconciliation and connection safety 2026-09-27 13:13:43 +03:00
tests.py fix(instances): disk edits keep their XML; changes lock per VM 2026-10-04 01:08:11 +03:00
urls.py fix: add an authorization matrix test and close the endpoints it finds 2026-10-02 20:33:12 +03:00
utils.py fix(instances): disk edits keep their XML; changes lock per VM 2026-10-04 01:08:11 +03:00
validators.py format python code with black 2022-11-02 08:54:35 +03:00
views.py fix: serve compute JSON endpoints as application/json, build chipset list safely 2026-10-02 22:34:05 +03:00