You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <bb...@apache.org> on 2019/07/16 12:45:34 UTC

Re: Review Request 70822: Added common protobufs for agent draining.

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




include/mesos/v1/mesos.proto
Lines 3773-3774 (patched)
<https://reviews.apache.org/r/70822/#comment303856>

    > This allows the operator to limit the maximum time it will take the agent to drain.
    
    Since this is a relative time the current implementation does not allow setting an upper bound on the time it will take an agent to drain, but instead the setting of an upper bound on how long one is willing to wait for tasks to terminate when draining.
    
    Consider the following scenario:
    
    * operator starts draining an agent
    * master persists the drain config and sends a request to the agent
    * the agent receives a drain request and persists the drain config
    * the agent fails over before it starts killing any task
    * the agent comes back up, e.g., after a duration > `max_grace_period`
    * it starts killing tasks
    * the agent will only finish draining after `2 * max_grace_period`
    
    If the agent fails over multiple times the duration could be longer.
    
    If we wanted a way for operators to specify a deadline by which an agent should be drained we would need to switch from times relative to the time the request is processed to some absolute timestamp (we could e.g., still accept such a `DrainConfig` from users, but internally translate to an absolute time by adding the period to the current time when processed on the master). This would have different semantics which would match the comment ("time until agent is drained" vs. "duration we are willing for tasks to terminate before taking drastic measures").
    
    Same issue in `mesos.proto`.


- Benjamin Bannier


On June 28, 2019, 9:51 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70822/
> -----------------------------------------------------------
> 
> (Updated June 28, 2019, 9:51 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benno Evers, Benjamin Mahler, Joseph Wu, and Vinod Kone.
> 
> 
> Bugs: MESOS-9753
>     https://issues.apache.org/jira/browse/MESOS-9753
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch makes protobuf message updates which will be used
> by both the master and the agent to facilitate automatic
> draining of agents.
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto eb1b09cf9f9c7c102d713170538c2ba210edb351 
>   include/mesos/type_utils.hpp 57b1893160dbe874aa9fec00a3d1b640b9c54906 
>   include/mesos/v1/mesos.proto 33431777cbc730ddf4b1feb54662b54b8e302e46 
>   src/common/type_utils.cpp ef1b3ea15cde1c7a8e0735fb9d7566dd1fd2cfdb 
>   src/internal/devolve.hpp fefe86e450fa5083b9ff50e92f4594ffb30a54c8 
>   src/internal/devolve.cpp 1d300b49d5cc3de4b8ed409902eb881c7afc07ea 
>   src/internal/evolve.hpp 1044d9df75b6fc1f60d3704be9cb5751e6d4321d 
>   src/internal/evolve.cpp 19c155967bf090fb2ec39211805ff1385787ab59 
>   src/messages/messages.proto e30ad34cc9212b05f85ba5e1d4fcfc9e49ae92c0 
> 
> 
> Diff: https://reviews.apache.org/r/70822/diff/7/
> 
> 
> Testing
> -------
> 
> `make`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>