Skip to content
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

Refactor global portallocator and portmapper state #11709

Merged
merged 1 commit into from Mar 24, 2015

Conversation

paulbellamy
Copy link
Contributor

Continuation of: #11660, working on issue #11626.

Wrapped portmapper global state into a struct. Now portallocator and
portmapper have no global state (except configuration, and a default instance).

We had discussed storing the PortMapper in a global in daemon/networkdrvier/bridge/driver.go but unfortunately, that will break api/server/server.go:1539, and daemon/daemon.go:832, which both call the global portallocator directly. Fixing that would be a much bigger change, so for now, have postponed that.

Continuation of: moby#11660, working on issue moby#11626.

Wrapped portmapper global state into a struct. Now portallocator and
portmapper have no global state (except configuration, and a default
instance).

Unfortunately, removing the global default instances will break
```api/server/server.go:1539```, and ```daemon/daemon.go:832```, which
both call the global portallocator directly. Fixing that would be a much
bigger change, so for now, have postponed that.

Signed-off-by: Paul Bellamy <paul.a.bellamy@gmail.com>
@LK4D4
Copy link
Contributor

LK4D4 commented Mar 24, 2015

@paulbellamy Thanks! LGTM

@estesp
Copy link
Contributor

estesp commented Mar 24, 2015

LGTM

estesp added a commit that referenced this pull request Mar 24, 2015
Refactor global portallocator and portmapper state
@estesp estesp merged commit ce372cd into moby:master Mar 24, 2015
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.

None yet

4 participants