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

allocator: Update unallocatedServices properly after service updates #2020

Merged
merged 1 commit into from Mar 9, 2017

Conversation

Projects
None yet
3 participants
@aaronlehmann
Collaborator

aaronlehmann commented Mar 8, 2017

If a service update caused the service to be successfully allocated, that service should be removed from unallocatedServices.

If the allocation was unsuccessful, unallocatedServices should be updated to contain the latest version of the service.

cc @alexmavr @yongtang @aboch

allocator: Update unallocatedServices properly after service updates
If a service update caused the service to be successfully allocated,
that service should be removed from unallocatedServices.

If the allocation was unsuccessful, unallocatedServices should be
updated to contain the latest version of the service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>

@aaronlehmann aaronlehmann added this to the 17.03.1 milestone Mar 8, 2017

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Mar 8, 2017

Codecov Report

Merging #2020 into master will increase coverage by 0.1%.
The diff coverage is 33.33%.

@@            Coverage Diff            @@
##           master    #2020     +/-   ##
=========================================
+ Coverage   53.66%   53.76%   +0.1%     
=========================================
  Files         109      109             
  Lines       18991    18994      +3     
=========================================
+ Hits        10191    10213     +22     
+ Misses       7578     7545     -33     
- Partials     1222     1236     +14

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4762bc...92e74a2. Read the comment docs.

codecov bot commented Mar 8, 2017

Codecov Report

Merging #2020 into master will increase coverage by 0.1%.
The diff coverage is 33.33%.

@@            Coverage Diff            @@
##           master    #2020     +/-   ##
=========================================
+ Coverage   53.66%   53.76%   +0.1%     
=========================================
  Files         109      109             
  Lines       18991    18994      +3     
=========================================
+ Hits        10191    10213     +22     
+ Misses       7578     7545     -33     
- Partials     1222     1236     +14

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4762bc...92e74a2. Read the comment docs.

@aboch

This comment has been minimized.

Show comment
Hide comment
@aboch

aboch Mar 8, 2017

This looks just right.

Initially I was thinking the call to procUnallocatedServices() in

case state.EventCommit:
 		...
 		a.procUnallocatedServices(ctx)

would eventually take care of updating the allocated/unallocated services map, but that is only for the services which need to be allocated and succeeds to be allocated at the time that event comes, as I was able to understand with @aaronlehmann offline.

aboch commented Mar 8, 2017

This looks just right.

Initially I was thinking the call to procUnallocatedServices() in

case state.EventCommit:
 		...
 		a.procUnallocatedServices(ctx)

would eventually take care of updating the allocated/unallocated services map, but that is only for the services which need to be allocated and succeeds to be allocated at the time that event comes, as I was able to understand with @aaronlehmann offline.

@aboch

This comment has been minimized.

Show comment
Hide comment
@aboch

aboch Mar 8, 2017

Looks good to me

aboch commented Mar 8, 2017

Looks good to me

@aluzzardi

This comment has been minimized.

Show comment
Hide comment
@aluzzardi

aluzzardi Mar 9, 2017

Contributor

LGTM

Contributor

aluzzardi commented Mar 9, 2017

LGTM

@aaronlehmann aaronlehmann merged commit a2d9b0b into docker:master Mar 9, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/project 53.76% (target 0%)
Details
dco-signed All commits are signed

@aaronlehmann aaronlehmann deleted the aaronlehmann:update-unallocated-items branch Mar 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment