1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
Commit graph

1669 commits

Author SHA1 Message Date
catborise
837c5468ec build: systemd runs the panel on hosts instead of supervisor
The installer and the manual installation install four systemd units
(webvirt-cloud, webvirt-novncd, webvirt-socketiod, webvirt-worker) that
run as the web server's user with absolute paths and read
/etc/default/webvirtcloud. gunicorn, socketiod and the worker stop with
KillMode=mixed, so they wind down their own children. supervisor, its
installer code and the contributed systemd files go; the README gets
the update, rollback and a one-time move from supervisor, and the
installer refuses to run over a supervisor install. Docker keeps runit;
novncd's runit script is the one-line form of the others.
2026-10-17 23:18:26 +03:00
catborise
fbef55fe2d docs: updates set aside migrations an older installer generated
Installers before September 2025 ran makemigrations, which left
untracked migration files: one has the name of a tracked accounts
migration (git refuses to check out over it, and once applied it makes
migrate skip the tracked one), the others compete with tracked
migrations. The update now moves them into the backup, marks that
accounts migration unapplied when it was generated locally, and the
rollback puts them back.
2026-10-17 22:35:29 +03:00
catborise
8a0737ddf0 fix: no gunicorn control socket for the panel
gunicorn 26 opens a control socket in the service user's home, which
www-data cannot create, and logs an error at every start. The panel
does not use it.
2026-10-17 21:28:15 +03:00
catborise
70a7155290 refactor(console): socketiod on gunicorn threads instead of eventlet
eventlet is in maintenance mode. socketiod now runs python-socketio in
threading mode under gunicorn (one gthread worker, which holds the
sessions), with simple-websocket, already a python-engineio dependency.
gunicorn waits 1 s on stop: an open console never finishes, and its
worker ends when the pty closes. The forward loop waits in select
instead of polling, and a stopped worker is reaped by a blocking
waitpid. eventlet leaves the requirements.
2026-10-17 20:36:58 +03:00
catborise
0f9bbd3e86 feat(instances): choose VNC or the serial console on the VM page
Settings > Console gets a Console type field. Serial removes the VM's
graphics device (adding a pty console when there is none); VNC adds the
graphics device new VMs get, on localhost, and then applies the form's
VNC fields, so an administrator can open it to all interfaces for a TCP
compute. Serial is offered only while SERIAL_CONSOLE_ENABLED is on.
2026-10-17 19:48:58 +03:00
catborise
d37aa42392 feat(console): a working serial console
The xterm console never connected: socketiod expected a different token
format, its worker had no compute credentials, one global console was
shared by every client and its output broadcast to all of them, and the
Docker image did not run socketiod at all.

- console/tokens.py: one authorize() for noVNC and socketiod; the signed
  token is the only credential, checked at connect time.
- socketiod: one pty worker per client (consolecallback with the
  instance id), one session per VM, a session cap, input and resize
  checked; the parent never opens libvirt. The engine.io same-origin
  check is on.
- consolecallback: opens the console with the compute's credentials and
  exits with a message when it cannot.
- Docker runs socketiod as a runit service; nginx proxies /socket.io/
  with Host and the scheme for the origin check. Supervisor and systemd
  start it as well; WEBVIRTCLOUD_SERIAL_CONSOLE=1 enables it.
- Tests: token and session unit tests, socketiod as a process, and a
  live test that reads SeaBIOS from a wvc-test VM on the TCP and SSH
  hosts.
2026-10-17 19:43:09 +03:00
catborise
9b0c6e2d8e build: xterm 6.0.0 for the serial console
@xterm/xterm 6.0.0 and @xterm/addon-fit 0.11.0 replace xterm 3.6.0; the page reads typed and pasted input with onData, and no longer writes every key and all terminal output to the browser console. The unused fullscreen addon goes.
2026-10-17 16:09:50 +03:00
catborise
f5ec757d1a build: Chart.js 4.5.1 2026-10-17 13:19:43 +03:00
catborise
53d900fd57 build: jQuery 4.0.0 2026-10-17 12:40:56 +03:00
catborise
31d979bd29 test: a fast password hash for the test suite
Tests create and log in users for most test cases; Django's default PBKDF2 hash made that half of the suite's time (260 s -> 124 s locally with MD5). The fast hasher is set only when the command is manage.py test.
2026-10-17 12:13:30 +03:00
catborise
61ec138cfa fix(instances): the create wizard's pickers keep their height
Tom Select showed each chosen image and network as a chip inside its picker, which grew with every one and pushed the form down; the wizard lists them below the pickers already, so the chips are hidden.
2026-10-16 23:41:08 +03:00
catborise
057aabca1f build: Tom Select replaces bootstrap-multiselect
The create wizard's image and network pickers use Tom Select 2.6.2 (its
Bootstrap 5 theme and checkbox list), which does not need jQuery;
bootstrap-multiselect calls $.isArray, which jQuery 4 removed. The
selected images and networks still fill the wizard's own lists.
2026-10-16 23:25:15 +03:00
catborise
cfa9c71b55 build: Ace editor 1.45.0 2026-10-16 22:42:35 +03:00
catborise
abacf91941 build: socket.io client 4.8.4 2026-10-16 22:42:30 +03:00
catborise
311f22254c build: js-cookie 3.0.8 2026-10-16 22:42:25 +03:00
catborise
74f15a9c71 test(operations): another user's job cannot be cancelled 2026-10-16 21:58:54 +03:00
catborise
d3e4ef9132 feat(instances): a shut-off UEFI VM can be migrated
The move copies the VM's NVRAM file to the destination with libvirt
streams (unless both hosts share the NVRAM directory) and removes the
copy if the move fails; the source's file goes with the existing
cleanup. The undefine keeps the file, as libvirt refuses to undefine a
VM with NVRAM otherwise. A VM with TPM state is still refused.
2026-10-16 21:05:23 +03:00
catborise
6e53b07475 build: Docker base image phusion/baseimage noble-1.0.3
A security rebuild of the same Ubuntu 24.04 image.
2026-10-16 17:14:56 +03:00
catborise
c93bcc5d04 docs: a running VM can be cloned 2026-10-16 16:52:38 +03:00
catborise
46a611941e feat(instances): a running VM can be cloned
libvirt's backup copies the disks of a running or paused VM from one
instant into new volumes while it keeps running; the clone is defined
shut off as before. The VM is held for the copy, the copy can be
cancelled, and recovery reads the job's records and libvirt.
2026-10-16 16:52:38 +03:00
catborise
39ad472a7c refactor(instances): live clone primitives and a shared clone definition
The clone's definition is one method for both paths; wvmInstance can check,
start, follow, read and abort a push backup of a VM's disks into new
volumes, and freeze/thaw the guest.
2026-10-16 16:52:38 +03:00
catborise
27dfc1407f feat(appsettings): Bootswatch Brite theme
Brite ships with Bootswatch 5.3.8 but was left out when the other themes
were updated. Its sources are copied unchanged from the package, and its
wrapper sets the same breadcrumb, link and navbar spacing as the other
themes. The wrapper also makes the navbar text black: navbar.html uses
navbar-dark on bg-primary, and white on Brite's lime is unreadable.

Brite loads no web font. The Settings page lists it because the theme
list is the wvc-themes directory, and the theme test compiles it with
the rest.
2026-10-16 13:58:20 +03:00
catborise
4629e0557f feat(storages): the upload dialog closes once an upload starts
The job panel follows an ISO upload, so the dialog closes when the first
chunk is accepted and its progress bar goes; the dialog opens again with
the error if the upload stops. The browser still sends the file, so the
page asks before it is left while an upload runs. The storage page no
longer includes the please-wait dialog, which nothing on it opened.
2026-10-16 12:16:35 +03:00
catborise
06f03d65fc docs: an ISO upload is a job 2026-10-16 11:53:59 +03:00
catborise
56b4b03500 feat(storages): an ISO upload is a job
The upload session lives in a job instead of flocks and .meta/.done
files; the job panel shows and cancels it; an upload idle for an hour is
ended and its partial file deleted; the page no longer reloads after an
upload.
2026-10-16 11:53:59 +03:00
catborise
f2138e54d8 feat(operations): jobs a request runs
Request jobs (an upload's chunks) run in gunicorn: their kind is admitted
running with the request as its worker, never claimed or recovered by the
worker, cancelled in the request, and asked by every housekeeping pass to
end its jobs that went idle. The panel can follow a job the page just
started. A job a request runs does not wait for the worker, so it does not
raise the worker-unavailable warning on the Jobs page or in the panel.
2026-10-16 11:53:59 +03:00
catborise
41e1fcd4b9 docs: migration runs as a job 2026-10-16 07:57:02 +03:00
catborise
c2d3285e0f feat(instances): a running migration can be cancelled; its time limit goes 2026-10-16 07:57:02 +03:00
catborise
31cbe60aa4 feat(instances): migration runs as a job 2026-10-16 07:57:02 +03:00
catborise
149c14f1bb docs: snapshot create and revert run as jobs
Live tests that expected the snapshot or clone result at once now call the
backend or run the queued job.
2026-10-15 14:21:32 +03:00
catborise
8d2e88f4bb feat(instances): snapshot revert runs as a job 2026-10-15 14:21:32 +03:00
catborise
6f81043438 feat(instances): snapshot create runs as a job 2026-10-15 14:21:32 +03:00
catborise
1fb709ea05 fix(operations): jobs see the Settings page values
Only the request middleware loaded the Settings page values, so in the
worker process app_settings stayed empty: a VM create job failed reading
the default volume format, and the snapshot free-space check fell back to
its defaults. The worker now loads them before each job.
2026-10-15 14:21:32 +03:00
catborise
aabce6b037 fix(operations): the Jobs pages refresh while a job is active
The list and the detail page were rendered once, so a job that finished
kept showing running until the page was reloaded by hand. While a shown
job is queued, running or cancelling, the page now reloads every five
seconds (not while hidden or while a form field has focus).
2026-10-15 09:28:43 +03:00
catborise
9d3d218fbb docs: clone and create run as jobs 2026-10-15 09:28:43 +03:00
catborise
6f0c730071 feat(instances): VM create runs as a job, also in the API 2026-10-15 09:28:43 +03:00
catborise
fbf82da5a9 feat(instances): VM clone runs as a job 2026-10-15 09:28:43 +03:00
catborise
49232c6e1d feat(storages): volume clone runs as a job 2026-10-15 09:28:43 +03:00
catborise
bb91c13926 test(operations): workers and admissions across processes 2026-10-14 23:27:57 +03:00
catborise
b59f30138a build: run the job worker in every install type 2026-10-14 23:27:57 +03:00
catborise
0fb0eb2bac feat(operations): jobs page 2026-10-14 23:27:57 +03:00
catborise
9c7943a0c8 feat(operations): job panel on the VM page 2026-10-14 23:27:57 +03:00
catborise
9c125aedd2 feat(operations): jobs API 2026-10-14 23:27:57 +03:00
catborise
079e2ca5ca feat(instances): external snapshot delete runs as a job 2026-10-14 23:27:57 +03:00
catborise
c26419c757 feat(operations): recover interrupted jobs from libvirt evidence 2026-10-14 23:27:57 +03:00
catborise
a35284bbc9 feat(operations): the job worker 2026-10-14 23:27:57 +03:00
catborise
34582d23f3 feat(operations): worker concurrency and job retention settings 2026-10-14 23:27:57 +03:00
catborise
18146c30a1 feat(operations): submit, cancel, finish and resolve jobs 2026-10-14 23:27:57 +03:00
catborise
e5be5d4f71 feat(operations): kind contract, job context and worker lease 2026-10-14 23:27:57 +03:00
catborise
68812ddbdf refactor(computes): the lock helpers take claims instead of file locks 2026-10-14 23:27:57 +03:00