Skip to content

Convert code to use connectionbroker package - #1851

Merged
aaronlehmann merged 1 commit into
moby:masterfrom
aaronlehmann:use-connectionbroker
Jan 10, 2017
Merged

aaronlehmann merged 1 commit into
moby:masterfrom
aaronlehmann:use-connectionbroker

Conversation

@aaronlehmann

Copy link
Copy Markdown
Contributor

By using connectionbroker instead of using remotes directly, subsystems
like the agent can connect directly to the local manager when running on
a node that acts as a manager. This avoids the need for the manager to
expose a TCP port at all times.

@aaronlehmann

Copy link
Copy Markdown
Contributor Author

ping @cyli @dongluochen @LK4D4

Comment thread node/node.go
}
}(ready)
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the bit that all of this change was made to refactor out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes connections to the local manager use a unix socket or similar local connection (via connectionbroker) instead of connecting over TCP. As a consequence, this code, which finds the manager's IP address and adds it to the Remotes list to bootstrap Remotes, isn't necessary.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see.

@dperny

dperny commented Jan 9, 2017

Copy link
Copy Markdown
Collaborator

This all looks good to me.

@dongluochen

Copy link
Copy Markdown
Contributor

LGTM

Comment thread manager/manager.go Outdated
}),
)
if err != nil {
logger.WithError(err).Errorf("failed to connect to CA after locking the cluster")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say "failed to connect to local manager socket after locking the cluster"? The manager may not be a CA.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the message.

@cyli

cyli commented Jan 10, 2017

Copy link
Copy Markdown
Contributor

LGTM

By using connectionbroker instead of using remotes directly, subsystems
like the agent can connect directly to the local manager when running on
a node that acts as a manager. This avoids the need for the manager to
expose a TCP port at all times.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
@aaronlehmann
aaronlehmann merged commit 69ea950 into moby:master Jan 10, 2017
@aaronlehmann
aaronlehmann deleted the use-connectionbroker branch January 10, 2017 02:05
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.

4 participants