Skip to content

Exclude the Incus loop file from host disk free-percent - #393

Merged
rldyourmnd merged 2 commits into
mainfrom
fix/disk-percent-excludes-loop-file
Sep 3, 2026
Merged

Exclude the Incus loop file from host disk free-percent#393
rldyourmnd merged 2 commits into
mainfrom
fix/disk-percent-excludes-loop-file

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Why

Live members: 309 GiB root, 200 GiB fully allocated /var/lib/incus/disks/gha-lvm.img, thin pool data_percent ~21%. compute_root_disk_low used system_filesystem_usage on /, so it reported 17–18% free of the whole disk and paged every silence window.

That is the loop file, not tenant data. docs/maintenance-windows.md already says capacity alerts must not treat the apparent file size as live tenant data. Placement already uses the Incus thin pool.

Change

  • hostprobe free-percent excludes Incus *.img loop files on the same device
  • compute_root_disk_low reads gha_fleet_host_root_free_percent with threshold 20
  • Admission follows the same percent, so a full loop file no longer closes the host

Live check (before this lands)

host raw df thin data% usable (this PR)
gha-runner-1..4 22–24% free ~21% used ~67% free of remaining 109 GiB

compute_root_disk_low used the OTel root filesystem ratio, which counts the
200 GiB loop-backed thin pool as tenant-used space. With discards=nopassdown
that file stays fully allocated while pool data_percent is ~20%, so the
ticket fired at 17-18% free of the whole disk. Admission and the ticket now
use the observer percent of remaining host space; placement already reads
the thin pool.
internal/hostprobe is part of the provider derivative. Moving the loop-file
exclusion into internal/hostdisk and gha-fleet-observer lets the ticket use
the corrected percent without a provider release. Admission still uses raw
statvfs until the next provider identity.
@rldyourmnd
rldyourmnd force-pushed the fix/disk-percent-excludes-loop-file branch from 319d9b8 to f9a2752 Compare September 3, 2026 22:30
@rldyourmnd
rldyourmnd merged commit b82c099 into main Sep 3, 2026
10 checks passed
@rldyourmnd
rldyourmnd deleted the fix/disk-percent-excludes-loop-file branch September 3, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant