New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an ability to request libnetwork contact the network/IPAM plugin in a future time #843
Comments
@deitch Approach-3 doesn't work IMO because DHCP server can request the clients to refresh their leases anytime (e.g. https://tools.ietf.org/html/rfc3203). IMHO, polling is a bit cumbersome (too much noise for scalable setups) and inaccurate (poll interval can't be so low). |
@jainvipin good point! I wasn't thinking of DHCP server-driven changes. That might kill approach 3 (such a pity, I liked it :-) ), and approach 2 (polling) is cumbersome and non-scalable. |
@deitch :-) Async notification on other hand is less noisy, accurate, and puts the burden of dhcp subtelities to ipam driver (which is where it belongs). However async notification defies the convention... |
Given that, as you said, the DHCP (or any other address management) server can be async - server tells client "renew now even though it is not yet time," then async may be the best way. But it requires the docker engine in which the libnetwork runs to have a new external API, along with the auth/auth questions involved, and greatly complicates the IPAM driver. For a local driver, it is not quite as big a deal; but for a remote driver defined by a But even that isn't so clear-cut. A docker engine might be open only via UNIX socket |
Something along the lines you mentioned would work for me, but there are bigger implications of these approaches and must be weighed against the benefits by libnetwork maintainers:
I am thinking it would also be a good idea to enumerate if there are other cases where remote driver would need to communicate back to libnetwork async. If yes, async method may be a good long term thing. |
I think I agree. Over the long term, the idea that for some activities - start container, stop container, inspect container, list images, remove images, etc. - can all be done async via a remote API, but change/release a container's IP cannot is an artificial separation. The engine already recognizes that you need to be able to do async activities to containers, why not network/IPAM activities too? I think it is time for the libnetwork maintainers to jump in? |
@deitch It has been detected that this issue has not received any activity in over 6 months. Can you please let us know if it is still relevant:
Thank you! |
Cannot believe this issue is a year and 8 months old. Did this ever get addressed? |
Is there any work being done on this? This is pretty critical for some services and something that most other container systems support. |
Is this being looked at by anyone? Unbelievable that it's not possible to have containers run with macvlan driver receiving IP from an already existing DHCP server (not Docker IPAM). |
+1 for this request. |
+1. I'd like to virtualize a physical machine (that currently gets its address via DHCP) into a Docker container with macvlan networking (so that other machines on the network won't notice a difference). |
Has any development effort been put into a solution for this yet? |
The primary driver of this issue is DHCP. The libnetwork remote API (as far as I understood it) has it contacting a network/IPAM remote plugin when a container is created and when it is destroyed. But there are times when an IPAM driver may want to be contacted again between those events.
The only example I have right now is DHCP lease renewal, although I can imagine there would be others.
There are several possibilities:
The third option seems cleanest. It remains a libnetwork->plugin API, plugins do not need to keep track of where and how to contact a libnetwork to whom it gave an address, and communication occurs only when necessary.
The flow might look like this:
"check": 3600
field does not exist, then libnetwork works exactly as today: assign the IP and let it go.This is my first attempt. Thoughts?
The text was updated successfully, but these errors were encountered: