That branch has been added so that developers can easily vendor in this new allocator for testing. If there are any problems with the new allocator, they can be discussed in the comments here.
When we're confident that the new allocator is no worse than the old one, we can merge this branch and delete it.
This branch and PR includes all of the commits in #2615, plus a new commit removing the old allocator. To view only the difference between this branch and #2615, see here: dperny/swarmkit-1@rewrite-allocator...docker:new-allocator. Please take care not to review on this PR changes that are in the other PR. I'm sorry for the trouble that might cause.
@@ Coverage Diff @@ ## master #2686 +/- ## ========================================= Coverage ? 62.19% ========================================= Files ? 136 Lines ? 21614 Branches ? 0 ========================================= Hits ? 13442 Misses ? 6820 Partials ? 1352
Rewrites the manager/allocator component to be more readable, documented, tested, and correct. The new allocator is tested with the Ginkgo BDD testing framework Allocator shares one set of errors across the whole implementation, defined in the manager/allocator/network/errors package Adds a new, more robust implementation of assigning ports. Tested with the ginkgo testing framework. Adds a subcomponent to the network allocator with the purpose of interfacing with the IPAM drivers and allocating IP addresses for swarmkit objects. Adds a subcomponent for the network allocator that has the responsibility of allocating network resources and driver state from network drivers. Adds the highest-level component charged with allocating network resources from from the underlying libraries. The network allocator provides an interface between the higher level swarmkit objects (services, tasks and nodes), and the lower level swarmkit objects (endpoints, attachments) that the lower level-allocator components operate on. Adds mocks, and the makefile rules to generate them. Readds a vendoring of the mocking library. Adds the top-level allocator component, (called NewAllocator while this PR is still WIP), which is the component that interacts with the store and event stream. Copies the tests from the old allocator, and starts adapting them to the new one. Changes some tests from the old allocator that fail because of assumptions that no longer hold. Adds prometheus metrics collection to the new allocator. Signed-off-by: Drew Erny <firstname.lastname@example.org>