Skip to content

fix(daemon): the last container that stops takes its load along - #625

Merged
7schmiede merged 1 commit into
mainfrom
fix/usage-stale-containers
Nov 24, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/usage-stale-containers

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

A stack whose containers had all stopped still showed their memory: a group
read 4.5 GB and the lane card 4.7 GB after down of the main tree, although
status listed no running container. The lane's estimate for the pool
counted the same stale numbers.

Cause: Sampler::sample_containers returned early when no container ran,
before unmeasured marked the stopped ones idle. With one container left
running the reset happened; only the last one to stop kept its load.

Fix: no early return. Docker::stats with no names runs no docker
call, so nothing is spent. The handling of a measurement moved into
record_docker so it can be tested without Docker.

Bug class early-return-skips-reset
Red the_last_container_that_stops_takes_its_load_along failed without the fix at "the last one stopped" (1 GiB left instead of 0)
In a stack a probe stack with one container and one native service, the container stopped with docker stop: devstack 0.53.0 still reported 1.7 MB, this build 0
Siblings the node's docker stats calls (laneinfra.rs, runs.rs) compute each round afresh and keep no state: nothing to fix

No review card: no card category is touched.

🤖 Generated with Claude Code

When no container ran any more, the container sampler returned before it
marked the stopped ones idle, so their last load stayed: a group and the
lane card showed gigabytes after `down`, and the lane's estimate for the
pool counted them. `docker stats` with no names runs nothing, so the round
now always ends with the stopped containers idle.

Bug-Class: early-return-skips-reset
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 7480b68 into main Nov 24, 2026
14 checks passed
@7schmiede
7schmiede deleted the fix/usage-stale-containers branch November 24, 2026 11:51
@7schmiede 7schmiede mentioned this pull request Nov 26, 2026
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