-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34646/#review129545
-----------------------------------------------------------



Can we update the docs to describe this behavior? e.g., add a note to 
https://mesos.apache.org/documentation/latest/endpoints/ describing the 
redirect behavior -- I suppose it is worth adding a note to every master 
endpoint's doc page describing the redirect behavior, as well as a note to the 
"Master Endpoints" section of the top-level endpoints doc. Might also be worth 
adding a note to the "Operational Guide" or "High Availability" pages. We also 
need to update the docs for the "master/redirect/" endpoint.

This change requires one or more test cases. For example: (a) normal redirect 
case (b) return ServiceUnavailable when there is no leading master (c) avoiding 
redirect loop for `/redirect` endpoint.


src/master/http.cpp (line 345)
<https://reviews.apache.org/r/34646/#comment192967>

    "a leader" => "the leader", here and below.



src/master/http.cpp (line 1017)
<https://reviews.apache.org/r/34646/#comment192970>

    `"Redirecting request for " << request.url << " to the leading master " << 
hostname.get()`


- Neil Conway


On April 19, 2016, 1:55 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34646/
> -----------------------------------------------------------
> 
> (Updated April 19, 2016, 1:55 a.m.)
> 
> 
> Review request for mesos, Adam B, Anand Mazumdar, Cody Maloney, Ian Downes, 
> Neil Conway, and Vinod Kone.
> 
> 
> Bugs: MESOS-1865
>     https://issues.apache.org/jira/browse/MESOS-1865
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In this changes, we redirect to the leader master in those http
> endpoints which depend on master elected status if current master is
> not a leader.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp a9cb99a92ff5a783e719df5e5cfb6e8301241df9 
> 
> Diff: https://reviews.apache.org/r/34646/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> when current master is not a leader, it would redirect to the leader master.
> 
> ```
> $ curl -i http://master1:5050/master/tasks.json
> HTTP/1.1 307 Temporary Redirect
> Date: Mon, 01 Jun 2015 06:30:08 GMT
> Location: http://master2:5050//master/tasks.json
> Content-Length: 0
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to