----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70959/#review216181 -----------------------------------------------------------
High level comment: the agent is only finished draining once all terminal task status updates are ACKed, AND once all terminal operation updates are ACKed. So we need similar code in the operation update acknowledgement path, and we need to have a way to verify that both tasks and operations are all finished. src/slave/slave.cpp Lines 4879-4880 (patched) <https://reviews.apache.org/r/70959/#comment303244> I'm not sure, but will any frameworks exist on the agent once all tasks are terminal and ACKed? I'm wondering if we can just check whether or not `frameworks` is empty to determine if all tasks are gone? - Greg Mann On June 26, 2019, 11:55 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70959/ > ----------------------------------------------------------- > > (Updated June 26, 2019, 11:55 p.m.) > > > Review request for mesos, Greg Mann and Joseph Wu. > > > Bugs: MESOS-9860 > https://issues.apache.org/jira/browse/MESOS-9860 > > > Repository: mesos > > > Description > ------- > > Once a draining agent has neither frameworks with pending tasks nor any > executors with either queued or launched tasks it has finished draining. > This patch adds handling of that case which clears both the in-memory > and persisted drain configuration. > > > Diffs > ----- > > src/slave/slave.cpp 30039b0857a4d85b4b96fa95d7f8724d57cdec6e > > > Diff: https://reviews.apache.org/r/70959/diff/1/ > > > Testing > ------- > > `make check` > > tested as part of https://reviews.apache.org/r/70960/ > > > Thanks, > > Benjamin Bannier > >
