----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66568/#review201342 -----------------------------------------------------------
src/master/master.cpp Lines 4525 (patched) <https://reviews.apache.org/r/66568/#comment282517> I'm not sure about this. Would `REASON_TASK_INVALID` be more appropriate? src/master/master.cpp Lines 4519-4522 (original), 4543-4546 (patched) <https://reviews.apache.org/r/66568/#comment282516> Shouldn't we drop the other operations as well? How about moving the validation into `Master::accept()`, e.g., Line 4040? ``` if (accept.operations_size() > 1 && find_if(...)) { foreach (foreach (Offer::Operation& operation, *accept.mutable_operations()) { switch (operation.type()) { case Offer::Operation::RESERVE: ... case Offer::Operation::DESTROY_BLOCK: { send(OPERATION_ERROR, ...); break; } case Offer::Operation::LAUNCH: case Offer::Operation::LAUNCH_GROUP: { send(TASK_DROPPED or TASK_LOST, TaskStatus::REASON_TASK_INVALID, ...); break; } } } } ``` Or, we could combine the above logic with the conditional branch at Line 3974. - Chun-Hung Hsiao On April 17, 2018, 5 p.m., Zhitao Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66568/ > ----------------------------------------------------------- > > (Updated April 17, 2018, 5 p.m.) > > > Review request for mesos, Chun-Hung Hsiao and Greg Mann. > > > Bugs: MESOS-4965 > https://issues.apache.org/jira/browse/MESOS-4965 > > > Repository: mesos > > > Description > ------- > > These two operations are intended to be non-speculative eventually but > are implemented as speculative right now. To avoid frameworks opt-in to > dangerous behavior, we require that accept can only contain one > `GROW_VOLUME` or `SHRINK_VOLUME` and no other operations. > > This is implemented by reuse existing code which already drops `LAUNCH` > or `LAUNCH_GROUP` with proper reason and message. > > > Diffs > ----- > > src/master/master.cpp 767ad8cfe142b47ef07172bcb2a4fb49fc3e833a > > > Diff: https://reviews.apache.org/r/66568/diff/2/ > > > Testing > ------- > > Behavior tested in https://reviews.apache.org/r/66569/. > > > Thanks, > > Zhitao Li > >
