plugins/ipam: round robin ip allocation for host-local ipam
authorMinhan Xia <Minhan.Xia@gmail.com>
Thu, 2 Jun 2016 18:37:05 +0000 (11:37 -0700)
committerStefan Junker <steveeJ@users.noreply.github.com>
Thu, 2 Jun 2016 18:37:05 +0000 (20:37 +0200)
commit2445a960a9aed231a1f9ebb932d254d9751cbaa1
tree90d66f88328c6725a2672cf1f3e2c4fda88fbfe1
parent5c3c17164270150467498a32c71436c7cd5501be
plugins/ipam: round robin ip allocation for host-local ipam

This changes the ip allocation logic to round robin. Before this, host-local IPAM searched for available IPs from start of subnet. Hence it tends to allocate IPs that had been used recently. This is not ideal since it may cause collisions.
plugins/ipam/host-local/allocator.go
plugins/ipam/host-local/allocator_test.go [new file with mode: 0644]
plugins/ipam/host-local/backend/disk/backend.go
plugins/ipam/host-local/backend/store.go
plugins/ipam/host-local/backend/testing/fake_store.go [new file with mode: 0644]
plugins/ipam/host-local/config.go
plugins/ipam/host-local/host_local_suite_test.go [new file with mode: 0644]
test