You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Steven Schlansker (JIRA)" <ji...@apache.org> on 2016/04/13 18:58:25 UTC

[jira] [Comment Edited] (MESOS-1865) Redirect to the leader master when current master is not a leader

    [ https://issues.apache.org/jira/browse/MESOS-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239594#comment-15239594 ] 

Steven Schlansker edited comment on MESOS-1865 at 4/13/16 4:57 PM:
-------------------------------------------------------------------

This issue came up on the mailing list again -- Guillermo wrote,
{quote}
I have an URL mesos-master.mydomain.com pointing to the leader and that works fine because it returns the slave list which I need for my autoscaler. But I'm afraid if the master fails the URL will no longer be valid. So I added the three IPs to the router (AWS Route53)  so it would round robin, but of course this will return an empty list sometimes because it hits a follower which returns empty.
{quote}



was (Author: stevenschlansker):
This issue came up on the mailing list again -- Guillermo wrote,
{noformat}
I have an URL mesos-master.mydomain.com pointing to the leader and that works fine because it returns the slave list which I need for my autoscaler. But I'm afraid if the master fails the URL will no longer be valid. So I added the three IPs to the router (AWS Route53)  so it would round robin, but of course this will return an empty list sometimes because it hits a follower which returns empty.
{noformat}


> Redirect to the leader master when current master is not a leader
> -----------------------------------------------------------------
>
>                 Key: MESOS-1865
>                 URL: https://issues.apache.org/jira/browse/MESOS-1865
>             Project: Mesos
>          Issue Type: Bug
>          Components: json api
>    Affects Versions: 0.20.1
>            Reporter: Steven Schlansker
>            Assignee: haosdent
>
> Some of the API endpoints, for example /master/tasks.json, will return bogus information if you query a non-leading master:
> {code}
> [steven@Anesthetize:~]% curl http://master1.mesos-vpcqa.otenv.com:5050/master/tasks.json | jq . | head -n 10
> {
>   "tasks": []
> }
> [steven@Anesthetize:~]% curl http://master2.mesos-vpcqa.otenv.com:5050/master/tasks.json | jq . | head -n 10
> {
>   "tasks": []
> }
> [steven@Anesthetize:~]% curl http://master3.mesos-vpcqa.otenv.com:5050/master/tasks.json | jq . | head -n 10
> {
>   "tasks": [
>     {
>       "executor_id": "",
>       "framework_id": "20140724-231003-419644938-5050-1707-0000",
>       "id": "pp.guestcenterwebhealthmonitor.606cd6ee-4b50-11e4-825b-5212e05f35db",
>       "name": "pp.guestcenterwebhealthmonitor.606cd6ee-4b50-11e4-825b-5212e05f35db",
>       "resources": {
>         "cpus": 0.25,
>         "disk": 0,
> {code}
> This is very hard for end-users to work around.  For example if I query "which master is leading" followed by "leader: which tasks are running" it is possible that the leader fails over in between, leaving me with an incorrect answer and no way to know that this happened.
> In my opinion the API should return the correct response (by asking the current leader?) or an error (500 Not the leader?) but it's unacceptable to return a successful wrong answer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)