How to get the IP address of the current lead from the quorum?

Is there a way to get the IP address of the current leading meso master from the quorum? Does any variable store a value?

+5
source share
2 answers

Yes. The main information is stored in zk format as json. You can get the lead wizard from zk. Please refer to this article http://codetrips.com/2015/08/16/apache-mesos-leader-master-discovery-using-zookeeper-part-2/ to find out how to get it. Macro is the author of adding the mesos master json format to zk. You can use libray https://github.com/massenz/zk-mesos to get leadership from zk directly.

+3
source

You can also request the endpoint http://{any mesos master}/master/redirect and http://{any mesos master}/master/redirect current main main IP address from the returned Location header.

+1
source

Source: https://habr.com/ru/post/1236800/


All Articles