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

allocator: Update unallocatedServices properly after service updates #2020

Merged
merged 1 commit into from
Mar 9, 2017

Conversation

aaronlehmann
Copy link
Collaborator

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

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 <[email protected]>
@codecov
Copy link

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
Copy link

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
Copy link

aboch commented Mar 8, 2017

Looks good to me

@aluzzardi
Copy link
Member

LGTM

@aaronlehmann aaronlehmann merged commit a2d9b0b into moby:master Mar 9, 2017
@aaronlehmann aaronlehmann deleted the update-unallocated-items branch March 9, 2017 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants