Vendoring libnetwork for the pluggable IPAM driver support#16910
Vendoring libnetwork for the pluggable IPAM driver support#16910abronan merged 3 commits intomoby:masterfrom
Conversation
|
ping @icecrime. I will push a follow up PR today with the UX options for ipam in |
|
(first) rebased on top of user-namespace support 🏃 |
2a29cb4 to
5c172d0
Compare
|
Added UX and API for the ipam configurations. with corresponding integration-cli tests. |
|
The ipam options in the UX demands some design explanation.
Prior to the new network UX, docker had just 1 network and that is the bridge network and the only way to configure it is via the daemon flags as mentioned above. Now that we have multiple networks that are created by the user and backed by different plugins, we generalized it in the IPAM configuration via the above options. For backward compatibility reasons we mapped the older daemon options to the new IPAM configurations for docker0 bridge and hence the existing configurations are not impacted. For the new networks created by |
eb6f865 to
0f6155d
Compare
|
Tested network creates/subnet/connects along with loading external driver default IPAM |
|
What's the plan for documentation? |
|
@tomdee the networking docs are being completely overhauled as part of https://github.com/moxiegirl/docker/tree/new-networking-docs. No point adding it now and changing it shortly after. But, we are adding developer docs to the remote driver APIs in libnetwork project just like we have for remote network driver. thanks for opening moby/libnetwork#635 |
|
Cool, so IPAM will be covered in https://github.com/moxiegirl/docker/tree/new-networking-docs too? That sounds like a good plan. I'm having some issues with this branch when running with a remote driver. I'm starting the daemon with Then I try to create a network and it fails The daemon outputs Let me know if you'd like me to raise this as a separate issue. |
|
@tomdee yes. the docs will be part of that effort. The error message is originated from the calico driver. it is not a libnetwork issue. |
|
I've worked with @Madhu on IRC and identified a few issues here. The problem I was hitting had nothing to do with the Calico driver. I could repro them all with the overlay driver.
I'm going to continue testing using --cluster-store with |
api/client/network.go
Outdated
There was a problem hiding this comment.
Auxiliary IPv4 or IPv6 also: network driver lowercase
01d1bf8 to
cc6aece
Compare
There was a problem hiding this comment.
@mavenugo shouldn't it break here? If so, you could do:
if ok {
if Data[s].IPRange != "" {
...
}
...
match = true
break
}There was a problem hiding this comment.
Since we support multiple subnet, ipranges, there cannot be multiple matches. Hence we should not break on the first match. All we are looking for is 1 exact match.
|
can you make sure that any tests you added will not be run on lxc, so |
|
It's green, LGTM (not dismissing Jess' previous comment, but just to say: I'm ok merging this). |
|
ok ill fix the tests after if they need it :P (not being sarcastic im in the middle of doing this now for other things ) |
|
LGTM |
Vendoring libnetwork for the pluggable IPAM driver support
|
@tiborvass think those are the changes in cc6aece, thus Also, /cc @sdurrheimer for zsh completions 👍 |
|
@thaJeztah Will do as soon as possible |
|
I'll take care of bash completion, thanks for pinging me. |
|
Thanks both! |
This commit brings the backend support for
All UT and IT for these backend features are in libnetwork project.
integration-cli updated with UX and API changes in docker.
(moved docker_cli_network_test.go to be !windows due to the usage of plugins).