Is there any way to get the IP of current leading Mesos-master from the quorum? Does any variable stores that value?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With