Skip to content

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

Merged
anshulpundir merged 1 commit into
moby:bump_v18.03from
thaJeztah:18.03-backport-reaper2
Aug 6, 2018
Merged

[18.03] [manager/orchestrator/reaper] Fix the condition used for skipping over running tasks.#2724
anshulpundir merged 1 commit into
moby:bump_v18.03from
thaJeztah:18.03-backport-reaper2

Conversation

@thaJeztah
Copy link
Copy Markdown
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 <anshul.pundir@docker.com>
(cherry picked from commit 8c5d353)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah requested review from anshulpundir and cyli August 6, 2018 13:19
@thaJeztah
Copy link
Copy Markdown
Member Author

ping @anshulpundir @cyli @dperny

@codecov
Copy link
Copy Markdown

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