Pulse/internal/hostagent
rcourtman bd20069c60
Some checks are pending
Build and Test / Secret Scan (push) Waiting to run
Build and Test / Frontend & Backend (push) Waiting to run
fix(disks): report authoritative disk size and namespace devpath from the host agent
On a Proxmox node, physical disks collected by the host agent were keyed by
the NVMe controller (e.g. "nvme0 [nvme]") instead of the namespace, reported
sizeBytes 0 (or a stale filesystem-usage value), and flickered as the agent
reading intermittently replaced the authoritative Proxmox disks/list reading.

Root causes:
- smartctl --scan-open reports NVMe disks by their controller char device
  (/dev/nvme0), and that scan label became the reported devPath.
- DiskSMART carried no capacity, so the server backfilled size by matching the
  SMART device against host filesystem-usage entries, which never match a whole
  partitioned/LVM/ZFS disk, leaving size 0.
- The unified-resource merge let the agent's controller label overwrite the
  canonical Proxmox /dev/... devPath.

Fixes:
- The agent now reports the canonical block device (an NVMe controller resolves
  to its namespace) and the authoritative capacity from /sys/block, with the
  smartctl user_capacity / nvme_total_capacity as a cross-platform fallback.
  Disks behind multiplexing controllers (megaraid, cciss, areca) keep their
  disambiguating label and smartctl-reported size.
- SizeBytes flows through the agent report, host model, and adapter; the
  filesystem-usage match is demoted to a legacy fallback.
- The merge keeps a canonical /dev/<device> devPath and never downgrades it to
  a scan label, so an un-updated agent can no longer corrupt Proxmox data.

Refs #1483.
2026-05-29 19:55:53 +01:00
..
agent.go fix(disks): report authoritative disk size and namespace devpath from the host agent 2026-05-29 19:55:53 +01:00
agent_bench_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_buffering_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_collection_test.go Harden unified agent runtime and installer 2026-04-23 23:04:18 +01:00
agent_flushbuffer_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_metrics_test.go Clarify storage topology and recovery guards 2026-05-14 20:51:32 +01:00
agent_new_test.go Bypass approval gate for trusted internal Discovery commands 2026-05-17 21:59:39 +01:00
agent_sensors_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_state_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
agent_test.go Clarify Pulse Agent host profile support 2026-05-07 22:28:24 +01:00
buffer_persist_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
ceph.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
ceph_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
cluster_sensors.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
cluster_sensors_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
collector_observability_test.go Hermeticize Linux SMART discovery tests 2026-04-09 21:28:37 +01:00
command_client_test.go Allow insecure dev HTTP agent runtime URLs 2026-04-23 13:48:54 +01:00
commands.go Bypass approval gate for trusted internal Discovery commands 2026-05-17 21:59:39 +01:00
commands_backoff_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
commands_connect_test.go Harden unified agent runtime and installer 2026-04-23 23:04:18 +01:00
commands_coverage_test.go Harden agent command and deploy trust boundaries 2026-04-21 23:50:34 +01:00
commands_deploy.go Allow insecure dev HTTP agent runtime URLs 2026-04-23 13:48:54 +01:00
commands_deploy_test.go Allow insecure dev HTTP agent runtime URLs 2026-04-23 13:48:54 +01:00
commands_execute_test.go Tighten unified agent hardening proof 2026-04-23 23:37:25 +01:00
commands_registration_test.go Require explicit websocket origin continuity 2026-04-22 04:46:13 +01:00
commands_test.go Harden agent command and deploy trust boundaries 2026-04-21 23:50:34 +01:00
enroll.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
enroll_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
hostagent_coverage_test.go Fix remaining RC3 backend CI races 2026-05-01 22:03:22 +01:00
mdadm.go Fix mdadm RAID fallback discovery 2026-05-05 09:29:34 +01:00
mdadm_test.go Fix mdadm RAID fallback discovery 2026-05-05 09:29:34 +01:00
mock_collector_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
network_helpers_test.go test: Add comprehensive test coverage across packages 2026-01-19 19:26:18 +00:00
os_identity.go Fix PVE version detection on agent hosts 2026-05-08 15:30:08 +01:00
proxmox_setup.go Harden runtime Proxmox token ACLs 2026-05-05 14:42:05 +01:00
proxmox_setup_network_coverage_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
proxmox_setup_test.go Harden runtime Proxmox token ACLs 2026-05-05 14:42:05 +01:00
send_report_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
smartctl.go fix(disks): report authoritative disk size and namespace devpath from the host agent 2026-05-29 19:55:53 +01:00
smartctl_coverage_test.go Hermeticize Linux SMART discovery tests 2026-04-09 21:28:37 +01:00
smartctl_size_test.go fix(disks): report authoritative disk size and namespace devpath from the host agent 2026-05-29 19:55:53 +01:00
smartctl_test.go Forward-port SMART collector hardening 2026-04-01 15:15:59 +01:00
sysinfo.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
sysinfo_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
unraid.go Clarify storage topology and recovery guards 2026-05-14 20:51:32 +01:00
unraid_test.go Clarify storage topology and recovery guards 2026-05-14 20:51:32 +01:00
version.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
zfs.go Surface ZFS pool membership on physical disks 2026-04-23 20:38:33 +01:00
zfs_test.go Surface ZFS pool membership on physical disks 2026-04-23 20:38:33 +01:00