mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-18 06:10:23 +00:00
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. |
||
|---|---|---|
| .. | ||
| concurrency_test.go | ||
| converters.go | ||
| converters_additional_test.go | ||
| converters_test.go | ||
| disk_summary.go | ||
| disk_summary_test.go | ||
| host_vendor_raid.go | ||
| models.go | ||
| models_frontend.go | ||
| organization.go | ||
| organization_additional_test.go | ||
| profile_validation.go | ||
| profile_validation_additional_test.go | ||
| profile_validation_test.go | ||
| profiles.go | ||
| state_additional_test.go | ||
| state_docker_test.go | ||
| state_host_test.go | ||
| state_snapshot.go | ||
| state_snapshot_merge_test.go | ||