Repository navigation
Feature/replicas and media - #24
Merged
Merged
Conversation
added 9 commits
November 22, 2026 21:20
…ion at the bottom A replication target (a VM HyperCore keeps up to date from a source VM on another cluster) was shown as an ordinary stopped VM, mixed in with the real ones. HyperCore marks one with sourceVirDomainUUID; the collector now records it on the VM's inventory, and the VM list puts replicas in a Replicas section that always comes last, whatever the grouping, with a 'replica' badge instead of 'shutoff' and, when the user may see the source cluster in full, 'replica of <VM> on <cluster>' (4 languages, manual).
HyperCore keeps ISOs and uploaded disk images per cluster and knows nothing of tenants: every customer on a cluster saw every ISO and disk image in the New VM and VM edit dialogs. They now have an owner layer (config.media, migration 059): - an upload through HCM belongs to the uploader's highest layer that holds the new permission media.manage over that cluster (in the built-in Admin and Engineer roles); - what was on the cluster before, or came in another way, belongs to the top-level admins; - the owner layer sees an item, and below it within the same tenant (a customer's folders), never the layers above; an MSP's upload stays the MSP's until it assigns it to one of its own customers, down the cluster's branch; top-level admins see everything; - the owner layer (or the top) assigns and deletes. The backup service lists a cluster's media (with the VMs whose CD-ROM holds each ISO), streams an upload into it (an ISO is created, filled and made ready; a disk image becomes a VirtualDisk; a half-uploaded ISO is removed) and deletes one (not while it is inserted). The dashboard's /api/media routes apply the rules, and the VM edit and New VM dialogs only offer, and the server only accepts, media the user may see.
…k images Next to VMs, Nodes, VM performance and Cluster events, for whoever may use media on the selected cluster (media.manage, vm.create or vm.edit): the ISOs (with the VMs whose CD-ROM holds each) and disk images this user may see, their owner layer and who they are given to. Upload ISO / Upload disk image stream the file as it is read, with a progress bar per upload that survives refreshes, a cancel button, and a warning before leaving the page mid-upload. The owner layer (or the top) gives an item to layers down the cluster's branch and deletes it (typing its name). 4 languages. Also: the per-cluster tabs are checked again once the clusters are known (on a fresh sign-in the first check ran before a cluster was selected and hid the tab), and an unreachable backup service is a 503 on the media list, not a 500.
…angelog The Infraviewer chapter explains the Media tab (who owns, sees, gives and deletes an ISO or disk image) and the Replicas section; Settings names the new permission and that custom roles copied before do not have it; the installing chapter gives the nginx block uploads need (no body limit, no request buffering, a long read timeout); the changelog has an Unreleased entry.
…ormat Live on WDvCN11 (9.8): HyperCore converts an uploaded qcow2 (and vmdk, vhd) to its own SCRIBE format after receiving it. Meanwhile it lists the image as 'uploading-<name>', the upload request ends in a 502 from HyperCore's nginx or gets no answer at all, and the converted image has a new uuid. A raw .img is taken at once. The backup service now treats a 502/504 or a timeout after the whole body went out as 'accepted' when the image is on the cluster, waits up to 15 minutes for the converted image and answers 201 with its new uuid (202 'still converting' after that). The dashboard keeps the uploader's ownership under the file name until the converted image appears, and the Media tab shows a converting image to its owner as 'converting on the cluster' (deletable, not given away yet). The give-to dialog names each layer's level (an MSP and a customer can share a name).
…ated HyperCore requires a capacity for every new block device, CD-ROM drives included. New VM sent none for its CD-ROM, so a New VM with an ISO failed with 'One or more required properties missing: capacity' after the VM and its disks had been created (William, 2026-11-22); adding a CD-ROM drive in VM edit had the same fault. Both send capacity 0 now: the inserted ISO gives the drive its size. Verified on WDvCN11: a New VM with the Fedora ISO gets its CD-ROM with the ISO in it and the boot order set, and an empty drive can be added.
…n seconds A deleted VM stayed listed for minutes: the collector only noticed at its next poll, and the dashboard kept a VM until its last performance sample was older than the stale threshold. - the backup service sends a PostgreSQL notification (hcm_inventory, the cluster id) when a VM change set (delete, New VM, edit, power, clone, snapshot) or a restore finishes; - the collector listens for it and polls that cluster at once, and once more 5 s later; - the VM list keeps only the VMs of the newest inventory poll (one poll's points share one timestamp), so a deleted VM goes with the first poll that no longer lists it; - while a change set runs, the list refreshes every 4 s, and once more after it ends. Measured on WDvCN11: a new VM and a deleted VM show 0.3 to 1.2 s after their change finished.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Two features found while using 1.8.1 day to day, plus a fix and a speed-up:
One commit per change. The CHANGELOG has the full list under 1.9.0.
Replicas
HyperCore marks a replication target with
sourceVirDomainUUID. The collector records it, and the VM list shows replicas in their own Replicas section, always last whatever the grouping, with a replica badge instead of shutoff. When the user may see the source cluster in full, the line says replica of <VM> on <cluster>.Media management
HyperCore keeps ISOs and disk images per cluster and knows nothing of tenants: every customer on a cluster saw every ISO in the New VM and Edit dialogs. Now each item has an owner layer:
media.manage) over that cluster. That layer sees it, and a customer's or folder's upload is seen in its folders too. The layers above do not see it.There's a new Media tab in the Infraviewer. Upload ISO and Upload disk image stream the file from the browser through the dashboard and the backup service into the cluster, with a progress bar per upload.
HyperCore converts qcow2/vmdk/vhd(x) images to its own SCRIBE format after the upload. Meanwhile the image is listed as
uploading-<name>, the upload request may end in a 502 or get no answer, and the converted image gets a new uuid. HCM waits for the conversion and keeps the uploader's ownership.media.manageis in the built-in Admin and Engineer roles; migration 059 addsconfig.media.Fixes and speed
One or more required properties missing: capacity): HyperCore wants a capacity for every new block device, CD-ROM drives included. Adding a CD-ROM drive in VM edit had the same fault.Upgrade notes
client_max_body_size 0,proxy_request_buffering offand a longproxy_read_timeouton/api/media/upload. Installing and updating has the block.media.manageby themselves.Testing
python:3.12with onlytests/requirements.txt(as CI runs it).Known limitations