Repository navigation
fix(daemon): the last container that stops takes its load along - #625
Merged
Merged
Conversation
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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
downof the main tree, althoughstatuslisted no running container. The lane's estimate for the poolcounted the same stale numbers.
Cause:
Sampler::sample_containersreturned early when no container ran,before
unmeasuredmarked the stopped ones idle. With one container leftrunning the reset happened; only the last one to stop kept its load.
Fix: no early return.
Docker::statswith no names runs nodockercall, so nothing is spent. The handling of a measurement moved into
record_dockerso it can be tested without Docker.early-return-skips-resetthe_last_container_that_stops_takes_its_load_alongfailed without the fix at "the last one stopped" (1 GiB left instead of 0)docker stop: devstack 0.53.0 still reported 1.7 MB, this build 0docker statscalls (laneinfra.rs,runs.rs) compute each round afresh and keep no state: nothing to fixNo review card: no card category is touched.
🤖 Generated with Claude Code