Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[manager/orchestrator/reaper] Fix the condition used for skipping over running tasks #2677
Addresses the following from #2672 (comment):
The previous logic for skipping over running tasks in tick() was:
if desired=running AND state <= running then don't delete else delete
For example, if a task is (desired=complete, state=running) then this code will delete it from SwarmKit, causing SwarmKit to believe that its resources are no longer in use, which is not correct.
This fixes the logic to ignore tasks which are running (including tasks which are desired to be shutdown), or which are desired to be running (desired state running).
@@ Coverage Diff @@ ## master #2677 +/- ## ========================================== + Coverage 61.99% 62.25% +0.26% ========================================== Files 134 134 Lines 21771 21746 -25 ========================================== + Hits 13496 13539 +43 + Misses 6818 6750 -68 Partials 1457 1457