1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
webvirtcloud/instances
catborise 02412b7ea5 feat(jobs): deleting a VM is a job that recovery finishes
The delete ran in the request: undefine, then the VM's record, then its
disk files. A request that died in between (a gunicorn worker past its
timeout, OOM, a restart), or a database write that failed after the
undefine, left a record that later showed as removed outside the panel,
and the disk files the user asked to delete were never deleted.

Deleting a VM is now an instance.delete job. It holds the compute
exclusively, as the request did, so no other VM attaches a file it is
about to delete. The job chooses the files before it stops the VM (a host
that cannot be checked still stops nothing) and records them first. It
then stops and undefines the VM, removes its record, and deletes the
files, each with its own Logs row. Recovery decides from libvirt: a VM
still on its host means the delete failed; a VM gone means libvirt did
it, so recovery removes the record and deletes the recorded files that
are still there.

The page queues the job and returns to the VM page, where the job panel
follows it and opens the VM list when it ends; disks that were kept are
the result's warning. The API's delete answers 202 with the job and
needs a submission_key. backing_path moves to wvmConnect, as recovery
has no domain to ask.
2026-11-06 09:49:31 +03:00
..
api feat(jobs): deleting a VM is a job that recovery finishes 2026-11-06 09:49:31 +03:00
fixtures Instances overhaul 2020-07-13 15:33:09 +06:00
migrations fix(admin): Removed VMs shows the host a VM left and confirms a delete 2026-10-26 11:48:40 +03:00
templates feat(jobs): deleting a VM is a job that recovery finishes 2026-11-06 09:49:31 +03:00
templatetags feat(instances): the VM list on Bootstrap's pills, badges and menus, its actions by the user's rights 2026-10-28 13:55:46 +03:00
tests feat(jobs): deleting a VM is a job that recovery finishes 2026-11-06 09:49:31 +03:00
__init__.py Fixe migrations for new deployments 2020-05-28 18:19:25 +06:00
addresses.py feat(webvirtcloud): a request waiting on a host holds one thread, not a worker 2026-11-02 21:19:01 +03:00
apps.py format python code with black 2022-11-02 08:54:35 +03:00
forms.py feat(instances): a VM's console settings in two cards, with a password action 2026-10-30 14:55:57 +03:00
jobs.py feat(jobs): deleting a VM is a job that recovery finishes 2026-11-06 09:49:31 +03:00
models.py feat(instances): the Resize tab shows how much a VM has within its maximum 2026-11-03 23:07:59 +03:00
report.py perf: the Logs and VM report downloads are written row by row 2026-11-05 18:58:13 +03:00
states.py feat(instances): the Power tab shows the VM's state and where each action takes it 2026-11-03 19:22:52 +03:00
urls.py perf(instances): the VM page lists ISO images without reading every pool 2026-11-02 13:58:51 +03:00
utils.py fix(instances): recording a migration holds the ownership lock 2026-11-05 18:58:13 +03:00
views.py feat(jobs): deleting a VM is a job that recovery finishes 2026-11-06 09:49:31 +03:00