Restore LXC memory fallback to the cluster-resources listing

Real PVE guest RRD responses carry only the cache-inclusive mem/maxmem
columns; the cache-aware memused/memavailable columns exist only in node
RRD, so the LXC RRD branches can never match a live response. Removing
the cluster-resources fallback in bf67ba920 therefore left every running
LXC reporting unavailable memory, rendered as 0% (#1634).

Running containers now fall back to the listing value under the
low-trust cluster-resources source when cache-aware RRD evidence is
absent; unavailable remains reserved for running containers with no
listing evidence at all.

Fixes #1634

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
courtmanr@gmail.com 2026-07-27 17:12:24 +01:00
parent f45c08902e
commit 7d7d2b6a3b
4 changed files with 167 additions and 4 deletions

View file

@ -1877,8 +1877,15 @@ being mistaken for an absent field.
Node RRD fallback caches must key on `(instance, node)`, just as guest RRD and
guest-agent caches key on `(instance, node, vmid)`, so identically named nodes
in different Proxmox instances cannot exchange memory evidence.
Running LXC cluster-resource memory is cache-inclusive and therefore cannot be
used as live usage when both RRD `memavailable` and `memused` are absent.
Running LXC memory acknowledges a Proxmox API reality: guest RRD responses
carry only cache-inclusive `mem`/`maxmem` columns — the cache-aware
`memavailable`/`memused` columns exist only in node RRD — so cache-aware LXC
evidence is structurally absent from the guest RRD endpoint. When the
cache-aware RRD branches do not match, a running container with a non-zero
cluster-resource listing value must fall back to that cache-inclusive value
under the low-trust `cluster-resources` source rather than reporting the
guest unavailable; `unavailable` is reserved for running containers with no
listing evidence at all (#1634).
Unified Linux and Docker agent ingest likewise must not repair a missing used
value from total minus free alone; it may use an explicit used/percentage or
complete free-plus-cache evidence. In every collector, known capacity with no