1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00
Commit graph

2449 commits

Author SHA1 Message Date
catborise
e79817e7db fix(ui): a block or a job's cancel asks first; every delete and save says it is done
- Block in the Users list asks first: the user is signed out and their
  API tokens are deleted, which unblocking does not bring back. Block
  and Unblock then say what they did.
- Cancel on a job's page and in the job panel asks first, naming the
  job; the button says Cancel the job, apart from the dialog's Cancel.
- Deleting a user or a group, removing a host from the panel or an
  owner from a VM, and deleting an interface, a network filter or a
  secret say so, as the other deletes do.
- Renaming a tag and saving a VM's title and description say so.
2026-11-21 21:02:20 +03:00
catborise
00a44f7621 fix(interfaces): a link state libvirt reports as unknown is said in words
libvirt names an unknown link state "unknown", which the interfaces
page showed as "Link unknown" in English in every language. It is now
the translated "Link unknown", as when there is no state.
2026-11-21 20:34:51 +03:00
catborise
70b0b42f8d fix(ui): lists say they are empty plainly, filter by themselves and fit a phone
- An empty list says so in gray text, as the VM list does, not in a
  yellow warning or a blue notice (host pools, networks, filters,
  secrets, interfaces, tags, removed VMs, backups, schedules, targets).
- The Jobs and Backups filters show only while there is something to
  filter.
- The Jobs, Backups and Logs filters apply once a choice changes or
  Enter is pressed (filter_form.js): no Filter or Search button, and
  Clear the filters only while one is set.
- On a phone the Logs table shows the date, user, VM and message, with
  the result under it, and the Computes table the host and its memory.
2026-11-21 20:34:51 +03:00
catborise
383cbe89a6 feat(computes): a host's Instances page is the VM list of its VMs
A host's Instances page had a table of its own, older than the VM list:
no state filter, no tag filter, no bulk bar, a two-line Name/Description
head and a round green button for a new VM. It now shows the VM list
itself, of that host's VMs and without a host column, beside the host's
tabs, Bulk Migrate and New VM. The bulk bar sends back to the list it
was used on.
2026-11-21 20:34:51 +03:00
catborise
59db1f5515 fix(ui): a page's heading comes before its buttons on a narrow screen
The buttons beside a page's heading floated to its right, so on a phone
they came above the heading. The heading and its buttons are now one
wrapping row: the heading first, the buttons beside it or under it. The
Computes page, which had a heading of its own, uses the same row.
2026-11-21 20:34:51 +03:00
catborise
3167cf12fe fix(instances): the VM list's bulk actions show in a bar while VMs are chosen
The actions on the chosen VMs stood above the table at all times, as two
rows of disabled buttons and empty text boxes. They are now a bar at the
foot of the window that appears once a VM is chosen and names how many
are. The snapshot name and the tag are asked in small menus of the bar,
and the table's head has the box that chooses the VMs shown.
2026-11-21 19:26:27 +03:00
catborise
85c727d397 fix(i18n): form fields shown with their form's label are translated
A sweep of the panel in Turkish found English on screen where a field
had no label of its own: Django makes one from the field's name, and it
is not translated. A host's Hostname (TCP, TLS, socket forms), a new
user's Password, a new volume's Name and Format, and the VM owner form's
User and Instance showed in English, and so did the field names in the
error lists of a refused VM create form ("Hdd size: ...") and of the
new interface, network and pool dialogs ("Ipv4 addr: ..."). These fields
have the label the page shows elsewhere, and "qcow2 (recommended)" and
the navbar button's name are translated. A test checks that every field
these forms show has a label.

Left as they are: VM descriptions, log messages and libvirt's own words
are data; the XML editor's (Ace) screen-reader text is the library's.
2026-11-21 15:41:11 +03:00
catborise
7196871880 fix(ui): pages have a main heading, a skip link and labelled search boxes
An accessibility sweep (axe-core on 22 pages in four themes, and the
keyboard) found:

- No page had an h1: the page heading was an h3, and pages with their
  own heading (sign-in, Computes, errors) kept an empty one. The heading
  is an h1 at the same size; those pages leave the empty one out, and
  Balance has a hidden h1 beside its breadcrumb. Tests check every page,
  an error page and the lock page for one h1 and no empty heading.
- Keyboard users went through the whole menu on every page: a "Skip to
  content" link shows when it has the focus, and brings the content up
  below the sticky navbar. The OTP QR page takes only a signed token from
  its fragment, not the link's #main.
- Tom Select moves a field's label to its own box, leaving the hidden
  select it keeps unnamed (the Tags field of a host, the owner forms'
  user and VM): the label names it too.
- Put in maintenance was yellow text on white (1.6:1), an outline
  secondary button now.
- The pool page's Volumes heading skipped a level.
2026-11-21 15:16:49 +03:00
catborise
f7dcdbab31 feat(accounts): a superuser ends a sign-in lock; the session length is a setting
A user locked by failed sign-ins could only be unlocked with
manage.py axes_reset_username on the server, and nothing in the panel
showed the lock. The Users page and the user's page now mark a locked
user, counted as django-axes counts (a username's failures from one
address, over browsers, in any letter case), and the user's page has
Unlock sign-in for a superuser; it ends the lock from every address and
is on the Logs page.

A sign-in lasted Django's default two weeks, also after the browser was
closed. It now ends Session length (hours) after the sign-in, a setting
on the Settings page, 24 by default; a change applies from the next
sign-in. An idle timeout would not help: an open VM list refreshes
itself every five seconds.

Blocking a user signs them out. django-auth-ldap does not check
is_active for an open session, so a blocked LDAP user kept theirs.

The OTP sign-in page showed its error as a red list inside the red box;
it is plain text as on the other sign-in page, and django-otp's errors
are in Turkish and Chinese.
2026-11-21 13:51:33 +03:00
catborise
5d3280f9ea feat(accounts): the sign-in page keeps the username, warns of Caps Lock and shows the lock and a notice
A locked user got django-axes' plain-text 429 reply, untranslated and with
no way back; it is now a page in the panel's layout that says within how
many minutes the lock ends, and leads back to the sign-in page with the
destination kept (AXES_LOCKOUT_CALLABLE).

A failed sign-in emptied the username; it is kept, the password is marked
invalid and has the cursor (a refused username keeps it). A line under the
password says when Caps Lock is on. The fields carry autocomplete
(username, current-password, one-time-code) for password managers and
phones, and the show-password button is reachable with Tab again.

The lines under the forms are gone: "KVM / Libvirt" with a green dot
looked like a status it did not check, and "2FA Protection Active" was
shown to users without 2FA.

A new setting, Sign-in notice (Settings, Login), is shown above both
sign-in forms when set, e.g. planned maintenance or a terms-of-use line.
2026-11-20 22:40:41 +03:00
catborise
67357c844a test: the install-lib failed-write check fails for root too
The socket live suite runs as root inside a compute, where a 500 directory is still writable: the check that a failed write leaves no local settings put a directory where the part file goes instead. Found by the full live run before v5.0.0.
2026-11-20 20:48:39 +03:00
catborise
cdf1baed2e docs: the README and doc/ checked against the code; an installer rerun keeps the noVNC port
A review of every Markdown file against the code found steps that would
fail and statements that are no longer true:

- RHEL computes set up by hand enabled only virtqemud: the storage,
  network and other host pages need their daemons' sockets too;
- moving to a new machine migrated without /etc/default/webvirtcloud
  (a PostgreSQL panel would migrate the wrong database), and needed a
  node_id an older backup may lack;
- a rollback left update.sh's marker of a stopped update, which the
  next update would have gone on with;
- the manual installs' group and mode lines failed on hosts without one
  of the groups or without sqlite; RHEL's CodeReady Builder repository;
- the NFS backup target was defined on the user's libvirt connection;
- the off-site restore picked a backup by name, not time;
- the features, the jobs list, the console token, the alert webhook
  (ntfy does not take it), the API's submission_key, WS_* in the update,
  the update's last failure, the doc/ API and app tables, permissions
  of templates, protected VMs, backups and the .vv file.

An installer rerun kept WS_PORT in data/local_settings.py but pointed
nginx at that run's answer: it now takes the kept port.
2026-11-20 19:51:14 +03:00
catborise
29d4bc2e7a feat: update.sh updates an installer or manual installation in one command
Updating took four steps of commands copied from the README, with a
diff to read for settings.py and the nginx config. update.sh does them:
run from the repository (git show origin/master:update.sh | bash), it is
always the newest one, also on an installation that has none yet.

Nothing changes before its checks pass: root, an installation, with
PostgreSQL --database-backed-up, and an older version's own settings.py
moved into data/local_settings.py first (it stops and shows how that
settings.py differs from its version's template). Then it stops the
panel, backs it up into /root/webvirtcloud-backup-<date>, pulls master,
installs the requirements (LDAP's too when installed), migrates,
collects the static files, gives the files to the panel's user,
installs the units and starts the panel. It does not replace the nginx
config, which holds the installation's own lines: it prints what the
new version changes in it. The whole script is one function, so the
pull cannot change what runs.

dev/test-installer.sh IMAGE FROM installs FROM and updates it to HEAD;
the Installer workflow runs it from v4.3.0 on Debian 13 and AlmaLinux
10. The README's update section is the command and what it does.
2026-11-20 18:28:00 +03:00
catborise
29a1cbcace feat: an installation's own settings in data/local_settings.py; settings.py is part of the code
Every update rebuilt settings.py from the template, and the operator put
back their own values by reading a diff: a forgotten DATABASES started
the panel on a new, empty sqlite database. Docker users who needed an
option only settings.py has (LDAP, OTP_ENABLED, LOGIN_TRUSTED_PROXIES)
mounted their own copy and kept it up to date by hand.

webvirtcloud/settings.py is now the tracked file (no template, no copy
in the installer, the image, the container's start or CI), and it runs
data/local_settings.py last: the installation's own values, which an
update does not touch, kept in Docker's data volume, in the panel's
backups and readable by the panel's user only. The installer writes the
time zone, the noVNC port (now checked to be a number), ALLOWED_HOSTS
and CSRF_TRUSTED_ORIGINS there instead of editing settings.py with sed.
LDAP is set up there too; settings.py keeps only python-ldap's
timeouts. The README's update steps move an older version's own
settings.py into the backup before git pull and have its values moved
into the local file once.
2026-11-20 17:50:43 +03:00
catborise
0fb0b61a1a ci: the installer test checks the static files and the units after the page
A stylesheet the login page links is fetched through nginx (a broken
static alias passed), the panel's units are checked after the page
loads (a daemon that died while it was waited for passed), a page
without the login form is retried with a pause, and the temporary clone
is no longer made readable by every local user.
2026-11-20 17:02:57 +03:00
catborise
2947995e8c fix(installer): openSUSE Leap 16
Leap 16 builds the libvirt and lxml bindings for Python 3.13
(python313-*); the installer asked for python3-libvirt, which it does
not have, and stopped. On openSUSE it now installs the Python stack the
distribution builds the libvirt binding for: 3.11 on Leap 15 and SLES
15, 3.13 on Leap 16 and Tumbleweed. The installer workflow tests Leap
16.0 too, and the README says which installs CI tests.
2026-11-20 17:02:57 +03:00
catborise
84d633af08 fix: a downloading volume is not put in a new VM or a CD-ROM; slow downloads read as bytes come
A download writes its volume under its final name, so the volume was
offered while half written. #685 kept a copy and an attach away from
it; a new VM and a CD-ROM still took it. The VM create job now claims
the volumes it is made from (a writable one exclusive, a template or a
CD-ROM image shared), and adding a CD-ROM or inserting media holds the
ISO's volume shared and reads the ISO again in that pool under the
claim (iso_location, iso_path_in). Each is refused with the download
named.

A claim's key holds a pool's and a volume's names: longer than 255
characters on PostgreSQL it failed the request; Claim.resource is text.

A pool that belongs to more than one backup target is not stopped while
a backup to any of them runs (it took the first target only).

The download read 1 MiB at a time: on a slow server a cancel and the
progress waited for a whole MiB. It reads what has come (read1).
2026-11-20 16:59:01 +03:00
catborise
1a39bd3480 ci: install.sh tested on each supported distribution
The installer was tested by hand in containers before a release; a
change to it, to what it installs or a distribution's packages could
break a fresh install unseen. dev/test-installer.sh installs the
committed HEAD with install.sh in a systemd container of one
distribution and checks that the panel's services run, it has a secret
key and an admin password, and the login page loads. The Installer
workflow runs it on Ubuntu 22.04/24.04/26.04, Debian 12/13, AlmaLinux
10, openSUSE Leap 15.6 and openEuler 24.03 when the installer or conf/
changes, and weekly.
2026-11-20 16:19:49 +03:00
catborise
7e70595fd2 fix: a volume a job writes is not copied, attached or its pool stopped; download progress each second
A download into a pool listed its volume while it was written. The page
let a superuser copy it (the copy got a half-written file, live), attach
it to a VM, or stop the pool under it. Now:

- the copy job claims its source volume shared, and the worker refuses
  a copy whose name the source's format changed before the claim;
- attaching an existing volume holds it exclusive from its first read,
  so neither a download nor a copy is under way, and its format is read
  after the download ended;
- stopping or deleting a pool (page and API) holds the pool exclusive,
  and its backup target's claim if it is one; restores claim the pools
  they write into shared.

Each is refused with the job in the way named, as a volume delete
already was.

The download recorded its progress every 16 MiB, so a slow server's
bar stayed empty for a long time; it records it each second, with the
cancel check. The worker checks the name is still free before it
starts. A snapshot name or tag typed in the VM list's bulk form keeps
the list from reloading, as a chosen VM did.
2026-11-20 15:38:06 +03:00
catborise
7c8f5b3150 feat(storages): a pool's volume downloaded from a URL
An ISO or a disk image on a web server had to be downloaded by hand and
uploaded, or copied onto the host. A pool of files (dir, fs, netfs) now has
"Download from a URL" for superusers: a volume.fetch job streams the file
(http or https, its size told by the server and within the pool's free
space) into a new volume through libvirt, as an upload is written, on any
connection type; the job panel shows its progress and it can be cancelled.
libvirt reads the file's format (qcow2, raw) when the pool is refreshed. A
cancel, a failure or a crash deletes what it wrote; an address that fails
says why.
2026-11-20 14:50:04 +03:00
catborise
e802fa07e2 feat(instances): snapshot the VMs chosen on the VM list
Taking the same snapshot of many VMs, before an update say, took each one's
Snapshots tab. The VM list's bulk form now has a snapshot name with Take
snapshots: an external snapshot, without memory and without freezing file
systems (the tab has those choices), queued as a snapshot.create job for
each chosen VM, with the tab's rules (change rights and the snapshot
permission). A VM refused or held is named and the others are queued; the
Jobs page follows them. Enter in any text box of the form sends nothing.
The power and snapshot views share one queuing helper.
2026-11-20 14:24:46 +03:00
catborise
1c3993133e fix: the host comparison reads afresh, skips silent hosts and unread listings; bulk form limit
Audit and review (Codex, agy) of the host comparison and the bulk tag:
- a read of what a host's VMs need was used again for 5 minutes without a
  new one, so a network added to fix a line was still reported: each load
  reads again, the last read standing in only when the new one is late;
- a host that stopped answering kept what it said before, and was reported
  both as not answering and as a destination lacking things: only hosts that
  answer are compared;
- one listing of a host that could not be read (its secrets, say) dropped the
  whole host: each listing is read on its own and only those read compared;
- the kept reads no longer keep whole VM definitions (plain strings);
- choosing more VMs than the bulk form takes made Django refuse the form:
  past 500 the buttons are off and the count says so; the tag view refuses
  them as the power view does.
2026-11-20 13:58:48 +03:00
catborise
5c169ca504 feat(instances): a superuser tags the VMs chosen on the VM list
Tagging many VMs took each one's Settings tab. The VM list's bulk form now
has, for a superuser, a tag box (every tag offered) with Add tag and Remove
tag: under the ownership lock the tag is checked as on the Settings tab,
made if new, and added to (or removed from) the chosen VMs that lack (or
have) it, each with its own log row. Enter in the tag box sends nothing (it
would press Start, the form's first button); only the two tag actions are
taken, and none of the chosen VMs left makes no tag.
2026-11-20 13:10:44 +03:00
catborise
640511cfd4 feat(computes): the Computes page tells what a host lacks for another host's VMs
A VM migrated to a host without its network, network filter or secret was
refused only when the migration was asked for. The box above the hosts now
names, for each pair of hosts it has read, what the VMs of one use (their
running definition and the one for the next start) that the other lacks: an
active network, a network filter or one of other rules, a secret by UUID or
usage; the migration check refuses moving those VMs there. A host in
maintenance is no destination. What a host's VMs need is read on its own
thread, apart from the pools and snapshots, and used again for 5 minutes, so
a host of many VMs is compared too. The rules of two hosts' filters are
compared as the migration check does (filter_rules, shared).
2026-11-20 13:00:15 +03:00
catborise
b36f674542 fix: power jobs name their action, refuse what does not apply and recover by the VM's state
Audit and review (Codex) of the bulk power and disk I/O limit:
- the Jobs page showed "Power" for a start, a shut down and a force off
  alike: each is a job kind of its own (instance.start, .shutdown,
  .force_off) named by its action;
- forcing off a VM already shut off made libvirt refuse after the job had
  recorded its intent: it ended uncertain and kept the VM locked. Each job now
  refuses a VM its action does not apply to before anything changes, and
  recovery reads the VM's state (running after a start, shut off after a
  shut down or force off) instead of ending uncertain;
- the Jobs page left out its kind and state filters for owners, whom the VM
  list sends there: they apply to every user;
- a running NBD disk's tls, which libvirt fills in, no longer makes it
  another disk than the next start's;
- a disk whose running limit differs from the next start's shows both.
2026-11-20 12:10:06 +03:00
catborise
35c794c50c feat(instances): start, shut down or force off the VMs chosen on the VM list
Powering many VMs took a click each. On the VM list each VM its user may
power (theirs, or every one for a superuser) has a box; "Choose the VMs
shown" chooses those on screen. Start, Shut down and Force off queue an
instance.power job for each chosen VM: each holds its VM and shares its host,
checks its user and the VM again when it runs, and has the checks of the
page's buttons (a template is not started, a host in maintenance starts none,
a VM an administrator paused is not an owner's to power), its own recovery
and its own log row. A VM the user may not power, or that another job holds,
is named and the others are queued; the Jobs page follows them. A VM a filter
or a collapsed host hides is neither counted nor sent, and the list does not
reload while VMs on screen are chosen.
2026-11-20 11:39:45 +03:00
catborise
2b60b79a5f feat(instances): a superuser limits a disk's I/O
One VM's busy disk could take its storage from all the others. Under a
disk's Device details on the Disks tab a superuser sets an I/O limit, IOPS
and MiB/s for reads and writes together (0: none). libvirt applies it to each
definition that has the disk: the running VM's at once, and the one for its
next start; a transient VM's live only. A disk whose tuning is more than this
(a throttle group, a burst, read and write apart, bytes not whole MiB/s)
shows "Set in the VM's XML" and is changed there; a disk the next start
replaces is refused until then.
2026-11-20 11:10:55 +03:00
catborise
79f3b906dd fix(instances): Guest Info fits the tab, reads odd agent answers and says when usage is unknown
Audit and review (Codex, agy) of the file system list:
- the table had a side margin on a full-width table and ran past the tab's
  edge (on a phone its Used column was cut off); it now sits in a box that
  scrolls a long mount point, and on a phone the labels above it wrap by word;
- an agent answer that is not a list, an entry that is not an object, a
  negative, boolean or oversized size, or a null mount point or type no longer
  fails the tab or shows "None"; a "filesystems" key of another command is not
  taken for the list; the total is the whole file system's when the agent
  tells it (total-bytes-privileged), so used no longer passes it;
- when the agent does not give the file systems, a note says so;
- Turkish labels: "Kernel Version" was "Çekirdek Sürümü" like "Kernel Release",
  "OS Pretty-Name" read as a short name, "Timezone / Offset" as a location;
- the bulk migration live test's name no longer claims two at once, which its
  unit test checks.
2026-11-20 10:28:35 +03:00
catborise
10607a7063 test(live): the bulk migration live test sends moves
Since Bulk Migrate spreads VMs over hosts (#601) the job takes moves, each
VM with its destination, not a target and instances: the live test still
sent the old form and failed with KeyError 'moves'. Live suite on the
Vagrant computes: 3017 OK, 7 skipped.
2026-11-20 09:44:21 +03:00
catborise
3da55342da feat(migrations): a migration's bandwidth can be capped
A migration took all the network it could, its disk copies too, and the VMs
on both hosts felt it. Settings has a Migrations group with "Migration
bandwidth" (MiB/s, 0: libvirt's default, the default); every migration, by
hand, in bulk or for maintenance, passes it to libvirt, and its log line
names it. libvirt applies it to the memory until the final switchover and to
each copied disk on its own; the help and README say so. A refused setting
is now named in the page's language.
2026-11-20 09:44:17 +03:00
catborise
46931bdbdb feat(instances): the Guest Info tab shows how full the guest's file systems are
A disk filling up inside a guest was seen only from the guest. The Guest Info
tab now lists, from the guest agent, each mounted file system with its type
and used / total size, a bar turning amber from 85 %. File systems the agent
gives no size of (pseudo ones, Windows' System Reserved) are left out; an
agent without the command still shows the rest of the tab.
2026-11-20 09:30:15 +03:00
catborise
981ff7b294 fix: a backup's files say so on the pool page; Removed VMs names schedules and backups
On a backup target's pool every backup file was "Not used on this host" and
listed with the unused volumes, though its deletion there is refused: it is
deleted with its backup. The column now says "Backup of <VM>" and counts it
as in use. A VM kept on the Removed VMs page for its schedules or backups
alone showed no owner and no reason; its row now names its schedules and
counts its backups.
2026-11-20 09:03:52 +03:00
catborise
aeef837afa feat(storages): the pool page tells which VMs use each volume
A volume left behind (a disk kept when its VM was deleted, an old image) was
not told apart from one a VM needs until its deletion was refused. The pool
page now has a "Used by" column: the VMs of this host whose disks, UEFI
variables, saved state or snapshots are the volume or are built on it, "In
use" for one only another volume is built on, else "Not used on this host";
buttons list each kind, and a VM's name finds its volumes. Its deletion still
asks the other hosts, as one sharing the storage may use it. When the host's
VMs cannot be read the page lists the volumes without the column.

The scan that refuses deleting a used volume now also counts a VM's UEFI
variables file and a snapshot's block device, and reads each VM once.
2026-11-20 08:29:33 +03:00
catborise
dc5b1dbb2a fix(computes): a VM that returns gets its protection, schedules and backups back
A VM that vanished from its compute, or whose compute was deleted and added
again, came back with its owners and tags only: it was no longer protected,
its schedules no longer backed it up, and its backups stayed unlinked, so its
Backups tab no longer listed them and retention left them for good. The
Removed VMs record now keeps its protection, its schedules and its own
backups (not those of a copy under the same UUID), and gives them back.
Turning protection on or off waits for the ownership step, so a VM dropped
from its host's list meanwhile is not told protected.
2026-11-20 08:17:23 +03:00
catborise
5c7687c60d feat(computes): a box on the Computes page tells what wants a look
Above the hosts, linked to where each is handled: hosts not answering,
pools filled to 85% (as last measured), VMs with snapshots older than 30
days, backup jobs failed and backups a schedule did not take in the last 7
days (per schedule; not for a host in maintenance), backups missing or
damaged (a new Damaged filter on the Backups page), and jobs that ended
uncertain or wait for over an hour. Nothing to look at: no box. The pools
and snapshots are read on threads of their own, waited for 2 seconds at
most: one slow host leaves out its lines, not the page.
2026-11-19 23:22:35 +03:00
catborise
2c0855cf64 feat(backups): a schedule also keeps weekly and monthly backups
Besides the newest N backups of each VM, a schedule keeps the newest backup
of each of the last N weeks and of the last N months that have one (panel
time zone); 0 keeps none. The schedules list shows them.
2026-11-19 22:28:44 +03:00
catborise
adb4231db7 feat(instances): a protected VM is not deleted nor restored over
A superuser turns a VM's protection on or off on its Settings tab, not while
a job holds the VM (a deletion or a restore over it that runs would not
stop). While it is on, its deletion (page, API, a queued job at its start)
and a restore of a backup over it are refused; the Destroy tab, the destroy
page and the restore page say so. A VM moved outside the panel keeps it.
The API shows the flag read-only.
2026-11-19 22:00:25 +03:00
catborise
57e90e0d27 fix(jobs): a busy message names what the job in the way works on
A verification of a chain's base refused a verification of its incremental
with "Verify backup is running on this resource": which backup held it was
not said. The job's resource label now follows its name for who may see
the job, as on the Jobs page; not in an audit row or a bulk migration's
error, which others read.
2026-11-19 21:35:28 +03:00
catborise
7b23c75bf5 fix: the API verifies a backup and shows what was found; Docker's health check reads /healthz
The backups API had every backup action but Verify, and did not show a
backup's verified_at and damage: a script restoring through it got no sign
of a damaged chain. Docker's health check asked for the login page, so a
hung job worker left the container healthy; it now reads /healthz.
2026-11-19 21:03:54 +03:00
catborise
fc6ad4e8ca fix(backups): a verification marks each damaged backup of the chain; an error told once
Verifying an incremental backup put what it found only on that backup: a
base whose file was changed or missing stayed unmarked, so restoring it
gave no warning and no badge showed it. Each backup of the chain is now
verified with it and holds the damage of its files and of those it builds
on. Verifications of backups of one chain run one at a time, so an older
read never writes over a newer finding; the rows and the job's own result
are written together, and recovery reads that result, also when a cancel
came after the reads.

A job whose recovery found the error it had raised stored it twice (the
verify job's damage, in its page and its alert).
2026-11-19 19:12:02 +03:00
catborise
2c8493ba8c fix: a test alert button; damage shown and warned of on restore
Audit of the alerts and backup verification: an operator could learn
that the alert mail or webhook works only from a real failure. Settings
> Alerts gets "Send a test alert", sent at once to the channels saved,
each channel's result shown. A damaged backup's reasons were only in a
tooltip, so not on a touch screen: they show under the badge. A restore
of a backup that a verification found damaged, or of an incremental on
a damaged base (shown as Ready), said nothing: the restore pages warn.
2026-11-19 17:24:18 +03:00
catborise
dcd7e32df7 feat(alerts): mail and webhook alerts, and /healthz for a monitor
A failed backup, a scheduled backup not taken, backups the daily check
finds missing and a job that ends uncertain could only be seen on the
pages. They are now queued as alerts in the transaction of the change
they tell of (never stopping it) and sent by the worker's periodic pass
to the Settings page's alert e-mail addresses (the server's SMTP
settings) and alert webhook (a JSON POST), each tried again for ten
passes on its own. A skip for a host in maintenance is no alert.
Setting values take 255 characters. /healthz answers 200 while the
database answers and the job worker runs, 503 otherwise, without a
login.
2026-11-19 16:10:37 +03:00
catborise
2cf7dbe577 feat(backups): verify a backup's files on demand
The daily target check only finds files that are gone. Verify (a ready
backup's Restore menu, superusers) runs backup.verify: it reads the
backup's files and those of the backups it builds on whole from the
target through a libvirt stream: each there, a disk at its size and in
its format on its base's file, the small files with their SHA-256, and
a disk with the SHA-256 recorded at its first verification. What is
wrong is kept on the backup and shown as Damaged; a target that cannot
be read fails the job and leaves the backup as it was. Progress in
bytes, cancellable.
2026-11-19 16:10:19 +03:00
catborise
eeae606d08 feat(migration): encrypt migrations over TLS between hosts that have it
QEMU sends a migrating VM's memory and copied disks in the clear. A
compute gets "Encrypt migrations (TLS)" (edit page, Advanced; API
field migration_tls); a migration between two hosts that both have it
passes VIR_MIGRATE_TLS whenever data moves (not for a shut-off VM's
definition alone), and the log says TLS. The hosts need QEMU's
certificates in /etc/pki/qemu; a host without them refuses before
anything moves. Tried on two AlmaLinux 10 hosts: the TLS stream starts
with a TLS record, the plain one with QEMU's QEVM header.
2026-11-19 15:45:32 +03:00
catborise
2e3ffba851 fix(backups): a schedule of every VM of a compute reads the host's VMs
The schedule took a compute's VMs from the database, which learns of a
VM made with virsh only when a page reads the host. When its time comes,
the compute's own schedule task reads the host first, once a day per
compute and day; the new VM is backed up a pass later.
refresh_instance_database now says whether it synchronized: a host that
did not answer, was busy or failed is read again at the next pass, and
the known VMs are backed up meanwhile. A host in maintenance is not read.
2026-11-19 15:15:11 +03:00
catborise
1d880acb17 docs: VM owners with the backup permission back up their VMs
The permissions table still had backups as a superuser's only.
2026-11-19 14:55:17 +03:00
catborise
72a2e448d4 fix: the user list, a user's VMs and the SSH keys come in name order
The user list counts API tokens, and a query with a count has no order
of its own: PostgreSQL lists the users in any order. A user's page
listed the VMs and the SSH keys as stored, so did the profile and the
VM page's key choice.
2026-11-19 14:31:59 +03:00
catborise
94181cfc14 docs: tags, host maintenance and Balance
README features, backup schedules by tag and the API's ?tag=; the apps
that hold them in architecture.md; tags in the permissions table.
2026-11-19 14:15:34 +03:00
catborise
0a99713dda fix(tags): the Tags page lists the tags by name and has a search box
The list counts each tag's VMs and hosts; a query with a count leaves
the model's ordering out, so the tags came in the order they were made.
With dozens of tags the page also gets the search box the other
administration lists have.
2026-11-19 13:36:39 +03:00
catborise
a5d0dbfe66 feat(tags): the eight most used tag pills, the others behind "…"
With dozens of tags the pills took rows of the list's top (six rows for
forty tags, the table below a phone's screen). The pills are now by how many
rows have the tag, the eight most used shown and the others behind "… More
tags N", which shows them as a row's "…" does; its count follows the
search and the state, and it hides when none is left behind it. A pill
behind it chosen (remembered, or by a row's badge) shows them.
2026-11-19 11:05:40 +03:00