{"action":"closed","issue":{"url":"https://api.github.com/repos/Yelp/paasta/issues/498","repository_url":"https://api.github.com/repos/Yelp/paasta","labels_url":"https://api.github.com/repos/Yelp/paasta/issues/498/labels{/name}","comments_url":"https://api.github.com/repos/Yelp/paasta/issues/498/comments","events_url":"https://api.github.com/repos/Yelp/paasta/issues/498/events","html_url":"https://github.com/Yelp/paasta/issues/498","id":153352089,"number":498,"title":"Make get_mesos_leader use mesos.cli","user":{"login":"nhandler","id":102499,"avatar_url":"https://avatars.githubusercontent.com/u/102499?v=3","gravatar_id":"","url":"https://api.github.com/users/nhandler","html_url":"https://github.com/nhandler","followers_url":"https://api.github.com/users/nhandler/followers","following_url":"https://api.github.com/users/nhandler/following{/other_user}","gists_url":"https://api.github.com/users/nhandler/gists{/gist_id}","starred_url":"https://api.github.com/users/nhandler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhandler/subscriptions","organizations_url":"https://api.github.com/users/nhandler/orgs","repos_url":"https://api.github.com/users/nhandler/repos","events_url":"https://api.github.com/users/nhandler/events{/privacy}","received_events_url":"https://api.github.com/users/nhandler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Yelp/paasta/labels/in%20review","name":"in review","color":"eac04b"}],"state":"closed","locked":false,"assignee":{"login":"nhandler","id":102499,"avatar_url":"https://avatars.githubusercontent.com/u/102499?v=3","gravatar_id":"","url":"https://api.github.com/users/nhandler","html_url":"https://github.com/nhandler","followers_url":"https://api.github.com/users/nhandler/followers","following_url":"https://api.github.com/users/nhandler/following{/other_user}","gists_url":"https://api.github.com/users/nhandler/gists{/gist_id}","starred_url":"https://api.github.com/users/nhandler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhandler/subscriptions","organizations_url":"https://api.github.com/users/nhandler/orgs","repos_url":"https://api.github.com/users/nhandler/repos","events_url":"https://api.github.com/users/nhandler/events{/privacy}","received_events_url":"https://api.github.com/users/nhandler/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-05-06T00:00:17Z","updated_at":"2016-05-11T16:07:33Z","closed_at":"2016-05-11T16:07:33Z","body":"It is possible to do:\r\n\r\n```\r\nfrom mesos.cli.master import CURRENT\r\nCURRENT.host\r\n```\r\n\r\nto get a URL representing the Mesos master. This comes from Zookeeper, rather than relying on the HTTP redirects. We should update `get_mesos_leader()` in mesos_tools.py to use this method. Hopefully, this will also result in a speedup for any tasks that use this function.\r\n\r\nNOTE: `CURRENT.host` returns something like `http://123.456.789.101:5050`, while `get_mesos_leader()` currently returns something like `srv1-somewhere.something.com`."}}