[ 
https://issues.apache.org/jira/browse/MESOS-3902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Whitehead updated MESOS-3902:
---------------------------------
    Description: 
When I attempt to send a {{SUBSCRIBE}} call to a non-leading master instead of 
getting a 307 as is outlined 
[here|https://github.com/apache/mesos/blob/master/docs/scheduler-http-api.md#master-detection]
 I get a 503.

{code}
$ cat /tmp/subscribe-943257503176798091.bin | http --print=HhBb --stream 
--pretty=colors POST http://localhost:6060/api/v1/scheduler 
Accept:application/x-protobuf Content-Type:application/x-protobuf               
                                                                             
POST /api/v1/scheduler HTTP/1.1
User-Agent: HTTPie/0.9.0
Host: localhost:6060
Content-Length: 126
Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Type: application/x-protobuf
Accept: application/x-protobuf



+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+

HTTP/1.1 503 Service Unavailable
Date: Wed, 11 Nov 2015 23:02:23 GMT
Content-Length: 22

Not the leading master

{code}

To verify this behavior I started three slaves on my local machines on ports 
{{6060, 6061, 6062}}. The leader when I ran the above command was {{6061}}.

  was:
When I attempt to send a {{SUBSCRIBE}} call to a non-leading master instead of 
getting a 307 as is outlined 
[here|https://github.com/apache/mesos/blob/master/docs/scheduler-http-api.md#master-detection]
 I get a 503.

{code}
cat /tmp/subscribe-943257503176798091.bin | http --print=HhBb --stream 
--pretty=colors POST :6060/api/v1/scheduler Accept:application/x-protobuf 
Content-Type:application/x-protobuf                                             
                                               
POST /api/v1/scheduler HTTP/1.1
User-Agent: HTTPie/0.9.0
Host: localhost:6060
Content-Length: 126
Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Type: application/x-protobuf
Accept: application/x-protobuf



+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+

HTTP/1.1 503 Service Unavailable
Date: Wed, 11 Nov 2015 23:02:23 GMT
Content-Length: 22

Not the leading master

{code}

To verify this behavior I started three slaves on my local machines on ports 
{{6060, 6061, 6062}}. The leader when I ran the above command was {{6061}}.


> Mesos HTTP Scheduler API does not perform master redirection when it's not 
> the leader
> -------------------------------------------------------------------------------------
>
>                 Key: MESOS-3902
>                 URL: https://issues.apache.org/jira/browse/MESOS-3902
>             Project: Mesos
>          Issue Type: Bug
>          Components: HTTP API, master
>    Affects Versions: 0.25.0
>         Environment: 3 masters, 10 slaves
>            Reporter: Ben Whitehead
>              Labels: mesosphere
>
> When I attempt to send a {{SUBSCRIBE}} call to a non-leading master instead 
> of getting a 307 as is outlined 
> [here|https://github.com/apache/mesos/blob/master/docs/scheduler-http-api.md#master-detection]
>  I get a 503.
> {code}
> $ cat /tmp/subscribe-943257503176798091.bin | http --print=HhBb --stream 
> --pretty=colors POST http://localhost:6060/api/v1/scheduler 
> Accept:application/x-protobuf Content-Type:application/x-protobuf             
>                                                                               
>  
> POST /api/v1/scheduler HTTP/1.1
> User-Agent: HTTPie/0.9.0
> Host: localhost:6060
> Content-Length: 126
> Connection: keep-alive
> Accept-Encoding: gzip, deflate
> Content-Type: application/x-protobuf
> Accept: application/x-protobuf
> +-----------------------------------------+
> | NOTE: binary data not shown in terminal |
> +-----------------------------------------+
> HTTP/1.1 503 Service Unavailable
> Date: Wed, 11 Nov 2015 23:02:23 GMT
> Content-Length: 22
> Not the leading master
> {code}
> To verify this behavior I started three slaves on my local machines on ports 
> {{6060, 6061, 6062}}. The leader when I ran the above command was {{6061}}.



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

Reply via email to