----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70936/#review216160 -----------------------------------------------------------
src/slave/slave.cpp Lines 5732-5734 (patched) <https://reviews.apache.org/r/70936/#comment303212> I think I got this part incorrect; we should unconditionally set a `TASK_GONE_BY_OPERATOR` state. - Benjamin Bannier On June 26, 2019, 2:35 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70936/ > ----------------------------------------------------------- > > (Updated June 26, 2019, 2:35 p.m.) > > > Review request for mesos, Greg Mann and Joseph Wu. > > > Bugs: MESOS-9823 > https://issues.apache.org/jira/browse/MESOS-9823 > > > Repository: mesos > > > Description > ------- > > When a task is reported as killed to the agent during active agent > draining we now decorate the reported status with > `REASON_AGENT_DRAINING` if no other status was previously present. If > the draining marks the agent as gone via the `mark_gone` draining flag > we additionally report `TASK_GONE_BY_OPERATOR` instead of the original > state. > > This patch leaves some ambiguity in what triggered the kill since the > agent-executor protocol does not transport reasons; instead > the reason is here only inferred after the killed task has > been observed. This should usually be fine since due to the inherit race > between e.g., any user- and drain-triggered kill a user cannot > distinguish racy reasons. > > > Diffs > ----- > > src/slave/slave.cpp 30039b0857a4d85b4b96fa95d7f8724d57cdec6e > src/tests/slave_tests.cpp 7ba2df9fef9966cd09e0af3f4ef3bb260b6167f6 > > > Diff: https://reviews.apache.org/r/70936/diff/2/ > > > Testing > ------- > > `make check` > > > Thanks, > > Benjamin Bannier > >