[v17.06.5] Cherry-pick "Fix task reaper not cleaning up COMPLETE tasks"#2475
Merged
stevvooe merged 1 commit intoDec 19, 2017
Merged
Conversation
Tasks in the complete state were not cleaned up because the task reaper was only looking at task.Status.State >= api.TaskStateShutdown, but the COMPLETE state (api.TaskStateCompleted) is the actual "first" terminal state. Added a test for the initialization stage of the task repear. This runs the logic of which tasks to clean up through its paces, but doesn't test the run-time logic of the task reaper (it's ability to respond to updates to tasks). Cherry-pick of moby#2473 Cherry pick does not apply cleanly. In addition, cherry pick requires changes to `manager/orchestrator/taskreaper/task_reaper_test.go`, because of a difference in the API of the task reaper. (cherry picked from commit e5b3107) Signed-off-by: Drew Erny <drew.erny@docker.com>
Contributor
|
LGTM |
Codecov Report
@@ Coverage Diff @@
## bump_v17.06.5 #2475 +/- ##
=================================================
- Coverage 64.5% 60.74% -3.77%
=================================================
Files 59 121 +62
Lines 8762 20124 +11362
=================================================
+ Hits 5652 12224 +6572
- Misses 2534 6552 +4018
- Partials 576 1348 +772 |
anshulpundir
approved these changes
Dec 19, 2017
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.
Tasks in the complete state were not cleaned up because the task reaper
was only looking at task.Status.State >= api.TaskStateShutdown, but the
COMPLETE state (api.TaskStateCompleted) is the actual "first" terminal
state.
Added a test for the initialization stage of the task repear. This runs
the logic of which tasks to clean up through its paces, but doesn't test
the run-time logic of the task reaper (it's ability to respond to
updates to tasks).
Cherry-pick of #2473
Cherry pick does not apply cleanly. In addition, cherry pick requires
changes to
manager/orchestrator/taskreaper/task_reaper_test.go,because of a difference in the API of the task reaper.
(cherry picked from commit e5b3107)
Signed-off-by: Drew Erny drew.erny@docker.com