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

[Question] Can worker in Swarm get address of managers? #28018

Closed
allencloud opened this issue Nov 3, 2016 · 4 comments · Fixed by #28042
Closed

[Question] Can worker in Swarm get address of managers? #28018

allencloud opened this issue Nov 3, 2016 · 4 comments · Fixed by #28042

Comments

@allencloud
Copy link
Contributor

Description

Can a worker in swarm get address of managers in this Swarm cluster?

Currently in a worker node, we can only use docker info to get very few information about this swarm cluster. docker info:

Swarm: active
 NodeID: a49kwjbombpbw9cnz8ajwzh06
 Is Manager: false
 Node Address: 192.168.59.105

While we still can not know which node is manager, or where is the cluster's control entrypoint.

Assuming that we have a large cluster with 10x,100x nodes, but only one manager node. Then if we forget that which one node is manager, actually maybe we lose the control of this swarm node.

If we can get manager address of the cluster from the worker node, it would be a big convenient for users. Since a cluster would have several managers, maybe a leader manager address from every work node is good.

@westsouthnight
Copy link

In before I'm ask primary manager from consul, in new swarmkit I don't know how to do this.

@yongtang
Copy link
Member

yongtang commented Nov 3, 2016

@allencloud @westsouthnight The info.Swarm.RemoteManagers will list the addresses of the managers from the worker node.

@yongtang
Copy link
Member

yongtang commented Nov 3, 2016

Added a PR #28042 so that Manager Addresses will show up explicitly in the output of docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 1
Server Version: 1.13.0-dev
Storage Driver: overlay2
 Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: active
 NodeID: bu6m8b45fxu8ac4w4wx26iw19
 Is Manager: false
 Node Address: 127.0.0.1
 Manager Addresses: 127.0.0.1:2477
Runtimes: runc
Default Runtime: runc
...

@allencloud
Copy link
Contributor Author

Great. Thanks a lot. @yongtang

@thaJeztah thaJeztah added this to the 1.13.0 milestone Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants