-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Add information for Manager Addresses
in the output of docker info
#28042
Conversation
} | ||
sort.Strings(managers) | ||
if len(managers) > 0 { | ||
fmt.Fprintf(dockerCli.Out(), " Manager Addresses: %s\n", strings.Join(managers, " ")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if there is lots of managers, this line could be some kind of unreadable. Is it OK for separate line for each one? Just my thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @allencloud. The PR has been updated with separated lines.
Or just show the address of leader manager? |
a40642a
to
e8317cc
Compare
@allencloud To show the lead manager is slightly tricky because it needs to query other managers to get the leader. If there is an error while querying managers, not sure we should return an error (error for |
e8317cc
to
a7c2881
Compare
a7c2881
to
db93ca7
Compare
Also, the utility of knowing the leader is limited, since it may change at any time. From the perspective of a client, the managers should be treated equally. The current leader should only be of interest the quorum. |
Thanks @stevvooe In addition, a rebase needed, though. @yongtang |
db93ca7
to
3434635
Compare
Thanks @allencloud, rebased. |
Sorry @yongtang rebase needed again 😢 (it's busy before code freeze 😄) |
3434635
to
7083b29
Compare
Thanks @thaJeztah. The PR has been rebased. 😅 |
LGTM |
@yongtang needs rebase LGTM |
As is specified in 28018, it would be useful to know the manager's addresses even in a worker node. This is especially useful when there are many worker nodes in a big cluster. The information is available in `info.Swarm.RemoteManagers`. This fix add the information of `Manager Addresses` to the output of `docker info`, to explicitly show it. A test has been added for this fix. This fix fixes 28018. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
7083b29
to
828bd44
Compare
Thanks @tonistiigi @aaronlehmann for the review. The PR has been rebased. |
I added this to the 1.13 milestone, @yongtang can you do a follow up PR for docs? |
Thanks @thaJeztah . Since this PR only changes the output of docker info and there is no API changes, I only updated the docs/man for |
Perfect, thanks! i'll review later |
…anagers Add information for `Manager Addresses` in the output of `docker info`
- What I did
As is specified in #28018, it would be useful to know the manager's addresses even in a worker node. This is especially useful when there are many worker nodes in a big cluster.
The information is available in
info.Swarm.RemoteManagers
.This fix add the information of
Manager Addresses
to the output ofdocker info
, to explicitly show it.- How I did it
- How to verify it
A test has been added for this fix.
Also the new output:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
This fix fixes #28018.
Signed-off-by: Yong Tang yong.tang.github@outlook.com