mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Mann <g...@mesosphere.io>
Subject Re: Review Request 70903: Killed all tasks on the agent when draining.
Date Fri, 12 Jul 2019 21:55:47 GMT


> On July 12, 2019, 8:31 p.m., Joseph Wu wrote:
> > src/slave/slave.cpp
> > Lines 1010-1018 (patched)
> > <https://reviews.apache.org/r/70903/diff/4/?file=2154280#file2154280line1010>
> >
> >     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();
> >     ```

Thanks for catching this!


- Greg


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


On July 12, 2019, 9:54 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70903/
> -----------------------------------------------------------
> 
> (Updated July 12, 2019, 9:54 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/5/
> 
> 
> Testing
> -------
> 
> Testing details at the end of this chain.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


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