Project: mesos
Issue MESOS-4066: Agent should not return partial state when a request is made to /state endpoint during recovery.
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.
Story points: 3