Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.03] [manager/orchestrator/reaper] Fix the condition used for skipping over running tasks. #2724

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

thaJeztah
Copy link
Member

Cherry-pick of #2677 for the bump_v18.03 branch

git checkout -b 18.03-backport-reaper2 upstream/bump_v18.03
git cherry-pick -s -S -x 8c5d35342591be0f095678b71446867cd131ca98
git push -u origin

cherry-pick was clean; no conflicts

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).

…r running tasks.

Signed-off-by: Anshul Pundir <[email protected]>
(cherry picked from commit 8c5d353)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

ping @anshulpundir @cyli @dperny

@codecov
Copy link

codecov bot commented Aug 6, 2018

Codecov Report

Merging #2724 into bump_v18.03 will decrease coverage by 0.18%.
The diff coverage is 100%.

@@              Coverage Diff               @@
##           bump_v18.03   #2724      +/-   ##
==============================================
- Coverage        61.68%   61.5%   -0.19%     
==============================================
  Files              134     134              
  Lines            21827   21831       +4     
==============================================
- Hits             13465   13428      -37     
- Misses            6922    6950      +28     
- Partials          1440    1453      +13

@anshulpundir anshulpundir merged commit 18bd8d7 into moby:bump_v18.03 Aug 6, 2018
@thaJeztah thaJeztah deleted the 18.03-backport-reaper2 branch August 7, 2018 11:58
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.

2 participants