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

2282 commits

Author SHA1 Message Date
catborise
de249ebad7 fix(interfaces): an interface a VM or a network uses is not deleted
A stopped bridge was deleted while a shut-off VM's network card or a
libvirt network named it; that VM or network then did not start.
Deleting an interface is now refused while any definition of a VM,
running or not, or a network names it, with their names.

A new bridge was offered a device a VM's macvtap card or a network
forwarding to it used; bridging it cut that VM off. Such devices are no
longer offered. A NAT or routed network's outgoing device counts as
used too.
2026-11-12 16:17:33 +03:00
catborise
edc165cfc4 fix(instances): a VM is not migrated to a host without its secrets
A shut-off VM whose disk, host device or vTPM names a secret was moved
to a host that does not have that secret: libvirt defines the VM there,
the source definition was removed, and the VM then did not start. A
migration now names the secrets the destination lacks, by UUID or by
usage, and is refused before anything changes, as it is for networks.
2026-11-12 16:17:21 +03:00
catborise
b7724928fd fix(virtsecrets): a secret in use is not deleted by its UUID in capitals
libvirt finds a secret by its UUID in capitals too, but its users were
looked up by the UUID as posted: a secret a VM's disk or a pool named
was deleted, and that VM or pool no longer started. They are now looked
up by the secret's own UUID.

A usage with a control character made the page fail (lxml refuses it in
XML text) and libvirt dropped a line break silently; the form refuses
both. An empty value set later showed libvirt's "value in
virSecretSetValue must not be NULL"; it is refused in words.
2026-11-12 16:17:21 +03:00
catborise
159049736d fix(instances): a VM of an architecture without firmware choices or PCI cards can be created
The create page shows no firmware choice for an architecture whose host
offers none, yet the form required one, so such a VM could never be
created from the page. The firmware is now optional there: the machine's
own is used, as the job and the API already did.

s390x machines have no PCI bus for the emulated network cards (e1000,
e1000e, rtl8139), yet the create page and the VM's network tab offered
them for every architecture. They now offer default and virtio there,
and a create job refuses a card model the VM's architecture cannot have.
2026-11-12 15:21:48 +03:00
catborise
3bd519c935 fix(appsettings): settings that new VMs and clones cannot use are refused
Disk I/O native was saved with a disk cache other than none or
directsync; libvirt refuses such a disk ("io='native' needs either no
disk cache or directsync cache mode"), so every new VM failed. The pair
is now checked together when either is saved.

A clone name prefix with a space or another character a clone's name
cannot have was saved; every name the clone dialog then offered a user
who is not a superuser was refused, and they could not clone at all.
The prefix now takes letters, digits and '-' only.
2026-11-12 15:21:48 +03:00
catborise
d00f7d8841 fix(networks): the XML editor does not overwrite a change made meanwhile
The network and filter XML editors defined what they sent as a whole, so
a page opened before another admin's change (a QoS limit, a filter rule)
saved over it and the change was gone without a word. The editor now
sends a digest of the definition it showed, and a definition changed
since is refused with a reload hint.
2026-11-12 13:30:09 +03:00
catborise
534782fdda fix(networks): a network or interface in use is not stopped, and a new one is whole
An interface was stopped from the Interfaces page while running VMs had
cards on it, directly or through a network using it, and they were cut
off; a network in the same case was already refused. Stopping it is now
refused the same way, naming the VMs.

A new network whose autostart could not be set stayed defined and
running while the page said it failed; it is now stopped and undefined
like one that does not start, and a rollback that fails is said with the
first error. A network named "." or ".." is refused: its page address
was another page.

A VM create checks when it is asked and again when its job starts that
the host has the networks and the filter it names, and that no card is
left without a network: one deleted meanwhile, or an empty name in the
list, left a VM that does not start once its disks were made.
2026-11-12 13:30:09 +03:00
catborise
3308a75557 fix(instances): a VM's network cards name networks and filters its host has
libvirt saves a network card whose network or filter the host does not
have, and the VM then does not start: a card added or changed with an
unknown network (net:missing) or filter was saved and the page said the
card was changed. Adding or changing a card now refuses a network or
filter the host does not have; a stopped network is still the host's.

A migration defines the VM on the destination the same way: a shut-off
VM moved to a host without one of its networks or filters stayed there
unable to start. The migration now refuses such a destination before
anything changes.
2026-11-12 13:25:30 +03:00
catborise
a78d92e7aa fix(networks): a fixed address has a host name, a host address and is changed as shown
dnsmasq skips a fixed address whose name is not a host name ("bad DHCP
host name"): the VM got no fixed address while the page said it was set.
A name now has only letters, digits, '.', '_' and '-', as the dialog
already asks.

An IPv4 fixed address or DHCP range end may no longer be the subnet's
network or broadcast address.

The edit dialog sends the entry's MAC or DUID and name as the page showed
them; an entry another admin changed meanwhile is refused instead of being
changed back.
2026-11-12 13:25:30 +03:00
catborise
e264104e85 fix(computes): the Computes page reads its hosts side by side, within one wait
The page connected to its hosts one after another: each host that did not
answer added its connect timeout, so a few such hosts made the page take
half a minute, and a host that hung while answering held it until the
worker was killed. The hosts are now read on their own threads, and a host
not read within ten seconds is shown as not answering.
2026-11-12 09:19:23 +03:00
catborise
eb3bc69754 fix(computes): the compute forms save their own kind, a password as typed, and say when the host is not reached
The kind of a compute came from a hidden form field: posted as another
number it was saved, and the edit page of that compute failed. Each form
now saves its own kind. Passwords lost their leading and trailing spaces
on the forms and the API, so a SASL password with one never worked. A
host name whose last label is all digits, such as an IPv4 address with a
trailing dot, was taken and libvirt could not resolve it. A host saved with
a wrong password or not answering was saved silently; the page now says
why the panel cannot connect to it.
2026-11-12 09:19:15 +03:00
catborise
d682c4bc82 fix(computes): a changed compute does not use or list its old host
A compute saved with another address, login or password, or deleted, left
its connection open in the panel: saved back to the old credentials, the
panel used it again although the host no longer took them. A VM list that
read the host before such a change could then save that listing over the
VMs of the new one.

The old connection is retired when a compute's connection changes or the
compute is deleted, and a listing is saved only when the compute's
connection is still the one it was read with.
2026-11-12 09:19:03 +03:00
catborise
29ec20682b fix(computes): a libvirt host is one compute, and a compute's VMs stay on their host
One host could be added twice, under another name, as TCP and SSH, or by
another address: its VMs were listed once per record, each with its own
owners, and counted twice in the capacity totals. A compute with VMs could
also be pointed at another host: the owners of a VM then reached the
VM with the same UUID there, a restored or copied one.

A compute now keeps its libvirt host UUID. Adding a compute or changing
its connection, on the web or the API, connects and reads it: a host that
is already a compute is refused, and a compute with VMs moves only to an
address of the same host, which must answer. Computes added before are
read when another one is checked.
2026-11-12 09:19:03 +03:00
catborise
2db25314ea fix(instances): USB device changes as PCI ones; device refusals name no VM to owners
- A USB device added to or removed from a VM with a saved state applied
  only at the next cold boot: refused now, as for PCI devices, and the
  form says so.
- A USB hot plug or removal that failed half way said only libvirt's
  error: it now says where the device is, as for PCI devices
  (_hostdev_outcome, shared).
- A host device refusal (check_hostdevs) names the other VMs that have
  the device; users who do not see the hosts, such as an owner whose
  snapshot revert is refused, now read that a device is not free and that
  an administrator can see why.
- The host's USB devices named among a PCI device's host resources were
  English in every language.
2026-11-11 22:58:40 +03:00
catborise
d07362106a fix(instances): the XML editor and a VM defined from XML check its host devices
The Host devices tab checks a device before it gives it: no other VM has
it, the host does not use it, its IOMMU group can go along. The XML editor
and the define-from-XML form saved any <hostdev> unchecked. Both now run
the same check (check_hostdevs) on the definition saved, the editor when
the XML gives or changes host devices, so an edit of a VM whose device the
host lost since is not stopped. The editor holds the whole compute, as
the tab does, so two edits cannot give one device to two VMs.
2026-11-11 22:58:34 +03:00
catborise
a36ffcd3ba fix(instances): a VM starts only with host devices the host can give now
A device is checked when it is given to a VM, but a start later did not
check it again: a PCI device bound back to a host driver for the host's
own network or disks, or a USB device the host no longer has as named,
was taken from the host or failed in libvirt. Power On and Power Cycle now
check the definition the VM starts from (its saved state's when restored)
as a snapshot revert does, and refuse with the reasons; Power Cycle checks
before it stops the VM.
2026-11-11 22:58:34 +03:00
catborise
4045819b8d fix(instances): the Host devices tab says when the host cannot give a VM's USB device
libvirt does not start a VM whose USB device the host does not have as the
definition names it: a device replugged gets another address, and a second
device of a model makes a model-only name ambiguous. The tab said nothing
and the start failed with libvirt's words. The tab's form now says which
device the next start cannot have and what to do (usb_unmatched), and a
snapshot revert checks the same before it starts (check_hostdevs). The
add form posts the device's IDs with its address: a device replugged since
the page was loaded is not given in its place.
2026-11-11 22:58:34 +03:00
catborise
f0a9d2cf82 fix(vrtManager): a disk in an inactive pool keeps the files it may be made from
Only a running disk's definition has its backing chain; for the others the
in-use check reads it from the volumes of active pools. With such a disk's
overlay in an inactive pool (a stopped VM's, the next start's, a saved
state's or a snapshot's), its backing file counted as unused, so deleting
another VM with its disks, or the volume itself, could delete it. The check
now refuses (InUse) while a disk that is not running and not raw has its
file in an inactive pool, and says to start the pool. A snapshot delete
that is done reports no left-behind files then, rather than failing.
2026-11-11 15:21:49 +03:00
catborise
52bb6487a3 fix(instances): a VM list notices a change made while the page was read
The VM lists took the poll's first answer as what the page showed: a VM
started or stopped between the page's read and that answer kept its old
state and buttons until the next change. The page now carries the states
read before its rows, and the poll compares its first answer with them.
2026-11-11 15:17:59 +03:00
catborise
b7354df4f6 fix(instances): a failed power cycle says the VM stays off; templates have no autostart
Power Cycle forced the VM off and, when the start failed, showed only
libvirt's error: the page now also says the VM was forced off and stays
off, and the audit row says so. A template kept the autostart it had as a
VM, so the host started it although the panel refuses to: marking a
template turns autostart off, and autostart is refused on a template. The
autostart switch is disabled, with the reason, on a template and on a VM
that exists only while it runs (libvirt refuses autostart there).
2026-11-11 15:17:59 +03:00
catborise
dba2c2b1c2 fix(instances): a VM with a saved state says so and can start without it
A VM with a managed save image showed as plain Off; Power On restored the
saved memory and the panel had no way to boot it fresh or drop the saved
state. The power tab now says the VM has a saved state and offers Start
Without Saved State (confirmed), which boots it with
VIR_DOMAIN_START_FORCE_BOOT and so discards the image. Owners get it as
they get Power On; the audit row names it.
2026-11-11 15:17:59 +03:00
catborise
1957a5a85a fix(instances): memory, boot order and QoS edits check what they change first
Three edits went wrong on input or a state made outside the panel:

- A running VM's memory was set live, then for its next start. When the
  next start had a lower maximum (virsh --config), the live change was
  made and the second one failed. The maximum of the next start is now
  checked first.
- A boot order entry without its device type ("disk") raised an error
  page. It is now refused with a message.
- A QoS form of a NIC whose MAC changed since redefined the VM unchanged
  and said the QoS was set or deleted. It now says the NIC is not in the
  definition.

Turkish and Chinese texts included.
2026-11-11 12:55:34 +03:00
catborise
fce63996ba fix(instances): a refused vCPU resize keeps the VM's vCPU hotplug
With vCPU hotplug on, a resize defined the VM three times: without its
hotplug settings, with the new counts, with hotplug settings again. When
libvirt refused the new counts (a maximum over the machine type's limit),
the VM was left with hotplug switched off and an error.

The counts and the hotplug settings for them now go in one definition.
2026-11-11 12:55:34 +03:00
catborise
ad9c3ad99c fix(instances): a disk form loaded before the disk changed changes nothing
The Edit, Detach and Delete forms of a VM's disk name it by its device:
the view acted on whatever disk had that device by then. A form loaded
before a disk move, an external snapshot or another tab's change wrote the
old path back over the new one (the VM then starts from an old or deleted
file), or detached and deleted the volume that replaced it.

The forms already send the path they show. The views now refuse a disk
whose path is not that one, and tell the user to reload the page. Turkish
and Chinese texts included.
2026-11-11 12:55:34 +03:00
catborise
897c95a5bf fix(instances): a VM's saved state keeps the disks it starts with
A VM with a saved state (managed save, as libvirt-guests leaves VMs when
its host shuts down) shows as shut off, and its start restores the
definition it was saved with. The panel let the VM's Delete remove a disk
of it, and the storage pool delete a volume detached since: the VM then
did not start ("Cannot access storage file"), and the panel has no way to
drop the saved state.

A VM's Delete now refuses a disk while the VM has a saved state, and a
volume in a domain's saved state is in use for every delete check.
2026-11-11 12:55:34 +03:00
catborise
c968930b08 fix(instances): the Secure Boot machine type warning is in the user's language
A new VM with UEFI Secure Boot on a machine type other than q35 is made
on q35, and the create page says so. That warning was an English-only
string; it is now a translated message, with Turkish and Chinese texts.
2026-11-11 10:30:54 +03:00
catborise
47fcb9c7da fix(instances): a new VM cannot take the MAC address of another VM on its host
The create form and API took a MAC address for a new VM's NIC without
looking at the host's other VMs, so a VM could be defined with a MAC
another one has. Running on one network, neither NIC is reached reliably.
A clone already refused this among its own NICs.

The create now refuses a MAC a NIC of a VM on the host has, in any form
the field takes (case, colons), including a NIC added for a VM's next
boot only. The worker checks again before it defines the VM, since
another VM may take the address while the job is queued. Turkish and
Chinese texts included.
2026-11-11 10:30:54 +03:00
catborise
18d8c2a8f0 fix(instances): a create whose definition answer was lost keeps the VM's disk
A definition can go through on the host while its answer is lost, as when
the connection drops right then. The create job took every failed
definition for none and deleted the new disk and seed, so the VM could be
left defined without them, and recovery then reported it created.

The job now asks the host for the VM's UUID first. Only when the host says
there is no such VM do the new volumes go; otherwise they stay and recovery
decides, recording the VM it finds.
2026-11-11 10:30:54 +03:00
catborise
f53b41039d fix(instances): a volume already named as a new VM's disk refuses the create
A new disk or template copy whose name a volume of its pool already had
made the job fail on it; recovery then took that volume for the job's own,
ended the job uncertain and kept its claims, so no VM could be created on
that compute until an admin resolved it. Recovery also took a volume of the
same name in any other pool for the job's, and one in a stopped pool for
nothing left.

The form, the API and the worker now refuse a name a volume of the disk's
pool already has, as they did for a template copy's .img only. Recovery
looks in the job's own pools; one that is not running cannot be listed, so
recovery waits for it.
2026-11-11 10:30:54 +03:00
catborise
b06fa78191 fix(console): a VNC console whose access check fails is closed, not left unchecked
novncd checks every 10 seconds that an open VNC console's user may still
open it. An error in that check, such as a locked database, ended the
checking thread and left the session open for good, unchecked: a user
removed from the VM afterwards kept its console. The session now ends
with a warning in the log, as a serial console's worker does.
2026-11-10 19:01:21 +03:00
catborise
20706f295d fix(console): a console the server closes says Connection lost, not Disconnected
The VNC and serial pages showed "Disconnected", as if the user had ended
the session, when the VM stopped, was migrated or the console daemon
restarted: noVNC calls a close by the server clean, and the serial page
had a single text. "Disconnected" is now kept for the user's own
Disconnect; any other end of a working connection is "Connection lost"
(the serial terminal still prints the server's reason).
2026-11-10 19:01:21 +03:00
catborise
27e3bd608f fix(console): Reconnect after a migration opens the console on the VM's new compute
A console page's link names the compute the VM ran on. After a migration
moved the VM, the page's Reconnect asked for it there and got "User does
not have permission to access console or host/instance not exist". The
console page now sends the user to the VM's new compute when that is the
only VM with the UUID the user may open; others still get the same 403.
2026-11-10 18:58:05 +03:00
catborise
ad6ee7f67c fix(console): a serial console waits for its VM's start instead of closing
While a VM starts, libvirt shows it paused, reason "starting up", before
its devices are set up. The worker took that for a running VM, asked for
its console before the terminal existed ("PTY device is not yet assigned")
and closed, although it had just said that the console opens again when
the VM starts. A VM paused while starting up now counts as not running.
2026-11-10 18:57:20 +03:00
catborise
b251741a27 test(instances): the live create-from-template job names the template's pool
Since 8f09812b a new VM's template is taken from the pool the form names
(template_pool). That change updated the live view test but not the live
job test, which left template_pool out: the create job looked the
template up in a pool named '' and failed, on live runs only.
2026-11-10 16:39:42 +03:00
catborise
0a96ac155e docs(readme): a Docker update and rollback keep the TLS client certificates
Up to v4.3.0 the Docker image had no volume for /var/www/.pki, so TLS
client certificates put there lived in the container. The Docker update
recreates the container: following README "Updating" from v4.3.0 lost
them, and the TLS computes could not be reached. Checked with a v4.3.0
container holding a certificate and key.

The update now copies /var/www/.pki into the backup directory after the
old container stops (an empty one when an old container has none),
creates the new container without starting it, copies them in and
starts it; the start script gives them to www-data. The Docker rollback
puts them back the same way from the backup and gives them to www-data
itself: an image of v4.3.0 or older neither keeps them in a volume nor
fixes their owner at start.

Run from the README: update from v4.3.0 without .pki, with a certificate
and key, and master to master; then a rollback of the second to v4.3.0.
Each came up healthy, the key readable by www-data with mode 600.
2026-11-10 15:34:28 +03:00
catborise
26a769b987 fix(instances): a disk move or migration leaves one check on a stuck host
Whether a moved disk's old file is used elsewhere is asked of every
compute in a thread the job waits on for at most 60 s. A host that did
not answer kept that thread, and each later disk move or migration left
one more. As the VM delete's check does, a compute that does not answer
is not asked again: the file counts as used, so it is kept.

Both checks marked a compute as not answering from the moment they
asked it. A check beside another one (two jobs at once) took a healthy
compute that the other was asking for a stuck one, and refused at once;
and two overlapping checks could both ask a stuck one, the first to end
clearing the mark of the other. Each call to a compute now records when
it started, and a compute counts as not answering only while a call to
it has run for 60 s, checked again just before each compute is asked.

And a VM delete's check whose thread had not yet reached the first
compute when the 60 s ran out found no failure and no compute it was at,
and answered that no file was used: the disks could have been deleted
unchecked. It now counts as not answered.
2026-11-10 13:48:14 +03:00
catborise
003c2d5e57 fix(operations): a housekeeping pass is not started while one runs
The worker started housekeeping every 10 minutes on its control threads
whether or not the last pass had ended. A pass stuck on a host (the
cleanup of an idle upload on a host that does not answer) took one more
thread each time, and after four passes no control thread was left for
cancels and recovery. The next pass now starts only after the last one.
2026-11-10 13:48:14 +03:00
catborise
87ab20cd67 fix(logging): the web workers rotate the panel's log without losing lines
Every gunicorn worker had its own RotatingFileHandler on the panel's log.
Once one rotated it, the others went on writing into the renamed file and
rotated again in turn: the log then held the lines of one worker, and the
others' went into the old files and were deleted with them. The handler
is now concurrent-log-handler's, which rotates under a lock file and
reopens the log after another process rotated it.

That handler keeps no file open, so socketiod's copy of its stderr can be
fd 3, the number a serial console worker logs to: dup2 onto itself kept
it close-on-exec and the worker failed to start. It is made inheritable.
2026-11-10 13:48:14 +03:00
catborise
4cd4af30ee fix(computes): a VM gone from its compute gives no copy its owners
When a VM left its compute and its UUID was listed on another, its owners
moved there: an out-of-band move. With the UUID on two other computes,
the first record found got them, which may be an independent copy, giving
its owners another VM and charging their quota for it. The owners now
move only when one other compute lists the UUID; otherwise they are kept
on the Removed VMs page.
2026-11-10 13:19:39 +03:00
catborise
cdd724a19d fix(instances): the VM page's DRBD state does not rewrite the VM's record
With VM DRBD Status on, the VM page saved the whole record it had read
after waiting up to its ssh timeout for the host. A migration or delete
that finished meanwhile was undone: the record moved back to the old
compute, or came back without its owners. Only the DRBD state is written.
2026-11-10 13:19:39 +03:00
catborise
2c48e93780 fix(computes): a compute is not edited while a job on it is admitted
A job resolves its compute's connection when it runs. Changing the
compute's hostname meanwhile sent the job to another host, where a VM
with the same UUID (a copy) could be deleted or changed instead. An edit
now holds the compute as a delete does, and is refused while a job or VM
operation on it is admitted.
2026-11-10 13:19:39 +03:00
catborise
86c4cedfb3 fix(instances): an open VM page follows its VM's removal on the host
A VM undefined outside the panel (virsh, virt-manager) while its page was
open made the state and statistics polls answer 500 every 5 seconds, each
an error in the panel's log, and the page stayed as it was. A page read of
an object the host no longer has is now 404, and the VM page reloads on a
404 of its state: it then goes to the VM list with "no longer on its host",
or shows that the VM is not found.
2026-11-10 13:19:39 +03:00
catborise
57c380542c fix(instances): a VM name of any length libvirt takes is kept
libvirt names a VM by its <name>.xml file, so a name can have up to 251
bytes. The panel's VM, removed-VM and log records held 120 characters:
on PostgreSQL one longer name made the host's sync fail and the VM list
answer with an error. They now hold 255.
2026-11-10 13:11:22 +03:00
catborise
dabb7f4678 fix: worker warnings and CPU windows do not depend on a wall clock
The job panel warned "Worker unavailable" when the worker's last
heartbeat was more than 60 s older than the browser's clock: a browser
set two minutes ahead warned about a worker that had just beaten, and
one behind hid a worker that had stopped. The server now says whether
the worker is gone (worker_gone in the job panel's answer), by the same
rule as the Jobs page.

A host's CPU graph measured its averaging window with time.time(): a
clock set back between two polls gave a negative window. It now uses
time.monotonic(), as a VM's usage already does; a sample from before
the server restarted is measured over a second again.
2026-11-10 12:21:36 +03:00
catborise
84866cdf0d fix: backups and snapshots keep their order when the clock goes back
Backup retention kept the last --keep backups by name, and a name is the
panel's local time. Where the clock goes back an hour in autumn
(TIME_ZONE=Europe/Berlin), a backup at 02:10 CET forty minutes after one
at 02:50 CEST sorted first, and --keep 1 deleted the new one. Retention
now keeps the newest by when they were made (the directory's mtime);
the names stay as they were.

Snapshot times from libvirt (epoch seconds) became naive local times,
which the snapshot list sorts newest first: in the same hour the older
snapshot came first. They are now aware UTC times; the page still shows
them in the panel's time zone.
2026-11-10 12:21:36 +03:00
catborise
d06d4f90bb fix(ui): host and VM charts give their points the panel's time
A host's charts and their "Updated at" line took their times from
timezone.now(), which is UTC, while a VM's charts took time.strftime(),
the panel's time zone. With TIME_ZONE=Europe/Istanbul the same moment
read 09:00 on the host page and 12:00 on the VM page. Both now give the
panel's time.
2026-11-10 11:57:43 +03:00
catborise
3d5c73a892 fix(logs): the VM page's Logs tab shows times as the Logs page does
The Logs tab of a VM's Stats showed each row's time in UTC, formatted by
the process locale ("11/10/26 08:43:08" whatever the page's language),
while the Logs page shows the same row in the panel's time zone
("2026-11-10 11:43:08" with TIME_ZONE=Europe/Istanbul). The tab now
shows the panel's time in the Logs page's format, and its Date heading
names the zone as the Logs page's does.
2026-11-10 11:52:54 +03:00
catborise
e1921b6b5a fix(console): a VNC session ends when its host drops off the network
novncd connects to a VM's VNC server directly when it listens on a
reachable address, with no timeout once connected: a console may stay
quiet for long. When the network to the host dropped without a word,
nothing noticed it; the browser kept a frozen console and novncd its
proxy process until the user closed the tab or the kernel gave up after
many minutes.

The socket now has TCP keepalive (30 s idle, then 3 probes 10 s apart)
and TCP_USER_TIMEOUT (60 s for data left unanswered). Measured against
compute1 with the port's packets dropped: quiet and busy sockets both
ended after 61 s; a socket without these options still waited after
200 s. SSH-tunnelled consoles already have SSH's keepalive.
2026-11-10 11:12:21 +03:00
catborise
c2f75c94e7 fix(instances): the VM page says when its host stops answering
The VM page polls the VM's state every 5 s and reloads when it changes.
When the host stopped answering, the poll failed and nothing changed on
the page: it kept showing the last state, figures and actions as if they
were current. A notice now says that the page could not be refreshed and
may be out of date while the poll fails (a host that does not answer, a
session that ended); it goes away with the next answer. Checked on
compute1 in headless Chromium with its libvirt port dropped and restored.
2026-11-10 11:12:21 +03:00
catborise
fb7b209f7a fix(instances): the VM list survives a host that stops answering mid-request
The VM list reads each reachable host's CPUs and memory while it renders,
after it has found the host reachable. When the network to a host
dropped during that request, libvirt's keepalive closed the connection
in between, and the read raised: the whole list became the 500 error
page after about 40 s. Only the next load showed the host as down.

The host's CPU, memory and memory-use reads now give None for a host
that stopped answering; the list leaves its numbers out and the New VM
dialog does not offer it. Checked on compute1 with its libvirt port
dropped mid-request: the list answers 200.
2026-11-10 11:12:08 +03:00