Skip to content

Report the limits the daemon actually applies - #333

Merged
athNdev merged 2 commits into
mainfrom
feat/resource-limits
Nov 4, 2026
Merged

athNdev merged 2 commits into
mainfrom
feat/resource-limits

Conversation

@athNdev

@athNdev athNdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Part of OSS-239.

  • RuntimeProfile.Limits records requested memory beside the applied memory, memory+swap, pids, CPU and writable-layer values. A limit the daemon will not apply reads as zero, so the panel never presents an ignored limit as enforced.
  • ApplyDiskQuota had no production caller and set storage-opt size on every container, including a read-only root that can never grow. It is now driven by the new storage.container_writable_mb setting and applied only when the root is writable.
  • The profile states plainly that a writable-layer cap is not a world quota: /data is a bind mount, so it is measured by the metrics collector and bounded only by the node filesystem or a volume quota. Recorded in knowledge/failures/known-gaps.md.
  • New warnings (never blockers): memory_limit_unset, swap_enabled, pids_limit_unset, writable_layer_unbounded, writable_layer_cap_ignored, storage_quota_is_not_a_world_quota.

Verified: go build ./..., go vet ./..., go test ./..., knowledge-lint 10/10.

The runtime profile now carries memory, memory+swap, pids, CPU and
writable-layer enforcement next to the requested memory. A limit the daemon
will not apply reads as zero, so an advertised limit is never reported as if
it were in effect.

ApplyDiskQuota had no caller: it set storage-opt size on every container,
where a read-only root can never grow. It is now wired to
storage.container_writable_mb and applied only when the root is writable.
The profile states that this cap is not a world quota, because /data is a
bind mount.

Warnings, never blockers: no memory limit, swap re-enabled, no pids limit, an
unbounded writable layer, a writable-layer cap that cannot take effect, and a
writable-layer cap presented as a world bound.

Refs OSS-239
staticcheck QF1008: container.Resources is embedded, so the selectors can
name Memory and MemorySwap directly.

Refs OSS-239
@athNdev
athNdev force-pushed the feat/resource-limits branch from b2e8d32 to c9a192f Compare November 4, 2026 01:43
@athNdev
athNdev merged commit 3b1008f into main Nov 4, 2026
21 of 22 checks passed
@athNdev
athNdev deleted the feat/resource-limits branch November 4, 2026 01:50
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