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

Vinod Kone commented on MESOS-4066:
-----------------------------------

In the framework HTTP API we return "HTTP Service Unavailable" response in 
cases when the slave can't respond to a request (e.g., SUBSCRIBE call). I would 
like to keep the same behavior for operator endpoints for consistency. cc 
[~sargun]

This is straightforward to do for the /state endpoint. I'll send a review out 
for this.

Looking at other operator endpoints on the slave these would benefit from the 
same behavior:

--> /metrics/snapshot
--> /monitor/statistics

Both these are a bit tricky to convert to respond with "Service Unavailable" 
because they don't have access to slave's state. Need to think a bit more for 
these.

> Expose when agent is recovering in the agent's /state endpoint.
> ---------------------------------------------------------------
>
>                 Key: MESOS-4066
>                 URL: https://issues.apache.org/jira/browse/MESOS-4066
>             Project: Mesos
>          Issue Type: Task
>          Components: slave
>            Reporter: Benjamin Mahler
>            Assignee: Vinod Kone
>              Labels: mesosphere
>
> Currently when a user is hitting /state.json on the agent, it may return 
> partial state if the agent has failed over and is recovering. There is 
> currently no clear way to tell if this is the case when looking at a 
> response, so the user may incorrectly interpret the agent as being empty of 
> tasks.
> We could consider exposing the 'state' enum of the agent in the endpoint:
> {code}
>   enum State
>   {
>     RECOVERING,   // Slave is doing recovery.
>     DISCONNECTED, // Slave is not connected to the master.
>     RUNNING,      // Slave has (re-)registered.
>     TERMINATING,  // Slave is shutting down.
>   } state;
> {code}
> This may be a bit tricky to maintain as far as backwards-compatibility of the 
> endpoint, if we were to alter this enum.
> Exposing this would allow users to be more informed about the state of the 
> agent.



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

Reply via email to