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

887 commits

Author SHA1 Message Date
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
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
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
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
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
catborise
7018f57477 fix(tags): the tag pills count as the state pills do
A tag pill's count was the page's; the state pills' follow the search and
the tag. Now a tag pill counts the rows with its tag the search and the
state find, and one with none is hidden unless chosen, as a state pill.
2026-11-19 10:49:45 +03:00
catborise
f6b1ee8985 fix(tags): sixth audit: the tag box tells its rule, trims a paste; clear keeps the focus
- A name typed or pasted into the tag box that cannot be a tag shows the
  rule (letters a-z, digits, dots, dashes, underscores; at most 12
  characters) instead of nothing; the spaces a paste brings are dropped;
  "constructor" is no longer taken for a tag there is.
- "Clear the filters" hides with the message it is in: the search box takes
  the focus.
2026-11-19 10:03:50 +03:00
catborise
0e711ec058 feat(tags): the tag filter as pills, below the state pills
The tag filter was a select beside the search box. It is now a row of
pills as the VM states' are, below them on the VM list and above the table
on the hosts list: All tags, No tag and each tag with how many have it.
The state and tag pills share one helper in table_filter.js; a badge
chooses its tag's pill, the choice is remembered as before.
2026-11-19 08:40:36 +03:00
catborise
6680e14ce4 fix(tags): three tags and "…" on the host's VM list too
The host's VM list showed every tag of a VM, widening its Name column as
the VM list did before; it now shows three and the others behind "…".
There its tags are not buttons: the tags "…" shows take the focus, so a
keyboard user is not sent back to the top of the page.
2026-11-19 08:29:40 +03:00
catborise
65b8110464 fix(tags): fourth audit: stale tag forms, rename after delete, stale filter
- A tags form carries the names it showed (show_hidden_initial): sent back
  unchanged, the VM's or host's tags are left as they are, so a form shown
  before a tag was renamed or deleted does not bring the old name back.
- A rename whose tag is deleted while it waits answers 404, not 500.
- A removed VM kept only for a deleted tag leaves the Removed VMs page.
- A kept tag filter the list no longer offers is forgotten, so a name made
  again later is not chosen by itself.
2026-11-19 07:53:14 +03:00
catborise
7810fb39fe feat(tags): smaller tag badges, three on the VM list
Tag badges are smaller than other badges everywhere, and the VM list
shows a VM's first three tags and "…" for the others: it names them in
its tooltip and shows them when pressed, by mouse or keyboard. A VM with
many tags no longer widens the name column and the table with it; the
tag list still filters by any of them.
2026-11-18 23:31:55 +03:00
catborise
b74e798e70 fix(tags): second audit: unchanged saves, report, other lists, hosts list
- Saving a VM's tags unchanged writes no audit row.
- The VM report has a Tags column.
- A host's VM list and a user's VMs (account page) show the VMs' tags.
- The hosts list says "No host matches the filters." with Clear the
  filters, as the VM list does; the tag list keeps to a phone's width
  with a long tag.
- A removed VM's delete page says its owners and tags no longer come
  back; the VM history rows say "owners and tags kept/restored".
- The API's ?tag= is trimmed; Tom Select's "Add tag" line shows the name
  in lower case as it is made; Bulk Migrate's tag list goes back to its
  title after a choice, so the same tag can be chosen again.
2026-11-18 23:15:34 +03:00
catborise
45225df1a4 fix(tags): audit: races, a taken name, case
- A VM's tags set while its host's list drops it: the VM is checked
  again under the ownership lock and the page says it was moved, instead
  of a 500 or a success that kept the old tags in its removed record.
- A tag deleted right after another rename cleans the removed VMs' kept
  name it has now; a delete sent while a backup schedule uses the tag
  (saved after the page was shown) is refused with the schedules' names.
- A rename to a name another tag took meanwhile is a form error, not a
  500; "There is a tag with this name already" is translated.
- Tom Select makes a typed name lower case and offers no new tag for one
  that is there in another case; the API's ?tag= is lower-cased too.
2026-11-18 22:47:18 +03:00
catborise
904dd860d0 feat: tag badges choose the tag, untagged rows, counts in the tag list
On the VM and host lists a tag's badge chooses it in the tag list, the
tag list offers "No tag" for the rows without one, and each choice says
how many of the listed rows it shows ("prod (42)"); an owner counts only
their own VMs.
2026-11-18 22:08:02 +03:00
catborise
f4051213fb feat: a Tags page and tags in the API
Administration gets a Tags page: each tag with how many VMs and hosts
have it, renamed (on the VMs, hosts and removed VMs that keep it) or
deleted (taken off all of them). Both are logged.

The API gives a VM's and a host's tags by name, read only, and its VM
and host lists take ?tag= for those with a tag.
2026-11-18 20:54:30 +03:00
catborise
11b447f681 feat: filter the VM and host lists by tag
The VM list and the hosts list get a tag list next to their search: the
rows with the tag chosen show, together with the search and the state.
It offers the tags of the rows listed only, so an owner sees the tags of
their own VMs, not the panel's. The state counts follow the tag, and the
chosen tag is remembered as the search and state are; Clear the filters
clears it too.
2026-11-18 20:34:01 +03:00
catborise
149530f8df feat: tags for VMs and hosts
One list of tag names (lower case letters, digits, dot, dash, underscore;
up to 32) given to VMs and hosts. A superuser sets a VM's tags on its
Options tab and a host's on its form; Tom Select suggests the tags there
are and makes a new one typed. The VM list, the VM page and the hosts list
show them as badges, to everyone who sees the VM or host.

A VM's tags stay with it: an out-of-band move adds them to those on the
new host's record, and a VM that leaves its host keeps them on the Removed
VMs page (a VM with only tags too) and gets them back when it returns.
Setting them is audited and held against the VM's move.
2026-11-18 20:20:52 +03:00
catborise
8e0a84a3bd fix(vmbackups): full audit: backup volumes attached, ended creates, refusals
- A backup's volume is no longer attached to a VM as an existing volume:
  the VM would write into the backup, and the backup's deletion (by hand
  or retention) would remove the VM's disk.
- A backup whose create job ended without it (uncertain, then resolved)
  stayed "creating" for good and could not be deleted. Only a backup whose
  job still runs is being made; the others show as failed and are deleted.
- A VM with an NVDIMM or virtio-pmem device is refused: the host file
  behind it is not copied, and its restore would use the original's file.
- A block device's or network NVRAM is refused by its path, instead of a
  ready backup without the firmware state.
- A VM owner's restore pages link back to the VM's Backups tab, not to the
  superusers' backup list.
2026-11-18 14:30:51 +03:00
catborise
012eba0c80 fix(instances): a host in maintenance offers no new VM from its VM list
The host's VM list offered New Instance while the host was in
maintenance; the create pages then refused it and sent the user to every
VM's list. The button is disabled there, saying why, and a refused create
page goes back to the page it was asked from, else the host's VM list.
2026-11-17 23:07:45 +03:00
catborise
34dd721c11 fix(instances): the VM page's eight tabs fit one row on a desktop
The page stops at 960 px, and the theme's tab padding (24 px each side)
made the eight tabs, with Backups, wider than the card at every desktop
width: the last one went to a second row. The tabs take Bootstrap's
narrow padding; they wrap only on tablets and phones.
2026-11-17 21:36:29 +03:00
catborise
43d25a2759 feat(vmbackups): the Backups tab and restore pages for VM owners
A VM owner with the backup permission who may change the VM gets its
Backups tab: the targets open to VM owners, the VM's backups on them,
Restore as a new VM or over the VM, and Delete for the backups they took;
no schedule is shown. Their restore as a new VM names the VM's host and
pool instead of asking, and the restore-over page says that the disks the
VM runs from are deleted. A superuser opens or closes a target to VM
owners on its page.
2026-11-17 19:40:33 +03:00
catborise
db4cbf806a feat(vmbackups): VM owners back up and restore their VMs within a quota
A permission 'Can back up instances' lets a user back up the VMs they
may change into targets open to VM owners, restore those backups over
the VM or as a new VM, and delete the backups they took by hand. Each job
checks the rights at admission and again when it runs.

- A backup quota (GiB, in the user's quota) counts the owner's own
  backups: a backup being made holds its estimate, what its disks and the
  files below them hold. An owner's backups run one at a time, so each
  run's check sees the others.
- An owner restores as a new VM on the VM's compute, into its first
  disk's pool, within the VM quota; the job counts in it until its VM is
  recorded, as a clone does.
- An owner's restore over the VM removes the disks it ran from once the
  switch is done, unless another VM uses them: the owner cannot remove
  them.
- Recovery never begins a deletion the job had not begun.

Superusers keep everything they had.
2026-11-17 19:40:24 +03:00
catborise
5f7555f348 fix(instances): a VM with backup checkpoints is deleted and moved offline
libvirt refuses to undefine a domain that has checkpoints unless asked to
drop their metadata. The VM delete job and the shut-off migration's
removal of the source definition now pass CHECKPOINTS_METADATA; a backup
chain ends with them, and the next backup is full.
2026-11-17 16:55:26 +03:00
catborise
272260eec5 fix(instances): the VM page's tab bar wraps instead of overflowing
On wide screens the tabs never wrapped (flex-lg-nowrap) and their labels
do not break. With the Backups tab, Turkish labels and the united theme's
wider font, they ran past the card's right edge between 992 and 1199 px.
They now wrap to a second row when they do not fit.
2026-11-17 16:29:42 +03:00
catborise
f4559acbc7 feat(vmbackups): back up a running or shut-off VM into a target
A superuser backs a VM up from its new Backups tab, or with POST
/api/v1/backups/ (202 with the job); GET lists and reads backups. The
backup.create job holds the VM, its compute (shared) and the target, so
migrations, snapshots and power changes of the VM wait meanwhile.

- A shut-off VM's disks are copied one at a time into the target pool,
  flat, in their format (createXMLFrom); a cancel stops before the next.
- A running or paused VM's disks go by libvirt's push backup into
  volumes made first, as the live clone: the file systems frozen for its
  start when the guest agent answers (frozen), crash-consistent
  otherwise, or refused when frozen file systems are required. A guest
  that shuts down meanwhile does not end the backup.
- A running VM's NVRAM file is kept only when it reads the same after
  the copy as before it (three reads), so it is the capture point's.
- Then the NVRAM file, the definition and the manifest (written last)
  are uploaded and read back, and the row becomes ready with its files.
- Recovery thaws a frozen guest first, watches a push backup still
  running, finishes a copied backup, removes the files of a failed or
  cancelled one, and leaves a copy whose end libvirt cannot tell
  uncertain with its files named. The target pool is checked by UUID and
  its free space before anything is made.
2026-11-17 09:13:59 +03:00
catborise
a03f12aa5b fix(computes): maintenance read at the moment of the action; autostart named and refused
An audit of host maintenance found:
- refuse_start and refuse_new_vms trusted the compute as the page or job had
  read it: a clone started after its host went in maintenance during the disk
  copy, and a power-on raced the switch while host devices were checked. They
  now read the state from the database, and power-on checks right before the
  start; a VM defined from XML is refused as well.
- libvirt starts autostart VMs itself when the host boots. Autostart cannot
  be turned on for a VM of a host in maintenance, and the host page names the
  VMs that would start, so that their autostart is turned off before a reboot.
- The New VM dialog said "In maintenance" for a host whose maintenance was
  only requested: it now says "Maintenance".
- Tests now cover the owner's power-on, the revert job and a stale compute.
2026-11-16 22:53:42 +03:00
catborise
80e68d0628 fix(computes): a host's maintenance shows only its own bulk migration; the panel's refusals are not libvirt errors
The host page in maintenance showed the host's latest bulk migration even
when it was from before the maintenance, as a job of the morning that
"succeeded" while a VM still ran. The host now keeps when it went in
maintenance (maintenance_since; a job that puts it there sets it to the
job's own time), and the page shows a bulk migration from then on, or one
still running.

A refusal of the panel's own (OperationError), such as a VM start on a
host in maintenance, was shown as "libvirt Error - ...": it is shown as is.
2026-11-16 20:30:54 +03:00
catborise
d96fe940e9 feat(computes): putting a host in maintenance migrates its VMs; ready once none runs
A host was put in maintenance with its VMs still on it, and emptying it was
a separate step. "Put in maintenance" on a host with VMs that run now opens
Bulk Migrate, whose button migrates the chosen VMs and puts the host in
maintenance in one transaction: with the job admitted, or not at all; a
form sent again finds its job and does not put back a host taken out of
maintenance since. The page also puts it in maintenance without migrating,
for VMs that cannot move or when no host can take them.

Maintenance is not refused while VMs run: it must be on before they move,
or a new VM or Balance could take their place. The host shows instead
whether it is ready: "Maintenance requested" while VMs other than shut-off
ones remain on it (or it cannot be read), with its bulk migration's state;
"In maintenance" once none does. None of its VMs starts or resumes there
meanwhile. Ending maintenance during the bulk migration lets it go on.
2026-11-16 17:04:06 +03:00
catborise
22362de068 feat(computes): a host in maintenance takes no new VM or migration
After a host was emptied with Bulk Migrate for its maintenance, Balance
proposed moving VMs back onto it, and new VMs and migrations could still be
sent there. A superuser now puts a host in maintenance on its page (and
takes it out), each change audited; the form names the state it sets, so a
second page sent meanwhile does not turn it back.

A host in maintenance (Compute.maintenance, refuse_new_vms):
- takes no migration: migration_target refuses it, so the Migrate tab,
  Bulk Migrate, Balance and queued migrate jobs follow one rule; Bulk
  Migrate leaves it out of its destinations and its spread;
- takes no new VM: the create and clone jobs refuse it when asked for and
  again before they start (the REST API submits the same jobs); the create
  pages and the XML define send the user back to the VM list, and the New VM
  dialog lists it without a link;
- is left out of Balance: its VMs neither count nor move, and the Balance
  job refuses a move from it too, before each migration starts.
Its VMs run on; a migration already started finishes. The Computes page and
the host's page show that it is in maintenance.
2026-11-16 15:56:01 +03:00
catborise
4941a8a048 feat(computes): Balance proposes migrations that even out the hosts
A Balance button on the Computes page opens computes/balance/: the memory
and vCPUs each host gives its running VMs, before and after, and the
proposed migrations. The proposal (computes/balance.py) takes, step by
step, the one move that most lowers the sum of the squared memory loads,
then of the squared vCPU loads, and stops when none does; each VM moves
once, and the VMs moved to a host fit in the memory its running and
paused VMs leave without counting those moved away, so the moves may
run in any order. Only running VMs count and
move; one that cannot move (no destination shares its disks) still
counts on its host and is listed with the reason. Unticking a VM keeps
it where it is and makes the proposal again.

Migrate runs the moves shown in one host.balance job. It shares the bulk
migration's loop (computes.jobs.Migrations): migrate jobs, the chosen
number at once, one bulk job at a time. Its migrations take only a
running VM (moveto running_only): one stopped since stays where it is.

A job another one started now shows only on its own page: a host's page
no longer lists a bulk migration's or a balance's migrations, and the
Computes page shows the bulk jobs.
2026-11-16 07:37:10 +03:00
catborise
60c581e5e1 fix(computes): Bulk Migrate replaces Evacuate, and its list has Select all
The owner found "Evacuate" ("Boşalt") a poor name: the button, page and
job are now Bulk Migrate ("Toplu Taşı"), as Proxmox calls it, and so
are the URL, view, template, script, job kind and claim. The VM list
gets a Select all box in its header, which ticks every VM that can
migrate. The unclear Check button goes: another destination reloads the
list itself, and a host with one destination names it instead of
offering a choice.
2026-11-15 19:43:51 +03:00
catborise
d20254f757 feat(computes): a host evacuates its chosen VMs to another host
The host's Instances page gets an Evacuate button. Its page lists the
host's VMs for a chosen destination: running ones ticked, shut-off ones
left to choose ("Also migrate the shut-off VMs"), and a VM with a disk
file the two hosts do not share refused with the reason, since it needs
a copy chosen on its own Migrate tab.

One "Evacuate host" job migrates them: a migrate job each (live with
auto converge; a shut-off VM offline), at most the chosen number at
once, so a VM that fails stays on the host and the rest go on. The
choice goes up to half the worker's slots, which a host's jobs may take,
less the evacuation's own. Cancelling it cancels the migrations that
run and starts no more. One evacuation runs at a time: it waits in a
worker slot, and several could leave none for their migrations. A VM
that left the host meanwhile is skipped (a migrate job takes the host it
is to leave from the evacuation and refuses another); a host whose record points
elsewhere since, or a worker lowered to one slot, stops it before the
next VM. A busy VM lets the others go first; one an uncertain job holds is
not waited for.

Migrations now hold the hosts' VM sets shared, so several migrate at
once; creates, clones, deletes and the VM list reconcile still wait for
them. A destination gone since the form was shown is refused, not
replaced by another. The uses of the NVRAM directory's pool take turns
(NVRAM_LOCK): two UEFI migrations at once would share a transient pool
that the first destroys under the second.
2026-11-15 18:04:00 +03:00
catborise
0d68888510 test(instances): live disk and NIC posts send what their forms send
Since ad9c3ad9 a disk's detach and delete forms post the disk's path, and
since b664e341 a NIC's form posts net-seen, its saved definition as the
page read it; a post without them is refused as made from a stale page.
Four live tests still posted the old fields, were refused and failed;
test_clone then failed too, on the extra disk the refused delete left.
They now post the same values as the forms.
2026-11-14 14:38:25 +03:00
catborise
ee662618b2 refactor(instances): the VM page and new VM steps name what their templates get
The VM page and the two new VM steps rendered locals(): every local of
the view reached the template, so which values a page uses could not be
read from the view, and a renamed variable left part of a page blank
without an error. Each view now passes a dict of the names its template
reads. The assignments that only existed for locals() (conn = None,
empty storage and network lists, meta_prealloc, unused defaults) are
gone. A new VM step whose host could not be read shows what it showed
before.
2026-11-14 14:14:23 +03:00
catborise
d6df6b1df4 fix(instances): console changes that cannot be made are refused, not 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.
2026-11-13 22:49:28 +03:00
catborise
88e7e0fa90 fix(instances): a console settings page opened before another 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.
2026-11-13 22:49:23 +03:00
catborise
7fe79463fc fix(instances): saving a SPICE console's settings keeps it SPICE
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.
2026-11-13 22:49:21 +03:00
catborise
cd3edf4dff fix(instances): a VNC password the browser console can send, kept as set
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.
2026-11-13 22:49:12 +03:00
catborise
275bf11aed fix(computes): a chart places each reading at the time it came
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.
2026-11-13 16:38:42 +03:00
catborise
a998e68757 fix(instances): one guest's bad address no longer ends a search or the 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.
2026-11-13 16:07:12 +03:00
catborise
3dfdd529b2 fix(instances): the REST API's list of all VMs reads the hosts first
/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.
2026-11-13 16:07:01 +03:00
catborise
cdc7468af3 fix(instances): the VM list keeps its state filter and finds names in 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).
2026-11-13 16:07:01 +03:00
catborise
cf1f7ad055 fix(instances): a host that does not answer no longer holds the VM lists
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.
2026-11-13 16:07:01 +03:00
catborise
8263680c48 fix(appsettings): a number an older version saved no longer breaks its 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.
2026-11-13 13:58:57 +03:00
catborise
5a52bcf43e fix(instances): a new VM's disk cache goes with the disk I/O of Settings
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.
2026-11-13 13:58:46 +03:00
catborise
b664e34161 fix(nwfilters): two changes at once do not undo each other
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.
2026-11-13 11:46:01 +03:00
catborise
143a74b145 fix(storages): a volume another compute's VM uses on shared storage is 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.
2026-11-13 10:41:18 +03:00
catborise
2c7d7e9c3b fix(instances): a clone's recovery tells how to thaw a guest paused meanwhile
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.
2026-11-13 08:44:05 +03:00
catborise
3412c63417 fix(instances): a Windows VM's root password and SSH key are refused 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.
2026-11-13 08:43:50 +03:00