Skip to content

allocator: Update unallocatedServices properly after service updates#2020

Merged
aaronlehmann merged 1 commit intomoby:masterfrom
aaronlehmann:update-unallocated-items
Mar 9, 2017
Merged

allocator: Update unallocatedServices properly after service updates#2020
aaronlehmann merged 1 commit intomoby:masterfrom
aaronlehmann:update-unallocated-items

Conversation

@aaronlehmann
Copy link
Copy Markdown
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 <aaron.lehmann@docker.com>
@codecov
Copy link
Copy Markdown

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

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

aboch commented Mar 8, 2017

Looks good to me

@aluzzardi
Copy link
Copy Markdown
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