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

[19.03 backport] Use Service Placement Constraints in Enforcer #2858

Merged

Conversation

dperny
Copy link
Collaborator

@dperny dperny commented May 20, 2019

Cherry-pick of #2857 to the 19.03 branch. Applies cleanly.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@thaJeztah thaJeztah changed the title Use Service Placement Constraints in Enforcer [19.03 backport] Use Service Placement Constraints in Enforcer May 20, 2019
@thaJeztah
Copy link
Member

Looks like we need a backport of #2853 as well before this will pass in CI

2019/05/20 16:23:52 Running time: 40.715899035s
Only in vendor/github.com/stretchr/testify: go.mod
Only in vendor/golang.org/x/crypto: go.mod

@dperny
Copy link
Collaborator Author

dperny commented May 20, 2019

vndr needs to be fixed before I can merge this...

This patch updates the ConstraintEnforcer to use the placement
constraints from the current service spec rather than the placement
constraints from the current task spec because they may be outdated
in some cases (e.g., when the service was previously updated to
modify placement constrainst but the node to which the task was
scheduled still satisfies the constraints. If the node is updated
in a way which causes it to no longer satisfy the new constraints
then the task should be removed even if it still would satisfy the
original task constraints).

Docker-DCO-1.1-Signed-off-by: Josh Hawn <[email protected]> (github: jlhawn)

(cherry picked from commit b39ccd7)
Signed-off-by: Drew Erny <[email protected]>
@dperny dperny force-pushed the bump_v19.03-update_constraint_enforcer branch from 33bdcba to 4390f67 Compare May 20, 2019 18:01
@codecov
Copy link

codecov bot commented May 20, 2019

Codecov Report

Merging #2858 into bump_v19.03 will increase coverage by <.01%.
The diff coverage is 85.71%.

@@               Coverage Diff               @@
##           bump_v19.03    #2858      +/-   ##
===============================================
+ Coverage        62.15%   62.16%   +<.01%     
===============================================
  Files              139      139              
  Lines            22315    22326      +11     
===============================================
+ Hits             13871    13878       +7     
- Misses            6963     6971       +8     
+ Partials          1481     1477       -4

@dperny dperny merged commit 48eb182 into moby:bump_v19.03 May 20, 2019
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.

3 participants