1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00
Commit graph

2485 commits

Author SHA1 Message Date
catborise
bda6826f76 test(i18n): Django loads each language's django.mo and returns its translations 2026-11-26 14:21:35 +03:00
catborise
ab70ea2a62 feat(vmbackups): a schedule shows how its last 14 days of backups went
The Schedules list marks each of the last 14 days by its worst run
(failed, skipped, running, backed up), the day's counts on hover. A
schedule's page opens with a grid of its VMs by day, each mark linking
to its job, and lists the runs that did not back up with their reason;
the settings form follows. A run's outcome now includes how its job
ended: before, every submitted run read "Backup job", a failed one too.
2026-11-26 14:21:35 +03:00
catborise
9809e5b79a feat(accounts): a password change card that continues the sign-in
The forced first-login change was a plain settings form under a menu
whose every link led back to it, asked for an "Old password" the user
did not know was the temporary one, and listed Django's four rules as
long sentences, with their refusals under the confirmation field.

The page is now a card like the sign-in page: "Set your own password",
signed in as whom and why, the temporary password named as such, and no
menu but a Log out link. A rule list under the two new entries ticks
what the browser can check (8 characters, not only digits, both entries
match) and says the rest is checked on save; the server's refusals
join that list. The eye button shows both new entries. A change chosen
from the profile uses the same card with the menu and a Cancel link.
base.html gets a navbar block for it. Turkish and Chinese texts.
2026-11-26 14:21:35 +03:00
catborise
40e3a7dfdd test(accounts): the first-login audit test leaves the checkout's admin password file
test_the_first_login_password_change made the last forced password
change with the real BASE_DIR, so the view deleted data/admin_password
of the checkout the tests ran in. It now runs under a temporary
BASE_DIR, as the other first-login tests do.
2026-11-26 14:21:35 +03:00
catborise
a47df0f7fc
Merge pull request #696 from catborise/upstream-xml-safety
fix(xml): no entity expansion in user XML; test regex in any case
2026-11-23 16:03:05 +03:00
catborise
3872eb1762 test(csp): the inline script check finds <SCRIPT> in any case 2026-11-23 15:55:19 +03:00
catborise
e88f568f6a fix(xml): read XML with its entities not expanded and nothing fetched
util.get_xml_path and the XML editor and "define from XML" pages parsed
the XML a superuser entered with lxml's default parser. lxml 6, which
the requirements ask for, does not load external entities by default,
but that was the library's default, not the panel's choice: with an
older lxml the same XML read a file of the panel's host into the VM's
name. util.xml_tree parses with resolve_entities=False and no_network,
as parse_xml already did, and the three places use it.
2026-11-23 15:55:19 +03:00
catborise
b7884d1ce8
Merge pull request #695 from catborise/upstream-docs
docs: a short README front page, pages under doc/, new screenshots, LICENSE
2026-11-23 15:10:05 +03:00
catborise
2d2861f063 docs(readme): screenshots of the panel as it looks now, and the Backups page
Taken from a fresh panel on a test host with example VMs, users, tags,
backups and a schedule: the VM list with tags and owners, the VM page,
Computes, the host overview, the new VM form, the Logs page with
actions of three users, and the Backups page.
2026-11-23 15:08:16 +03:00
catborise
e721101ab0 docs: headings and lists for scanning; LDAP examples per directory; behavior changes on their own page
The pages under doc/ are split where one paragraph or list item held
several topics, so a reader finds a step by its heading:

- install.md: what a re-run keeps and replaces as a list; first login
  and a lost password apart.
- compute-nodes.md: a heading per step and per connection type (SSH,
  TCP, TLS), the firewall rule first, the gstfsd network warning before
  its commands, the migration certificates as a list.
- configuration.md: commands in code blocks; local settings rules as a
  list; one place that says how to run manage.py; the proxy layouts
  apart; the health check its own heading. The security headers move to
  architecture.md.
- ldap.md: one complete example for Active Directory and one for
  OpenLDAP. Pasting the old page's blocks gave OpenLDAP values over the
  Active Directory ones.
- backups.md: panel and VM backups as two sections; VM backups by
  target, backup, restore, owners, schedules and verification.
- upgrading.md: a list of its paths, the supervisor move after the
  update it precedes, and the old settings.py rules as sub-items. The
  behavior changes move to behavior-changes.md.
- api.md: the token, job and error rules in one page; architecture.md
  links to it.
- permissions.md: template and console-setting rules under their own
  headings instead of inside the table.
- CONTRIBUTING.md: local, live KVM and Vagrant tests apart.

No command changed.
2026-11-23 15:08:16 +03:00
catborise
a261e42a40 docs(readme): a centered header with badges, a Mermaid diagram, grouped features
The header holds the name, one line on what the panel does, badges
(test and installer CI, Python, Django, QEMU/KVM, license) and links to
the main sections. The ASCII diagram is a Mermaid diagram that GitHub
draws in light and dark themes, with libvirt marked as the source of
truth. The features are grouped into hosts, virtual machines, users and
access, and operations.
2026-11-23 15:08:16 +03:00
catborise
70aac5187f Add the Apache License 2.0 text as LICENSE
The README has always named the Apache License 2.0, but the repository
had no license file, so GitHub showed none.
2026-11-23 15:08:16 +03:00
catborise
12fb8b345e docs: a short features list; manual installation folded per system
The README's features are one short line each. The installation page
lists the three ways to install with their systems, and each system's
manual steps are folded so a reader opens only theirs; the commands are
unchanged. The CI coverage moves to CONTRIBUTING.md, and moving gstfsd
off supervisor to the supervisor section of the upgrade guide.
2026-11-23 15:08:16 +03:00
catborise
a629b98f31 docs: split the README into pages under doc/ and CONTRIBUTING.md
The README had grown to 970 lines. It now keeps the introduction, the
features, a quick start, a table of the documentation pages, the
screenshots and the license. The sections moved without changes in
their text to doc/install.md, doc/compute-nodes.md, doc/configuration.md,
doc/ldap.md, doc/backups.md, doc/upgrading.md (with the behavior
changes), doc/api.md and CONTRIBUTING.md; links between them point at
the new pages. Code comments and installer messages that named a README
section name the page now.
2026-11-23 15:08:16 +03:00
catborise
6bfa163900
Merge pull request #694 from catborise/upstream-readme-video
README: a demo video from installation to a VM's first backup
2026-11-23 13:22:28 +03:00
catborise
c602b6cd72 docs(readme): the demo video under the introduction, with what it shows 2026-11-23 12:13:04 +03:00
catborise
adfee7336c Update README with project assets link
Added a link to the project assets in the README.
2026-11-23 12:10:30 +03:00
catborise
9a215a078c
Merge pull request #693 from catborise/upstream-old-libvirt
Install on Debian 12 and Ubuntu 22.04 again; the update test from v4.3.0's commit
2026-11-23 11:07:07 +03:00
catborise
c9ba28fc46 fix(instances): the fault reasons on the libvirt of Debian 12 and Ubuntu 22.04; the update test from v4.3.0's commit
instances.states named VIR_DOMAIN_PAUSED_API_ERROR, which python-libvirt 9.0
(Debian 12) and 8.0 (Ubuntu 22.04) do not have: an installation there failed
at its first manage.py migrate. That rare reason (libvirt paused the VM on an
API error) is no longer told; every other name exists in both.

The installer workflow's update jobs start from v4.3.0's commit, not its tag:
the tag is the fork's, and upstream's runs found no such commit.
2026-11-23 11:06:11 +03:00
catborise
a153c51888 fix(instances): the fault reasons on the libvirt of Debian 12 and Ubuntu 22.04; the update test from v4.3.0's commit
instances.states named VIR_DOMAIN_PAUSED_API_ERROR, which python-libvirt 9.0
(Debian 12) and 8.0 (Ubuntu 22.04) do not have: an installation there failed
at its first manage.py migrate. That rare reason (libvirt paused the VM on an
API error) is no longer told; every other name exists in both.

The installer workflow's update jobs start from v4.3.0's commit, not its tag:
the tag is the fork's, and upstream's runs found no such commit.
2026-11-23 10:45:09 +03:00
catborise
90c2bfe5b5
Merge pull request #692 from catborise/upstream-v5
VM backups, tags, host maintenance and Balance, alerts and one-command updates (fork v4.3.0 to v5.0.0 and after)
2026-11-23 10:40:08 +03:00
catborise
36635eb450 fix(instances): the API tells a VM's fault reason; doc/permissions.md as the code is
An authorization sweep of everything added since 2026-11-09 (tags, Balance,
maintenance, Bulk Migrate, volume download, protection, disk I/O limits,
crash action, bulk power/snapshot/tag, backup targets, schedules, verify and
restores, unlock and OTP reset) as a stranger, staff, a view_instances
auditor, a flagless owner and an owner with every flag found no gap.

- the VM details of the API carry state_reason when a fault put the VM in
  its state, as the VM page tells it: libvirt's state and reason codes of
  one read and the reason in the request's language; null otherwise. A
  script watching the API can tell a VM a full storage paused from one
  paused by hand, in any language
- the bulk actions name a refused VM to whoever sees it (a view_instances
  auditor too), and a bulk snapshot no longer tells one who does not see a
  VM that it is a template (_visible_vms, one filter for the three)
- doc/permissions.md: creating a VM and the VM report, host devices, video,
  RNG, TPM, the crash and hang action, disk I/O limits, disk moves and
  protection are a superuser's, so are verifying a backup, restoring one
  disk, backing up a template and the backup API; deleting a VM takes its
  disk files when chosen; notes on bulk actions, the Jobs page, the address
  search, API tokens and LDAP passwords
2026-11-23 08:15:25 +03:00
catborise
72f5c544ee docs(readme): a VM's fault reason and its crash and hang recovery 2026-11-22 23:18:45 +03:00
catborise
ede9e0bca7 feat(instances): a guest that crashes or hangs is restarted or stopped
The VM Settings "When the guest crashes" choice (on_crash, restart for new
VMs) never acted: a guest reports a crash through a panic device, and the
panel gave VMs none. A guest whose kernel panicked stayed "running" until
someone noticed.

- new VMs get the panic device the host offers (get_panic_model: x86 ISA
  pvpanic, which Linux has built in and Windows gets with virtio-win; the
  PCI one elsewhere; ISA on x86 when libvirt does not tell), and an x86
  machine without a watchdog of its own (not q35, which has the iTCO; not
  microvm, which has no PCI bus) an i6300esb
- choosing Restart or Stop adds the panic device to a VM without one, an
  i6300esb when it has no watchdog (libvirt before 9.1 shows no iTCO on
  q35), and gives its watchdogs the matching action (reset, poweroff): a
  guest that arms its watchdog and hangs is met as one that crashed. A VM
  without these devices shows no choice made and says it cannot report a
  crash or a hang yet. From the next start, as before

Checked live on a Vagrant host with a guest whose init exits (kernel panic):
without the device it stayed "running (booted)"; after Stop it ended
"shut off (crashed)", after Restart it booted again.
2026-11-22 22:04:04 +03:00
catborise
bdc5569cc8 feat(instances): a VM a fault stopped or paused says why
libvirt gives each state its reason; the panel showed only the state, so a
VM QEMU paused because its storage filled up read "Suspended" like one an
administrator paused.

- instances.states.REASONS: the fault reasons told (disk error, watchdog,
  guest crash or kernel panic, a crash of the guest or its QEMU process,
  libvirt stopping it after a restart, failed post-copy migration, libvirt
  error, failed start); the ordinary ones (user, migration, snapshot) are not
- the lists read the reason with the state in their one getAllDomainStats
  call (get_domain_rows, get_domain_states: a change of reason reloads a
  list) and show it under the state badge
- the VM page reads state and reason in one virDomainGetState (a reason
  means something only with its own state) and tells it in an alert; a VM
  paused by a disk error names each disk and what it met
  (virDomainGetDiskErrors), and when a storage has no free space, what to
  do: an administrator frees space and resumes it. Disk errors are read
  only then: libvirt keeps the last one after a resume. The page's poll
  reloads on a change of reason too

Checked live on a Vagrant host: a guest filling a disk on a 40 MiB pool was
paused (I/O error, vda: no space); the page said so, and after the pool grew
and the VM was resumed the alert was gone.
2026-11-22 21:19:35 +03:00
catborise
7408a575d6 fix(ui): sizes in the units the forms ask in, percentages as the language writes them
- binary_size filter (common_tags): every size on the pages is B/KiB/MiB/GiB/TiB
  with the language's decimal mark; Django's filesizeformat said GB for GiB, so a
  page showed "512,0 MB / 3,8 GB" beside "0,4 / 3,8 GiB" and a disk "20,0 GB"
  next to a GiB field
- percent filter and Intl percent in charts.js, the job panel and the new-VM
  dialog: 13% in English, %13 in Turkish (pages had "13 %", "%11" and "13%")
- the Jobs page and panel say in whole sentences that the job worker is not
  running and that jobs wait for it, instead of a sentence glued to a date
- job state badges start with a capital, as the VM state badges (CSS, so the
  label stays lowercase inside sentences)
- profile card shows the username under the name only when there is a full name
- Turkish: hostname, revert snapshot, snapshot count, API token and worker texts
2026-11-22 21:03:46 +03:00
catborise
50fa42181b fix(ui): the settings index stays at hand on a phone; one wording in Turkish
On a phone the settings page opened with its group index on seven lines, and
the index was gone once the page, nine screens long, was scrolled. Below the lg
breakpoint it is now one row that scrolls sideways and sticks under the navbar
(navbar_height.js gives what sticks the navbar's height, which differs between
themes and grows when the phone menu opens).

Turkish said "VM" in 65 messages and "sanal makine" everywhere else; it now
says "sanal makine" throughout. Headings and buttons that still capitalised
every word follow the panel's sentence case, in English too (Change password,
SSH keys, Power off, ...). Wrong translations fixed: a password that is set
read as the command "Ayarla", the firmware setting was called a chip type,
Create flavor said Create user, the console viewport setting was called a port,
a DRBD typo, and host and interface are sunucu and arabirim as on every page.
A group's save button reads "Kaydet: <group>".
2026-11-22 16:43:34 +03:00
catborise
a2da2ab394 fix(ui): a host's pages on a phone: one row of sections, tables that fit
On a phone the host's section menu wrapped to three lines, each new line
starting with a divider. It is now one row that scrolls sideways, with the
current section in sight (scroll_rows.js, which also takes over the VM page's
tab rows from instance_page.js).

The filter list, a filter's rules and the PCI and USB device tables were wider
than a phone and hid their actions and users off screen; on a phone they now
keep the name, the key column and the actions, as the other lists do.

The overview's live CPU and memory figures, the chart axes and tooltips, and
the VM page's stats now write numbers as the page's language does (a decimal
comma in Turkish), like the cards beside them.

The capacity cards said "0 bytes running"; they now say what they count:
"0 bytes in running VMs".

A pool's type is written as libvirt names it on both the list and its page,
and the device search sits where the interfaces search does.
2026-11-22 14:59:17 +03:00
catborise
701d9b1f0a fix(ui): a VM page on a phone opens on its tab, not under it
On a phone the VM card's facts, three rows of section buttons and up to three
rows of settings tabs pushed every tab's content below the first screen. Both
tab rows are now a single row that scrolls sideways, the chosen tab is kept in
sight, and the card's facts run inline below the lg breakpoint.

The Migrate tab of a VM that cannot be migrated shows only the reason, as Bulk
Migrate does, not an empty destination list and a disabled button.

The card's Refresh and OS details buttons are outlined, like the panel's other
secondary buttons; filled gray read as disabled in the united theme.
2026-11-22 13:04:18 +03:00
catborise
4881c3cd3e fix(ui): forms ask one thing at a time, offer the host's pools and say less twice
- A backup schedule asks Which VMs first (a compute's, chosen VMs or a
  tag's) and shows that one field only (policy_scope.js); the other two
  are not read, so a choice left in them is neither saved nor an error.
- A backup target's, a restore's and a disk restore's storage pool
  field offers the chosen compute's active file pools, the ones a
  restore copies into (a target's: directory and NFS only), from
  vmbackups.views.pools, which reads them without a refresh
  (pool_choices.js); a name can still be typed and is checked as before.
- A field's label is no longer repeated inside it as a placeholder, and
  a list's empty choice says Choose… instead of Django's dashes
  (webvirtcloud.bootstrap.FieldRenderer).
- The schedule, target, e-mail OTP and VM delete forms put Cancel and
  their main button at the right, as the other forms do.
2026-11-22 00:25:53 +03:00
catborise
7359fbb147 fix(accounts): a page whose session ended says so; a form sent then is not lost in a 405
A session that ended while a page was open went unnoticed: the VM list,
the VM page and the job panel kept asking, were sent to the sign-in
page, and showed what they had as if it were current. A button pressed
then sent the user to sign in and, after it, to the form's own address
by GET, where its view answered an empty 405 and the action was lost.

The panel's LoginRequiredMiddleware (webvirtcloud.middleware) answers a
page's script 401, upon which session_end.js says the user was signed
out, with a link to sign in and come back, and the page stops asking
and reloading. A form sent after the end (or with a token a sign-in
elsewhere replaced) goes back, after the sign-in, to the page it was on,
and the sign-in page says it was not done. accounts.E002 asks for this
middleware; Django's own is a warning (W002), so an update keeps a
panel whose local settings name it running.
2026-11-21 23:48:34 +03:00
catborise
2373d73b37 feat(ui): what a job, a tag or a backup names links to its page
- A job's page and the Jobs list link what the job works on: a VM's
  page for who may see the VM (not when a copy on another host has its
  UUID); a host's, a backup target's, or the Computes page for a bulk
  migration, for a superuser (operations.views.link_resources). A
  backup's or a pool's job has none: a restore names the new VM, and a
  pool may be gone.
- The Tags page's VM and host counts open the VM list or the Computes
  page with that tag only: a list with that tag takes ?tag=name, and
  the address loses it (the rest stays), so the list's own reload keeps
  what is chosen afterwards. The bulk bar sends back to the list's path.
- A Backups row links its target, and a removed VM's badge the Removed
  VMs page while the VM is listed there.
2026-11-21 23:22:09 +03:00
catborise
fb81e7adca fix(ui): a form being sent shows it on its button
A form sent to the server showed nothing until the answer came: its
button stayed as it was and took a second click, though creating a
volume or starting a pool can take seconds. The button that sent it now
turns a spinner and takes no second click meanwhile, and a page's reload
or a job's result waits (submit_busy.js on every page, poll.js
pageInUse). It is as before when the page stays: its leaving asked about
unsaved work, or the browser's history brings it back. A form a script
sends itself is left alone.

The please-wait dialog of the VM start and the XML create, and the
sign-in forms' own spinner, go: they show the same as every other form.
2026-11-21 21:31:21 +03:00
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