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

Convert code to use connectionbroker package #1851

Merged
merged 1 commit into from
Jan 10, 2017

Conversation

aaronlehmann
Copy link
Collaborator

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
Collaborator Author

ping @cyli @dongluochen @LK4D4

}
}(ready)
}

Copy link
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
Collaborator 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
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
Copy link
Collaborator

dperny commented Jan 9, 2017

This all looks good to me.

@dongluochen
Copy link
Contributor

LGTM

}),
)
if err != nil {
logger.WithError(err).Errorf("failed to connect to CA after locking the cluster")
Copy link
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
Collaborator 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
Copy link
Contributor

cyli commented Jan 10, 2017

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 <[email protected]>
@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