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

Auto-detect node IP address #27910

Merged
merged 1 commit into from
Nov 3, 2016
Merged

Auto-detect node IP address #27910

merged 1 commit into from
Nov 3, 2016

Conversation

dperny
Copy link
Contributor

@dperny dperny commented Oct 31, 2016

- What I did
The IP address that an agent connects to the manager from is recorded, stored, and exposed through the API. This is useful for many kinds of internal cluster management tools. The field is Node.Status.Addr.

- How I did it
Change in swarmkit to support this behavior, then update docker to expose this in its api

- How to verify it
docker node inspect now shows node address under Status, both with and without --pretty.

- Description for the changelog

Autodetect, store, and expose node IP address as seen by the manager.

- A picture of a cute animal (not mandatory but encouraged)
This bird, the violet-backed starling, is purple.
image

@thaJeztah
Copy link
Member

don't forget to update the docs (CLI reference, API reference), and API changes

@aaronlehmann
Copy link
Contributor

Design LGTM

@dperny
Copy link
Contributor Author

dperny commented Nov 2, 2016

Rebased and dropped vendoring commit because docker now has swarmkit vendored far enough.

@aluzzardi
Copy link
Member

LGTM

@aluzzardi
Copy link
Member

@mstanleyjones Do we need docs review on reference docs updates? This is a small API/CLI change

@dperny
Copy link
Contributor Author

dperny commented Nov 2, 2016

Squashed 2 commits into 1.

@thaJeztah
Copy link
Member

@aluzzardi yes, but for small changes, it's usually @vdemeester and myself doing the docs review, and we'll ping @mstanleyjones if assistance is needed 😅

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

oops, found some JSON errors

@@ -4465,6 +4465,7 @@ List nodes
},
"Status": {
"State": "ready"
Copy link
Member

Choose a reason for hiding this comment

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

missing a comma

@@ -4556,6 +4557,7 @@ Return low-level information on the node `id`
},
"Status": {
"State": "ready"
Copy link
Member

Choose a reason for hiding this comment

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

missing a comma 😇

@@ -89,6 +89,7 @@ Example output:
},
"Status": {
"State": "ready"
Copy link
Member

Choose a reason for hiding this comment

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

same here

Manager now auto-detects the address that an agent connects to the cluster
from and stores it. This is useful for many kinds of internal cluster
management tools.

Signed-off-by: Drew Erny <drew.erny@docker.com>
@dperny
Copy link
Contributor Author

dperny commented Nov 3, 2016

@thaJeztah Fixed JSON errors. Thanks for the catch.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

dnephin pushed a commit to dnephin/docker that referenced this pull request Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants