Pulse/internal/models
rcourtman a53de0fc53 Surface unified-agent filesystems in linked VM/container Overview
The qemu-guest-agent's get-fsinfo cannot reliably report ZFS mounts on
some guest configurations (notably Proxmox Backup Server), so VMs that
have ZFS-formatted partitions show only their EXT4 root and datastore
in the VM Overview FILESYSTEMS card while the much larger ZFS dataset
holding the actual backups is missing entirely (Fixes #1438).

The unified pulse-agent running inside the same guest already has
direct OS-level visibility into every mounted filesystem, including
ZFS, and Pulse already knows the link between the host agent and its
guest via Host.LinkedVMID / Host.LinkedContainerID (set in
findLinkedProxmoxEntity by hostname match).

GetState now calls StateSnapshot.MergeLinkedHostDisksIntoGuests after
producing the snapshot. For each Host with a linked VM or container,
that helper:

  1. appends host-agent disks to the guest's Disks slice, deduped by
     mountpoint (qemu-guest-agent entries take precedence so we don't
     overwrite per-VM-perspective values), and
  2. updates the guest's aggregate Disk.{Total,Used,Free,Usage} to
     include the newly-added partitions so the row total stays
     consistent with the partitions visible in the FILESYSTEMS card.

The merge runs on a defensive copy of the disks slice to avoid
mutating the underlying State slice that GetSnapshot shallow-copies.
Tests cover the happy path (PBS-shaped fixture mirroring the issue
screenshots), the no-link no-op, container linking, empty-mountpoint
filtering, and the slice-isolation invariant.
2026-04-30 11:24:47 +01:00
..
concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
converters.go Fix ZFS pool attachment in storage frontend (discussion #1351) 2026-03-27 14:59:52 +00:00
converters_additional_test.go test: expand backend coverage 2026-01-25 21:08:44 +00:00
converters_test.go Fix ZFS pool attachment in storage frontend (discussion #1351) 2026-03-27 14:59:52 +00:00
disk_summary.go Prefer linked host disk metrics for v5 Proxmox nodes 2026-03-25 16:54:00 +00:00
disk_summary_test.go Prefer linked host disk metrics for v5 Proxmox nodes 2026-03-25 16:54:00 +00:00
host_vendor_raid.go Normalize vendor-managed NAS RAID arrays 2026-04-12 22:20:04 +01:00
models.go Use /proc/mdstat operation type to gate RAID rebuilding alerts 2026-04-30 10:37:47 +01:00
models_frontend.go Fix ZFS pool attachment in storage frontend (discussion #1351) 2026-03-27 14:59:52 +00:00
organization.go feat: add multi-tenant isolation foundation (disabled by default) 2026-01-23 21:42:27 +00:00
organization_additional_test.go test: expand backend coverage 2026-01-25 21:08:44 +00:00
profile_validation.go feat(profiles): add AI-assisted profile suggestions 2026-01-15 13:24:18 +00:00
profile_validation_additional_test.go test: expand backend coverage 2026-01-25 21:08:44 +00:00
profile_validation_test.go feat(profiles): add AI-assisted profile suggestions 2026-01-15 13:24:18 +00:00
profiles.go fix(agent): add FreeBSD platform support to agent download and UI (#1051) 2026-01-11 23:51:12 +00:00
state_additional_test.go Fix reload-driven PVE host linking consistency (#1269) 2026-03-26 09:01:23 +00:00
state_docker_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
state_host_test.go fix: prevent false PBS backup indicators when VMIDs collide across PVE instances (#1177) 2026-02-04 10:11:35 +00:00
state_snapshot.go Surface unified-agent filesystems in linked VM/container Overview 2026-04-30 11:24:47 +01:00
state_snapshot_merge_test.go Surface unified-agent filesystems in linked VM/container Overview 2026-04-30 11:24:47 +01:00