----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65122/#review195483 -----------------------------------------------------------
Fix it, then Ship it! src/slave/containerizer/mesos/io/switchboard.cpp Lines 1223 (patched) <https://reviews.apache.org/r/65122/#comment274683> If I understand this correctly, this is solving for the case where we currently have input connected but our output IO has completed. In such a case, we don't want to terminate immediately, but instead hold off terminating until the input connection has been closed. I think the code you have is correct, but we should have a more detailed comment here about when the process will be terminated in the case where `inputConnected` is true. Likewise on line 1673, we should have a more detailed comment as to why we need to handle this case here. src/slave/containerizer/mesos/io/switchboard.cpp Lines 1673 (patched) <https://reviews.apache.org/r/65122/#comment274684> We shoudl reverse the order of these to fist check `redirectFinished` before checking `failure.isSome()`. This will make writing the comment I mentioned in my other review flow more easily. - Kevin Klues On Jan. 15, 2018, 4:42 p.m., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65122/ > ----------------------------------------------------------- > > (Updated Jan. 15, 2018, 4:42 p.m.) > > > Review request for mesos, Alexander Rukletsov, Greg Mann, and Kevin Klues. > > > Bugs: MESOS-7742 > https://issues.apache.org/jira/browse/MESOS-7742 > > > Repository: mesos > > > Description > ------- > > Previously, io switchboard terminated itself after io redirect had > been finished and before http response had been sent to the agent for > `ATTACH_CONTAINER_INPUT` request. This patch adds a check that an > input connection exists in io redirect completion callback to postpone > termination until `ATTACH_CONTAINER_INPUT` is completely processed. > > > Diffs > ----- > > src/slave/containerizer/mesos/io/switchboard.cpp > 89dd4988c7132d3c7aeacecad7a76961b0ec5a2c > > > Diff: https://reviews.apache.org/r/65122/diff/1/ > > > Testing > ------- > > sudo make check (Fedora 25) > internal CI > > > Thanks, > > Andrei Budnik > >