Skip to content

Convert code to use connectionbroker package#1851

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

Convert code to use connectionbroker package#1851
aaronlehmann merged 1 commit intomoby:masterfrom
aaronlehmann:use-connectionbroker

Conversation

@aaronlehmann
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

ping @cyli @dongluochen @LK4D4

}
}(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
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
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
Copy link
Copy Markdown
Collaborator

dperny commented Jan 9, 2017

This all looks good to me.

@dongluochen
Copy link
Copy Markdown
Contributor

LGTM

}),
)
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
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
Copy Markdown
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 <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