Skip to content

[17.06] orchestrator/update: Only shut down old tasks on success#2433

Merged
dperny merged 1 commit intomoby:bump_v17.06from
nishanttotla:only-shut-down-old-tasks-on-success-17.06
Nov 15, 2017
Merged

[17.06] orchestrator/update: Only shut down old tasks on success#2433
dperny merged 1 commit intomoby:bump_v17.06from
nishanttotla:only-shut-down-old-tasks-on-success-17.06

Conversation

@nishanttotla
Copy link
Copy Markdown
Contributor

Cherry-pick #2308.

git cherry-pick -s -x 6728c52055ba639312a293306cf58ce4be5d2aa6

Cherry-pick was clean.

@vieux
Copy link
Copy Markdown
Contributor

vieux commented Nov 7, 2017

@nishanttotla is the test failure related ?

@nishanttotla
Copy link
Copy Markdown
Contributor Author

@vieux I'm not sure, it looks like the test is flaky. I'll test it locally, we may have to restart the CI.

@nishanttotla
Copy link
Copy Markdown
Contributor Author

Test fails locally as well, it might be related to this change. I'll need to investigate that, because the test doesn't fail on master.

@nishanttotla
Copy link
Copy Markdown
Contributor Author

So I ran tests again locally and they don't fail. It might just be a flaky test 🤔 . Checked on the master branch too, the test file is identical there.

cc @aaronlehmann

@nishanttotla nishanttotla force-pushed the only-shut-down-old-tasks-on-success-17.06 branch from 56e0834 to 1f6c479 Compare November 10, 2017 00:08
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 10, 2017

Codecov Report

Merging #2433 into bump_v17.06 will increase coverage by 5.98%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##           bump_v17.06    #2433      +/-   ##
===============================================
+ Coverage        59.66%   65.65%   +5.98%     
===============================================
  Files              120       88      -32     
  Lines            25128    17133    -7995     
===============================================
- Hits             14993    11248    -3745     
+ Misses            8796     4956    -3840     
+ Partials          1339      929     -410

In start-then-stop mode, the updater waits for a verdict on the startup
of a new task, and then shuts down the tasks that this new task was
meant to replace. It should really only shut down the old task if the
new task successfully reached running. The thinking here was probably
that a task which fails on startup would briefly enter the running state
before failing, so there isn't much point in distinguishing between
running and some terminal state. However, if a health check is being
used, the task may never enter the running state. This can also happen
when a task is rejected by a node.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 6728c52)
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
@nishanttotla nishanttotla force-pushed the only-shut-down-old-tasks-on-success-17.06 branch from 1f6c479 to ca31e9f Compare November 10, 2017 00:08
@aaronlehmann
Copy link
Copy Markdown
Collaborator

I don't know what test failed originally. The one failing now doesn't seem like it can be related.

@nishanttotla nishanttotla requested a review from dperny November 13, 2017 19:20
@moby moby deleted a comment from rchourasia Nov 15, 2017
@dperny
Copy link
Copy Markdown
Collaborator

dperny commented Nov 15, 2017

i pulled down this PR and ran make ci locally, which seems to pass for me.

@dperny
Copy link
Copy Markdown
Collaborator

dperny commented Nov 15, 2017

LGTM

@dperny dperny merged commit 0752e98 into moby:bump_v17.06 Nov 15, 2017
@nishanttotla nishanttotla deleted the only-shut-down-old-tasks-on-success-17.06 branch November 15, 2017 18:16
@nishanttotla
Copy link
Copy Markdown
Contributor Author

Same as @dperny, tests passed locally for me, so the failing test is likely flaky on the CI.

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.

5 participants