Convert code to use connectionbroker package#1851
Merged
aaronlehmann merged 1 commit intomoby:masterfrom Jan 10, 2017
Merged
Conversation
Collaborator
Author
|
ping @cyli @dongluochen @LK4D4 |
6 tasks
dperny
reviewed
Jan 9, 2017
| } | ||
| }(ready) | ||
| } | ||
|
|
Collaborator
There was a problem hiding this comment.
is this the bit that all of this change was made to refactor out?
Collaborator
Author
There was a problem hiding this comment.
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.
Collaborator
|
This all looks good to me. |
Contributor
|
LGTM |
cyli
reviewed
Jan 10, 2017
manager/manager.go
Outdated
| }), | ||
| ) | ||
| if err != nil { | ||
| logger.WithError(err).Errorf("failed to connect to CA after locking the cluster") |
Contributor
There was a problem hiding this comment.
Should this say "failed to connect to local manager socket after locking the cluster"? The manager may not be a CA.
Collaborator
Author
There was a problem hiding this comment.
Changed the message.
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>
96b5974 to
d15f8ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By using
connectionbrokerinstead of usingremotesdirectly, subsystemslike 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.