address unassigned task leak when service is removed (v17.06 backport)#2708
Merged
Merged
Conversation
f3134f5 to
d52c09d
Compare
|
Please sign your commits following these rules: $ git clone -b "task_leak-v17.06" git@github.com:dani-docker/swarmkit.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
Codecov Report
@@ Coverage Diff @@
## bump_v17.06 #2708 +/- ##
===============================================
+ Coverage 57.72% 61.47% +3.75%
===============================================
Files 10 121 +111
Lines 1230 20203 +18973
===============================================
+ Hits 710 12420 +11710
- Misses 451 6423 +5972
- Partials 69 1360 +1291 |
Signed-off-by: Dani Louca <dani.louca@docker.com>
d52c09d to
c9a7751
Compare
anshulpundir
approved these changes
Jul 17, 2018
Member
|
@dani-docker was this cherry-picked or a different implementation as on master? If you did cherry-pick, could you use the |
Member
|
For future reference; PR against master was |
Contributor
Author
|
@thaJeztah was cherry picked but had to resolve conflicts |
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.
Signed-off-by: Dani Louca dani.louca@docker.com
- What I did
BACKPORT v17.06
If a task is not yet assigned (for ex:
noSuitableNode) and its service has been removed, the task stays in theunassignedTasksmap until a new leader election.- How I did it
Before re-adding the task to
unassignedTasksmap, the fix checks if the task has a valid service in the store.- How to test it
steps to repro:
ex:
docker service create -d --constraint 'node.labels.type == queue' alpine sleep 10000no suitable node available for task- Description for the changelog
Avoid a leak when a service with unassigned tasks is deleted