[17.06] allocator: Retry failed allocations immediately upon a deallocation#2642
Conversation
|
Please sign your commits following these rules: $ git clone -b "17.06-retry-failed-allocations" git@github.com:nishanttotla/swarmkit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842357627600
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
c5cd758 to
1ea785b
Compare
1ea785b to
97dcb69
Compare
Codecov Report
@@ Coverage Diff @@
## bump_v17.06 #2642 +/- ##
==============================================
Coverage ? 61.22%
==============================================
Files ? 120
Lines ? 20055
Branches ? 0
==============================================
Hits ? 12279
Misses ? 6434
Partials ? 1342 |
|
I think one more change is missing from the original PR: https://github.com/docker/swarmkit/pull/2235/files#diff-119d353212583d96a59cba8c82b80280R656 |
|
I also don't know enough about the old allocator code - there are a couple more places where committing we attempt to roll back an allocation because a commit failed (at https://github.com/nishanttotla/swarmkit/blob/97dcb699cf732d0d2816a57a2d777b0f5f59fd14/manager/allocator/network.go#L816 for example) - do we need to add |
97dcb69 to
f10289d
Compare
|
Rebased on #2643 to fix tests. |
|
@dperny do you have any thoughts about @cyli's comment regarding your new allocator?
I meant to say |
|
@nishanttotla Oops, sorry, I mistyped. It was |
|
Current failure seems like it's #2577. Ping @anshulpundir |
We retry failed allocations every 5 minutes. If something else gets deallocated, we should trigger the retry immediately in case the allocations were failing due to IP exhaustion, and the deallocation freed up an IP. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com> (cherry picked from commit e913523) Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
f10289d to
7565865
Compare
Cherry pick #2235.
Cherry-pick was not clean.