Skip to content

Add dummy proxy on port map #195

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

Merged
merged 1 commit into from
May 22, 2015
Merged

Add dummy proxy on port map #195

merged 1 commit into from
May 22, 2015

Conversation

LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented May 21, 2015

It is needed in cases when mapped port is already bound, or another
application bind mapped port. All this will be undetected because we use
iptables and not net.Listen.

@LK4D4
Copy link
Contributor Author

LK4D4 commented May 21, 2015

moby/moby#13024 for reference

@LK4D4
Copy link
Contributor Author

LK4D4 commented May 22, 2015

ping @aboch @mrjana
We need this in 1.7

@mrjana
Copy link
Contributor

mrjana commented May 22, 2015

@LK4D4 wouldn't this be solved if we start binding to ports when we allocate ports in port allocator? Once issue is the daemon host port is also allocated through the same api but in that we shouldn't bind the port because the daemon will start listening on it. But we can always provide another api like pa.RequestPortWithoutAlloc just for daemon case.

Right now the portallocator design is in such a way that it is not in sync with the OS. Which is a problem ...

@LK4D4
Copy link
Contributor Author

LK4D4 commented May 22, 2015

@mrjana It would, but now binding logic is in portmapper, so I thought it should be there. Also portallocator knows nothing about useProxy and I don't want to rewrite to release this feature.

@mrjana
Copy link
Contributor

mrjana commented May 22, 2015

@LK4D4 Ideally we don't need a proxy. Just a few more state in portallocator which holds the bind reference. But since this is urgent for 1.7 I am fine with the current design

@LK4D4
Copy link
Contributor Author

LK4D4 commented May 22, 2015

@mrjana Yeah, ideally :) But userland-proxy is still defaut :/

It is needed in cases when mapped port is already bound, or another
application bind mapped port. All this will be undetected because we use
iptables and not net.Listen.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
@LK4D4
Copy link
Contributor Author

LK4D4 commented May 22, 2015

@mrjana I decided to remove mutex at all, because there is no references to proxy until Start is called.

@mrjana
Copy link
Contributor

mrjana commented May 22, 2015

@LK4D4 LGTM

@mavenugo
Copy link
Contributor

Thanks guys. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants