Skip to content

Jobs, systemd, new console, Bootstrap panel, translations and a review for upstream (fork v2.5.0 to v4.3.0) - #691

Merged
catborise merged 945 commits into
retspen:masterfrom
catborise:upstream-v4.3
Nov 14, 2026
Merged

catborise merged 945 commits into
retspen:masterfrom
catborise:upstream-v4.3

Conversation

@catborise

@catborise catborise commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This brings the work done in the catborise fork since #688 into upstream: 945 commits, released there as v2.5.0 to v4.3.0. Each release has notes with its own upgrade steps: releases. The branch merges cleanly; upstream has no commits that are not in it.

The last series before this PR was a review for upstream. The docs match the code; dead code and unused files are removed. Each test lives in the tests package of the module it tests. The settings, migrations and tests follow Django's practice.

What changed

  • Long operations are jobs (v3.0.0): creating, cloning, migrating, deleting a VM and the snapshot, disk and volume operations run in a job worker (webvirt-worker) with progress, cancel and recovery after a crash or restart. Live clone, external snapshots, a serial console.
  • Deployment (v2.5.0, v3.1.0): Django 5.2 LTS, Python 3.10–3.13. systemd units instead of supervisor, a hardened Docker image, and an installer tested on Debian, Ubuntu, the RHEL family and openSUSE. Daily backups with an optional off-site copy.
  • Security (v2.5.0 onwards): authorization of every view and API call, OTP login fixes, ALLOWED_HOSTS, CSP script-src 'self' with no inline scripts, XML review before editing, gstfsd requests signed with a per-host key, and Django's password validators.
  • Console (v3.6.0): rebuilt noVNC and serial consoles behind nginx, with sandboxed daemons and no public port 6080.
  • The panel (v4.0.0): every page on Bootstrap 5 components. It adds:
    • a one-form VM create;
    • a VM list with state filter and search by address;
    • VM page tabs;
    • host overview pages with capacity;
    • USB and PCI passthrough;
    • DHCP leases;
    • migration without shared storage;
    • moving a disk between pools;
    • PCIe slots;
    • Windows 11 (Secure Boot, TPM).
  • Users and audit: a VM audit log, API tokens, user and group forms, a Logs page with search and Excel export.
  • Translations (v4.2.0): Turkish and Chinese cover the whole panel.
  • Logs (v4.3.0): request IDs, timeouts on outside services, and fixes found in a cross-module review.
  • Tests: about 2100 tests run on SQLite and PostgreSQL in CI. A live suite of about 2200 tests runs against a real KVM host over TCP, SSH, TLS and the local socket.

Upgrading an existing installation

Follow the README section Updating for the installation type. It backs up, rebuilds settings.py from the template and the nginx config, installs the systemd units and runs the migrations. Beyond that:

  • Python 3.10–3.13 and Django 5.2 LTS.
  • Installer and manual installations move from supervisor to systemd once: see the README section Moving from supervisor to systemd. The new job worker (webvirt-worker) must run, or jobs wait.
  • Computes: update gstfsd and its systemd unit, and create its key, as in the README section Adding a Compute Node, step 3. Then enter that key on each compute's edit page.
  • Changed defaults:
    • ALLOWED_HOSTS is no longer *;
    • logout needs a POST;
    • the API takes a session or a token (no HTTP Basic);
    • port 6080 is closed: the console goes through nginx;
    • console links are /console/<compute>/<VM UUID>/.
  • API: creating, migrating and deleting a VM answer 202 with the job and need a new submission_key per request.
  • Docker: the image is ubuntu:26.04 with supervisord in place of phusion/baseimage and runit; the container name and volumes stay, and new volumes for backups and TLS client certificates are created on docker compose up -d. Commands run as the panel's user with docker compose exec -u www-data webvirtcloud ... in place of /sbin/setuser www-data; docker exec webvirtcloud supervisorctl status shows the processes.
  • Default admin: an admin account that still has the password admin (created by every release so far) must change it at its next login.
  • VNC passwords: new VMs and clones get a random VNC password of their own; the console page sends it to users with the console-without-password permission, which new users get by default.
  • Migrations: the appsettings migrations are squashed. The 24 old files stay, so an installation at any of them migrates as before.

Tests

  • Full suite: 2109 tests, OK, on SQLite and on PostgreSQL in CI, Python 3.10–3.13.
  • Live suite against a KVM compute: 2217 tests, OK.
  • Upgrade from upstream, following the README steps: the release of September 2026 installed with its own installer on Debian 12, Ubuntu 24.04 and AlmaLinux 10, on PostgreSQL 16, and current master in Docker. Users, groups, permissions, VM owners, computes, VMs, SSH keys, flavors and logs came through on each.

The worker sends cancels only to jobs its own threads run. After a
worker restart, a migration or live clone that libvirt still ran was
watched by recovery; a cancel then moved the job to cancelling, the page
said so, but nothing told libvirt, and the job ran to its end. Recovery
now sends the cancel once while libvirt still runs the job, and a
migration it aborted ends cancelled rather than failed.
Any error in the manager loop ended the worker at once with os._exit,
without the drain: a PostgreSQL restart or a SQLite write lock held past
its timeout cut every running migration, block copy and backup the
worker drove, and their jobs went to recovery, some ending uncertain. A
database error now skips that tick and drops the broken connection; the
next tick tries again. A lease lost meanwhile still ends the worker when
renew sees it, and other errors still end it as before.
…ended

A request removes its transient claims in a finally. A gunicorn worker
that exits past its timeout ends its other threads' requests too, and an
OOM kill or a container restart ends all of them, so their claims stayed
until they expired 11 minutes later. A VM delete killed this way held
its compute exclusively: every VM action, job and list refresh on that
compute was refused as busy, and nothing in the panel could clear it.

The holder now names the installation by its node id (as the worker
does), which stays the same when the container is recreated, instead of
the hostname. A conflicting claim whose holder is a process of this
installation that no longer runs is removed during admission. A claim
of another installation, or of a PID that is in use again, still waits
for its expiry.
websockify logs "Openening socket failed" and calls sys.exit() when its
port is taken, so novncd ended with status 0. Under systemd the unit
then counts as stopped, not failed: Restart=on-failure does not start it
again, systemctl --failed does not list it, and VNC consoles stay down
until someone starts it by hand. novncd now ends with status 1 there.
The container's health check only fetched the login page, through nginx
and gunicorn. A job worker, novncd or socketiod that kept failing (runit
starts it again each second) left the container healthy while jobs
waited and consoles failed. The check now also asks runit for each
service and fails when one is down or has run for less than five
seconds.
libvirt reads a TLS compute's client certificate from the panel user's
~/.pki/libvirt. In Docker that was /var/www/.pki inside the container,
so `docker compose up -d --build` dropped it and every TLS compute
stopped connecting; no backup held it on either install type, although
"Moving to a new machine" says the backup carries what the computes
accept, and the README never said where the certificates go.

Docker keeps /var/www/.pki in a webvirtcloud-pki volume, owned by
www-data and private like ~/.ssh; the backup copies ~/.pki into pki/;
the moving steps put it back; and "Adding a Compute Node" says where the
files go.
…e compose file

A panel that takes SECRET_KEY from its environment has no data/secret_key,
so its backup has none. The Docker moving steps copied it
unconditionally: the copy failed after the database had already been
replaced, and the chain stopped before node_id, the SSH keys and `up -d`.
The copy is now skipped when the backup has no key, and the section
says to set the same value on the new machine. It also says to stop the
old panel first when both use one PostgreSQL database: the moved worker
id would let both workers take each other's lease and jobs.
… it is complete

The update steps wrote the copy straight to $b/db.sqlite3: the shell
creates the file before the copy runs, so a copy that failed left an
empty or partial db.sqlite3 next to the commit, which looks like a good
backup. Restoring from it put an empty database in place, and the panel
came back with no users, computes or VMs. The copy is now written to
db.sqlite3.part and renamed when it succeeds, in the Docker and the
installer steps.
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.
Each was checked with git grep across every tracked file (templates, JS,
shell, unit files and the extensionless console daemons) and for
dynamic use (URL names, template names, registries):

- vrtManager: host_is_up, is_kvm_supported, get_emulators,
  get_file_extensions, both get_network_forward, get_snapshots,
  get_storages_images, get_os_type, get_host_arch, the get_pretty_* trio
  and, in util, is_kvm_available, randomMAC, get_max_vcpus, compareMAC,
  pretty_mem, pretty_bytes and validate_uuid; with them the port
  constants only host_is_up read. Some were reached only by their tests,
  which go too.
- The flavor edit page: nothing linked to it; flavors are created and
  deleted on the Flavors page and edited through the API.
- computes.validate_name, UserForm.identity_has_errors, the has_perm
  template tag, the ALLOW_EMPTY_PASSWORD setting nothing reads,
  hidePleaseWaitDialog, default_app_config (ignored since Django 4.1)
  and the Python < 3.6 lines of secret_generator.py.
- noVNC's own web client (app/ except the bell sounds, vnc.html,
  vnc_lite.html, defaults.json, mandatory.json): the console imports
  only noVNC's core, and novncd serves no web pages. AUTHORS, LICENSE.txt
  and package.json (the version) stay.
- 24 cached icons no {% bs_icon %} asks for; the icon cache test now
  also fails on an icon nothing uses.
- Ace's ext-textarea.js, which nothing loads.
- instances/fixtures/initial_data.json, for an app ("create") that no
  longer exists; migration 0006 seeds the flavors.
- webvirtcloud/asgi.py: gunicorn runs the WSGI application only.
- instances/templatetags/tags_active.py: a copy of common_tags'
  class_active that no template loads.
- .github/linters/.hadolint.yaml, from super-linter, which no workflow
  runs anymore.
…itten

restart_nginx only logged "systemctl enable/restart nginx.service": both
calls had been commented out since the installer was added (2020). On
RHEL and openSUSE nginx is not enabled after its install, so the panel
was not served until someone started it; on Debian and Ubuntu nginx
kept the default site until a reload. The installer now checks the
config, enables nginx and restarts it, and stops if that fails.
The root password hash for a shut-off VM used crypt_r where installed
(Python 3.13) and fell back to the stdlib crypt, which Python 3.11 and
3.12 deprecate: `python -W error::DeprecationWarning manage.py check`
failed there. crypt-r (the same module, it requires Python 3.11) is now
installed from 3.11, and the module is chosen by the Python version;
3.10's crypt is not deprecated.
No RemoteUserBackend is configured, so the middleware never logged
anyone in: it only ran on every request and read as if the panel trusted
a REMOTE_USER header.
AUTH_PASSWORD_VALIDATORS was unset, so the user forms and the password
change accepted any password, a one-letter one included. The template
now sets Django's four standard validators: at least 8 characters, not
a common password, not only digits, not like the user's name or e-mail.
The tests that set weak passwords use ones the validators accept.
LOCALE_PATHS was the relative "locale/": a manage.py or cron run outside
the checkout found no catalogs and fell back to English. It is now under
BASE_DIR. Reading data/secret_key also catches only OSError instead of
any exception.
The operations app set PRAGMA journal_mode=WAL from a connection_created
receiver because Django's SQLite OPTIONS had no init command; Django 5.1
added init_command, so the template sets it there and the receiver goes.
The mode is stored in the database file, so existing databases keep it.
instances/forms.py and instances/models.py imported values from the
webvirtcloud.settings module itself, which bypasses DJANGO_SETTINGS_MODULE
(settings-dev, test overrides) and runs the module a second time. They
now read django.conf.settings. webvirtcloud/urls.py also loses its
fallback that set REST_FRAMEWORK's schema class at import for settings.py
copies without it: the template sets it, and an older settings.py is
rebuilt from the template when updating.
TEMPLATE_DEBUG has been unused since Django 1.10 and debug toolbar no
longer reads INTERCEPT_REDIRECTS; DebugToolbarMiddleware goes first, as
its documentation asks, instead of after django-axes.
…t has it

It created the group with objects.create and had no reverse: it failed
when the group existed and could not be unapplied. It now uses
get_or_create, and its reverse does nothing.
Django documents unique_together as likely to be deprecated in favour of
Meta.constraints; the rule is the same (one row per user and VM).
instances:states?compute=x raised ValueError in the lookup, a 500.
…dels

Networks, Interfaces, Storages, Storage, Volume, MigrateInstance and
CreateInstance were unmanaged models with no table, there only so that
ModelSerializers and the new VM ModelForm could take their fields. They
made content types and migrations, and their DO_NOTHING foreign keys
added reverse accessors that meant nothing (Compute.host,
Compute.target_host, Instance.source_host).

The serializers are plain Serializers and NewVMForm a Form, field for
field as the models gave them (types, lengths, required, defaults, the
minimum of 1 for vCPUs, memory and disk size; the form's labels are
still derived from the field names). Compared field by field before and
after, the API schema changes only where the models were wrong:
- no int64 bounds on the listing fields;
- the interface fields lose the titles that named the wrong column
  (type was "Status", state "Device", mac "Forward");
- a pool's volumes is a list of objects (it was described as an
  integer) and a volume's allocation an integer (it was untyped).
One migration per app deletes the models; none touches a table.
0001_initial to 0024_log_retention_setting are mostly RunPython steps
that added, renamed, re-chose and described setting rows since 2020. A
squashed migration now creates the table in its final shape and inserts
the 38 rows those steps leave; it replaces all 24, so a new database
runs it alone. The 24 stay beside it, as Django's squashing expects
until every installation has applied them: a database that applied
them all records the squashed one without running anything, and one
that stopped between them (an older release, or an upstream
installation) applies the rest of them first.

Checked:
- on a new database its rows equal the old chain's (name, key, value,
  choices, description of every row);
- on a copy of a running panel's database (all 24 applied) migrate
  plans nothing for appsettings;
- a database migrated by the old code to 0023 applies 0024 and then
  records the squashed migration, with the same 38 rows;
- makemigrations finds no change.

It inserts its rows on the database being migrated, as the replaced steps
do. The tests of the replaced steps stay, since an installation that stopped
between them still runs them; the two that checked a few rows' columns
became one that checks every row's columns and description, and a value is
one of its choices.
…local libvirt by default

- create_admin had a branch for `"test" in sys.argv` that gave the admin
  the password "admin"; 17 places signed in with it, and failed silently
  with ADMIN_PASSWORD set in the environment. The tests now make their
  own superuser and force_login it, and the shipped code has no test
  branch: the test runner gives migrate a password (also when
  ADMIN_PASSWORD is set but empty), so no data/admin_password is written
  into the checkout.
- AccountsTestCase builds its rows in setUpTestData instead of
  setUpClass and deleting them by hand.
- accounts tests set OTP_ENABLED with override_settings instead of
  assigning settings (one assignment was never undone, so later tests in
  the process ran with OTP on), and undo their app_settings change. The
  OTP login class reloads the URLs again only after the setting is off.
- computes/tests/test_views.py reached the machine's own libvirt
  (localhost over the socket) when TEST_LIBVIRT_HOST was unset; its live
  tests now run only with TEST_LIBVIRT_HOST, like the other live tests,
  as the README says.
Ten classes ran on TestCase or TransactionTestCase although they read
files, templates or scripts only. SimpleTestCase skips the transaction
and refuses a database query, so a test that starts to use the database
says so. LoggingConfigTestCase also removes the temporary directory it
makes.
- 25 vrtManager test modules configured settings themselves when Django
  had none (MAC_OUI, and in test_network_ip a fake django module): under
  manage.py test settings are always configured, so it never ran.
- webvirtcloud/tests/test_common_tags.py tested no tag: it fetched an
  unknown URL, as test_error_pages and test_logging already do.
- .gitignore covers the parallel runs' test_db_N.sqlite3 files too.
Five tests only acquired and released the lock and asserted nothing.
They now check, from another thread, that a reader lets readers in and
keeps writers out, that a writer keeps everyone out, and that a nested
or upgraded lock is held until its last release.
conf/test_install_lib.sh tested conf/install-lib.sh, but no CI step or
test ran it. It moves to webvirtcloud/tests/sh/install_lib.test.sh, takes
the library's path as its argument, and test_install_lib runs it in bash,
as the JS tests run in node.
test_ownership, test_ownership_race and test_reconciliation each defined
the same fake domain (a name and a UUID); it is computes/tests/fakes.py.
…in words

On a running Windows VM with its guest agent connected, the Access tab's
root password and SSH key were sent to the agent, which has no root
account, takes no crypt(3) hash and has no SSH key command: the owner got
the agent's raw error. The guest's OS is now asked first, and a Windows
guest is refused with a message.
…at hangs

libvirt shuts a VM down through its guest agent when one is connected,
and waits 60 s for an agent that hangs before it presses the ACPI power
button. The Power Off request hung for that minute, holding the VM's
lock. A running VM's connected agent is now pinged first; one that does
not answer in 10 s is passed over and the power button is pressed.
…eanwhile

A live clone freezes the guest's file systems through its agent. When
the worker stopped before the thaw and the VM was paused before the job
was recovered, recovery skipped the thaw without a word: resumed, the
guest stayed frozen. libvirt thaws no paused guest, so the job's warning
now says to resume the VM, then thaw it with virsh domfsthaw.
… pool's

The new pool dialog took /, /etc, /var/lib/dpkg or /home as a directory
pool's path, or as a share's mount point, and a path inside or around
another pool's. A pool on /etc offers the host's own files as volumes,
which one Delete removes; a share mounted there hides them; and a file
under two pools is listed, and deleted, through both. These paths are
now refused: the system directories (/var only within /var/lib/libvirt,
outside libvirt's own state), /home, /mnt, /media, /opt and /srv
themselves (a directory in them is fine), and a path is compared once
"..", doubled and trailing slashes are resolved. A symbolic link on the
host is not resolved.
Deleting a pool was refused only while a VM's definition named the pool
for a disk; a disk given by its file path was taken not to need it. That
holds for a directory pool, but a share's or a file system's pool mounts
the path and an LVM pool activates it: with the pool deleted, the path is
gone at the next boot and the VM no longer starts (seen live with an NFS
pool). Such a disk now refuses the delete too: a path under the pool's
mount point, or an LVM volume by its /dev/<group> or /dev/mapper name.
iSCSI and disk pools share their device directories with other pools and
are left as they were.

A pool libvirt reports as inaccessible (state 4: running, its storage out
of reach) made the pool page fail with an IndexError; it now shows an
Inaccessible badge.
…s not deleted

A pool on shared storage (an NFS share, or a directory mounted from one)
holds the same file at the same path on every host that mounts it. A
VM's delete checks the panel's other computes before it deletes its disk
files, but the pool page, its API and a VM's disk delete checked only
their own host: a disk of a VM on another compute could be deleted. They
now ask the other computes too, and refuse while one uses the file or
cannot be reached. The other computes are asked before this host's lock
is taken, and before a VM's disk is detached.
…t is defined

libvirt drops the attributes and elements of a filter it does not know,
without an error. A rule accepting <tcp dstport='443'/> (dstportstart is
the attribute) became a rule accepting all TCP; a rule dropping
<tpc dstportstart='22'/> became one dropping all incoming traffic; a
priority of 5000 became 500 (all seen live). Creating, cloning and
editing a filter and adding or removing its rules and references now
define it with VIR_NWFILTER_DEFINE_VALIDATE, and libvirt's refusal names
what it did not accept.
A rule or reference change reads a filter and defines it again whole:
two admins changing one filter at once each defined their copy, and the
second removed the first's rule. Changes to a host's filters (create,
clone, delete, rules, references, XML) now run one at a time; one that
finds another running is told to try again.

A VM's NIC form sends back its source, model, filter and MAC whole: a
form opened before another admin changed the NIC's filter put the old
filter back. The form now sends a fingerprint of the NIC as it showed
it, and a NIC changed meanwhile is refused.
…ames differ

A migration checked only that the destination had network filters of
the names the VM's NICs use. A VM runs with its host's filter of a name,
whatever its rules: a destination whose filter of that name was empty,
or lacked a filter it references, left the VM unfiltered there. The
filters the VM names and those they reference are now compared rule by
rule (each host's UUID aside), and one missing or different on the
destination refuses the migration.

A filter created or edited with a reference to a filter the host does
not have, which libvirt accepts, is refused too: a VM using it would not
start.
A NIC filter such as clean-traffic can name the VM's own MAC and IP as
parameters. A clone kept the source's, so the filter dropped the clone's
traffic from its new MAC. A clone's MAC parameter is now its own MAC,
and its IP parameter is left out for the filter to learn the clone's
address, as clean-traffic does by default; with learning turned off
(CTRL_IP_LEARNING none) the filter needs it, and it stays, as an IPV6
parameter does (libvirt learns no IPv6 address).

A filter page showed the actions drop, reject, return and continue in
English in every language; they are translated now.
Settings refuse disk I/O native with a cache other than none or
directsync, which libvirt refuses. A new VM took the I/O from Settings
and its cache from the create form, unchecked: native I/O with a
writeback cache was queued, the disks were made, and libvirt then
refused the VM. The create job now refuses such a pair when it is asked
for, and again when it runs, before it makes a disk: Settings may have
changed meanwhile.

Two administrators saving the I/O and the cache at once each checked
the pair as their page read it, and both saves made one libvirt refuses.
The pair is now checked again as saved, with its rows locked, when a
change of it is saved; the log row keeps the reason in English.
The four console settings (scale, view-only, resize session, clip
viewport) said "The console starts ...", but they set how a VNC console
starts; a serial console has none of them, and typed into a view-only
one. The NIC model setting said "default" was libvirt's choice, while
a new VM with "default" gets a VirtIO card. Their descriptions now say
so (migration 0025).
…s page

The Settings page refuses a whole-number setting outside its range, but
a value an older version saved stays: LOGS_PER_PAGE "abc" made the Logs
page fail with a 500 (seen live). Migration 0026 puts every
whole-number setting outside its range, or not a number, back to its
default.

With VM DRBD Status on, the VM list showed each VM's state as its VM
page last read it, and "None" for a VM never opened. The list now reads
each SSH host's drbdadm status once, all hosts at once, and updates its
VMs from it: a host that does not answer delays the list by one
timeout, not one per host.
NEW_USER_DEFAULT_INSTANCES gives each new user the VMs it names. With
"Multiple Owner for VM" off, an owned VM named there was given the new
user as a second owner anyway, with its power and console. Creating the
user is now refused, as adding a second owner on the VM's Users tab is;
the check runs again with the inserts, under the ownership lock.
…le rights

With "Multiple Owner for VM" turned off after a VM was given two owners,
changing either owner's rights (Delete the VM, say) was refused: the
form's one-owner check counted the other owner. The check now applies to
a new owner only, as its message says.

The user and group forms showed the permissions by the English names the
database keeps (Can clone instances, ...), in every language; they are
named in the user's language now.
…t undo it

The user and group edit forms send back every field they show. A form
opened before another administrator blocked the user, took away a group
or a permission, or changed a group's members, put those back when it
was saved for another change. The forms now send a fingerprint of what
they showed, and a user or group changed meanwhile is shown again as it
is now, with nothing saved. The user's password and last login are no
change of the form.
… per address

An administrator cannot block, delete or demote their own account, but
with two superusers each could block the other at the same moment, and
none was left. Changes of the panel's users (create, edit, block,
unblock, delete, group edits, and a user's own profile) now run one at
a time, under a claim every worker sees, and a block, delete or edit
that would leave no active superuser is refused.

Under that claim each change reads the user or group as saved now: the
edit forms' fingerprint is compared there, a block writes only the
account's Active flag, and a profile saved while an administrator
blocks the account keeps the block.

A user's e-mail address is one user's, case aside, so that "Lost OTP?"
can mail it; two users created or edited at once each passed that check.
The form checks the address again under the same claim, with the save.
The VM list and its poll read each host in turn. A host that is up but
stuck (a daemon or an NFS mount that does not answer) kept the call
waiting: the list did not open in 200 s (seen live with compute1's
virtqemud stopped), and the per-host limit freed it only when gunicorn
ended the request after 600 s. The list and the poll now ask all hosts
at once, each in a thread counted on its host like a request, and wait
10 s at most: a host that has not answered is shown as not answering,
and the VMs of the others are listed. Live: the list opens in 10 s,
then in 5 s while the host stays stuck.
… any case

The VM list reloads when its poll finds a VM added or gone. The search
was kept through the reload, but the chosen state pill (Off, say) went
back to All: on a busy host the filter kept undoing itself. The state is
now remembered with the search, for the tab.

The search compared lower-cased text, which differs in Turkish:
"istanbul" did not find "İSTANBUL". Both sides are now compared without
case and accents (and dotless ı as i).
/api/v1/instances/ listed the panel's VM records without asking the
hosts: a VM undefined or renamed with virsh stayed there as it was, and
one defined outside never appeared, until someone opened a web VM list
(the per-host API list already read its host). It now reads the hosts
it lists first, as the VM list does: all at once, one that does not
answer left as last read. Seen live: a VM defined with virsh appears,
and is gone once undefined.
…e VM report

The IP search and the VM report parse each address a guest agent
reports. An agent answer that was no address ("invalid-address") raised
a ValueError that only libvirt errors were caught around: the search or
the report ended in a 500 and lost every other guest's addresses. Such
an answer is now skipped, and the guest's other addresses still count.

The VM report was in English in every language but for the VM states:
its headings, sheet names, coverage notes and yes/no now follow the
reader's language.
…age from the others

The Computes page read its hosts on a pool of eight threads shared by
the process: eight hosts that hang held all of them for as long as they
hung, and every other host was then shown not connected. Each host is
now read on a thread of its own (a daemon thread, which does not keep
the process from exiting), one at a time per host as before. The UUID
of a host added before host UUIDs were kept is read on that thread too,
within the page's wait, instead of after it.

A host's charts asked for each reading without a time limit: a reading
the host kept waiting left the charts saying "Updated" and stopped the
polling. A reading now ends after 30 s; the charts then say since when
they are not updated, and the next reading goes out.
…mory in GiB

The CPU in use was the share of time not idle, with I/O wait counted as
busy: a host that only waited for its disks showed 100% CPU in use. Time
waiting for I/O is idle now: no CPU runs then.

The memory chart divided by 1024³ and labelled the values GB; it says
GiB now.
A host's capacity sums its VMs' vCPUs and memory; a VM busy with a job
is read from its XML. A VM whose XML could not be read for any reason
was skipped as if gone, so a refused read or a dropped connection made
the host look as if it had given less than it had, even nothing. Only a
VM gone meanwhile is skipped now; another error leaves the capacity
unknown, which the pages show as not read.
The CPU, memory, disk and network charts of a host and of a VM put their
readings at equal steps: a reading that took 20 s looked like one 5 s
after the one before. The x axis now counts seconds, a reading standing
at the time it came; each tick is at a reading and named with the
panel's time of it, as before. Checked with Chart.js in a browser: a
20 s step is four times as wide as a 5 s one.
The console settings accepted any password of at most 8 bytes, so "éééé"
was saved, but noVNC derives its key from the characters while QEMU
compares the UTF-8 bytes: the browser console could not log in. A new
password now takes up to 8 printable ASCII characters, which also keeps
control characters out of the definition.

The .vv file wrote the password and the VM name as they are; virt-viewer
reads it as a GLib key file, so a backslash or a leading space changed
the password. Both are escaped as a key file expects.

A new or removed password also drops a passwdValidTo set elsewhere: an
expired one left the new password unusable.
The console type list offers VNC and Serial only, so the page of a SPICE
VM showed VNC and any save, of the keymap alone, switched the console:
libvirt refused the definition when the VM had a SPICE channel, and
without one the VM silently got a new VNC console. A console type the
panel does not create is now offered as it is, and kept on save.

A switch from SPICE that is chosen removes the SPICE channels, USB
redirection and smartcards libvirt refuses without SPICE graphics and
mutes SPICE audio. A new VNC console keeps the keymap and a password VNC
can take; a longer one is replaced by a generated password.

The console settings were read from the first graphics device that had
each attribute: with VNC and SPICE devices the page showed VNC's port
with SPICE's password. All are read from the first device, the one the
settings change.
…does not undo it

The console form compared what was posted with the settings saved at the
time of the save, so every field of a page opened earlier counted as a
change: an administrator who moved a console to localhost had it opened
to all interfaces again when another one, on an older page, only
generated a new password. The form now sends back a fingerprint of the
type, listen address and keymap it showed, and a save made after these
changed is refused with a message to check them and save again.

A refused save names the reasons without the field names.
…reported as done

A switch to the serial console removed the graphics device but kept a
serial console of another type, a TCP one say, which the browser does
not open; the audit log said the console type was set. The switch is now
refused, with nothing changed, unless the serial console is a pty one.

A listen address change of a console that listens on a network, a socket
or nowhere did nothing without a word. It is refused with the reason.

The .vv file pointed virt-viewer at "::" for a console on all IPv6
addresses; such a console is reached through the host, as one on
0.0.0.0.
@catborise
catborise merged commit 3b8da2b into retspen:master Nov 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant