Skip to content

constraintenforcer: ignore completed tasks in reservation accounting#3237

Open
lohitkolluri wants to merge 1 commit into
moby:masterfrom
lohitkolluri:lk/constraint-enforcer-ignore-completed-jobs
Open

constraintenforcer: ignore completed tasks in reservation accounting#3237
lohitkolluri wants to merge 1 commit into
moby:masterfrom
lohitkolluri:lk/constraint-enforcer-ignore-completed-jobs

Conversation

@lohitkolluri
Copy link
Copy Markdown

Summary

  • Fix constraint enforcer reservation accounting to ignore tasks that are already completed.
  • Prevents completed replicated-job task history from consuming node capacity and causing false rejections.

Test plan

  • go test ./manager/orchestrator/constraintenforcer -count=1

Fixes moby/moby#52652

Completed tasks (especially from replicated-job history) should not consume node reservations in the constraint enforcer.

Add a regression test covering completed job tasks.

Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
@lohitkolluri
Copy link
Copy Markdown
Author

lohitkolluri commented May 28, 2026

Quick sync note: this change is the upstream fix for the behavior reported in moby/moby#52652.
Once this is merged, I’ll follow up in moby/moby with the corresponding dependency update so the fix lands in Docker Engine.

@thaJeztah
Copy link
Copy Markdown
Member

@dperny care to have a look?

@lohitkolluri
Copy link
Copy Markdown
Author

@dperny Can you check it out and drop suggestions if any?

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.

Constraint enforcer counts completed ReplicatedJob tasks against node memory

2 participants