Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the IP of current leader master from the quorum?

Is there any way to get the IP of current leading Mesos-master from the quorum? Does any variable stores that value?

like image 565
Madhurima Mishra Avatar asked Nov 25 '15 11:11

Madhurima Mishra


2 Answers

yes. Master information stored in zk as json format. You could get the leader master from zk. Please refer to this article http://codetrips.com/2015/08/16/apache-mesos-leader-master-discovery-using-zookeeper-part-2/ to see how to get it. Macro is the author of add Mesos master json format to zk. You could use the libray https://github.com/massenz/zk-mesos to get leader maste from zk directly.

like image 62
haosdent Avatar answered Oct 18 '22 08:10

haosdent


You can also query the http://{any mesos master}/master/redirect endpoint and parse the current leading master's IP address out of the Location header that is returned.

like image 27
iZ. Avatar answered Oct 18 '22 10:10

iZ.