Created
September 23, 2014 15:23
-
-
Save rasputnik/98aac2f8230a26f06e64 to your computer and use it in GitHub Desktop.
find marathon master using zk CLI tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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