Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
find marathon master using zk CLI tool
Although marathon nodes proxy to the master, that will only happen if they're alive to proxy :)
We've worked around this by using https://github.com/mmcgrana/zk to find the current marathon master from zookeeper and make the request to that. Something like:
export ZOOKEEPER_SERVERS=zk://.......
export MARATHON_ZNODE=/marathon
export LEADER=$MARATHON_ZNODE/leader
# find marathon master (each active master shows here, just grab the last)
MNODE=`zk children $MLEADER| head -1`
MMASTER=`zk get $MLEADER/$MNODE`
# ... make request to MMASTER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.