mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 70903: Killed all tasks on the agent when draining.
Date Fri, 12 Jul 2019 20:31:12 GMT

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




src/slave/slave.cpp
Lines 1010-1018 (patched)
<https://reviews.apache.org/r/70903/#comment303778>

    This is missing the case for when the override is set, but the task's grace period is
not set (or unknown).
    Per: https://reviews.apache.org/r/70903/#comment303273
    
    I suggest:
    ```
    if (maxGracePeriod.isNone()) {
      return None();
    }
    
    KillPolicy overridenKillPolicy;
    overridenKillPolicy.mutable_grace_period()->CopyFrom(maxGracePeriod.get());
    
    // Task kill policy is not set or unknown.
    if (killPolicy.isNone() || !killPolicy->has_grace_period()) {
      return overridenKillPolicy;
    }
    
    // Task kill policy is less than the override.
    if (maxGracePeriod.get() < killPolicy->grace_period()) {
      return overridenKillPolicy;
    }
    
    return None();
    ```


- Joseph Wu


On July 10, 2019, 12:07 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70903/
> -----------------------------------------------------------
> 
> (Updated July 10, 2019, 12:07 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benno Evers, Benjamin Mahler, and Joseph
Wu.
> 
> 
> Bugs: MESOS-9821
>     https://issues.apache.org/jira/browse/MESOS-9821
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch updates the agent's `DrainSlaveMessage` handler
> to kill all tasks on the agent when the message is received.
> 
> 
> Diffs
> -----
> 
>   include/mesos/type_utils.hpp ed9190b50c18bd218e2d2c04a6aff82687d2996d 
>   src/slave/slave.cpp 30039b0857a4d85b4b96fa95d7f8724d57cdec6e 
> 
> 
> Diff: https://reviews.apache.org/r/70903/diff/4/
> 
> 
> Testing
> -------
> 
> Testing details at the end of this chain.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message