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
Local alias support #19229
Local alias support #19229
Conversation
@calavera @icecrime @thaJeztah I have temporarily included the engine-api vendoring commit in this PR to help CI succeed. I will rebase this PR once we have an officially vendored in the engine-api dependency. It would be great if we can have the docker/docker side changes & docs reviewed in parallel. |
Desgin makes sense to me, LGTM 😉 |
Originally was thinking links on connect was odd, but I guess it's the only way to actually link to other containers when it's not the primary network.... What's the behavior when on an overlay network and the containers are on separate hosts? |
@cpuguy83 it will work just as in bridge network. As explained in the proposal, links in non-default networks will be used as aliases and hence it has no static dependencies with the presence of linked container at the time of launch. when the linked container comes up at a later time, the container name will be propagated using the usual Service Discovery mechanisms and the alias is resolved via DNS.
Thats correct. Also it will avoid any confusions between the usage of links in |
to sum up my understanding: design +1 |
design +1 here as well, moving to code review |
This brings in the container-local alias functionality for containers connected to u ser-defined networks. Signed-off-by: Madhu Venugopal <madhu@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
@tiborvass @cpuguy83 @vdemeester rebased on top of engine-api v0.2.1. |
My only comment is... can we merge |
LGTM |
@cpuguy83 i would like to keep them in different test-cases (though some of it are repeating), especially because I would like to treat the restart case as important one to highlight and manage instead of adding multiple important cases in the same test case. |
LGTM |
`legacy link` in default `bridge` network and the new `link` functionality in user defined | ||
networks. The `legacy link` is static in nature and it hard-binds the container with the | ||
alias and it doesnt tolerate linked container restarts. While the new `link` functionality | ||
in user defined networks are dynamic in nature and supports linked container restarts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user-defined
Alright I briefly discussed with @moxiegirl; we will need a more extensive review on the docs changes that are needed for the "new" We should probably check all occurrences of |
So, based on my previous comment, LGTM (for now) |
ping @albers new |
when I am using the --link option it still puts the container on the same host as the container it links to as before. how to I use the aliasing across hosts in a way that will allow me to launch my container on another host in swarm and still use the alias. can you specify an example please? |
@hackndoes are you creating a network with PTAL : https://docs.docker.com/engine/userguide/networking/get-started-overlay/ |
@hackndoes it needs to be fixed in swarm: docker-archive/classicswarm#1811 For now you can either disable that filter (but I believe that will also disable |
This PR brings in the required changes to support the
local scoped provider alias
proposal in #18699.As discussed in the proposal : #18699 (comment), we will reuse
--link
for this purpose.We will have another PR to address the
Network scoped alias
functionality proposed in #18699.