mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 54147: Added a server side component for the IOSwitchboard.
Date Wed, 30 Nov 2016 21:38:16 GMT

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


Fix it, then Ship it!





src/slave/containerizer/mesos/io/switchboard.hpp (line 111)
<https://reviews.apache.org/r/54147/#comment228052>

    No need for explicit. You need explicit only for single parameter constructor.



src/slave/containerizer/mesos/io/switchboard.cpp (lines 297 - 302)
<https://reviews.apache.org/r/54147/#comment228053>

    Try if this works `{defer(self(), &Self::outputHook, ...)}`



src/slave/containerizer/mesos/io/switchboard.cpp (lines 309 - 314)
<https://reviews.apache.org/r/54147/#comment228054>

    Ditto.



src/slave/containerizer/mesos/io/switchboard.cpp (line 337)
<https://reviews.apache.org/r/54147/#comment228067>

    onXXX accepts a void function. No need to 'return'.



src/slave/containerizer/mesos/io/switchboard.cpp (line 339)
<https://reviews.apache.org/r/54147/#comment228066>

    Ignore this if you already did that in the following patch. We should terminate the process
if promise is set or failed.



src/slave/containerizer/mesos/io/switchboard.cpp (line 345)
<https://reviews.apache.org/r/54147/#comment228068>

    No need to return



src/slave/containerizer/mesos/io/switchboard.cpp (line 363)
<https://reviews.apache.org/r/54147/#comment228056>

    Binding `this` without a defer is not safe. socket.accept() might finish after IOSwitchboardServerProcess
terminates and is deleted.



src/slave/containerizer/mesos/io/switchboard.cpp (line 366)
<https://reviews.apache.org/r/54147/#comment228069>

    No need to return for onAny



src/slave/containerizer/mesos/io/switchboard.cpp (line 376)
<https://reviews.apache.org/r/54147/#comment228057>

    Ditto. This should be a defer.



src/tests/containerizer/io_switchboard_tests.cpp (line 40)
<https://reviews.apache.org/r/54147/#comment228060>

    Why MesosTest? This can just be a TemporaryDirectoryTest



src/tests/containerizer/io_switchboard_tests.cpp (line 46)
<https://reviews.apache.org/r/54147/#comment228065>

    Do you need this in this test?



src/tests/containerizer/io_switchboard_tests.cpp (lines 59 - 60)
<https://reviews.apache.org/r/54147/#comment228061>

    If this is a TemporaryDirectoryTest, you can simply use `sandbox.get()`



src/tests/containerizer/io_switchboard_tests.cpp (line 118)
<https://reviews.apache.org/r/54147/#comment228062>

    This should be EXPECT



src/tests/containerizer/io_switchboard_tests.cpp (line 123)
<https://reviews.apache.org/r/54147/#comment228063>

    Ditto. this should be EXPECT


- Jie Yu


On Nov. 30, 2016, 9:35 p.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54147/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2016, 9:35 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-6639
>     https://issues.apache.org/jira/browse/MESOS-6639
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The 'IOSwitchboardServer' component encapsulates the server side logic
> for redirecting the 'stdin/stdout/stderr' of a container to/from
> multiple sources/targets. For now, we only redirect IO from a
> container to the FDs supplied to us by the logger.  We also send the
> stdout/stderr data to a simple HTTP server that we launch on a unix
> domain socket set up by the agent.  Right now this server is just a
> stub and doesn't do anything useful.
> 
> In future commits, we will expand this HTTP server to handle
> 'ATTACH_CONTAINER_INPUT' and 'ATTACH_CONTAINER_OUTPUT' calls on behalf
> of a container. It will use the stdout/stderr messages passed to it to
> and send that data over the response stream to any clients connected
> with an 'ATTACH_CONTAINER_OUTPUT' call. Likewise, it will take any
> input streamed in over a 'ATTACH_CONTAINER_INPUT' request and write it
> to a container's stdin.
> 
> In 'local' mode, it will be run inside the agent itself. In
> 'non-local' mode, it will be run as an external process to survive
> agent restarts.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am d1cc1016b1642c504f52c27623bc12c7ddf07599 
>   src/slave/containerizer/mesos/io/switchboard.hpp aaa3a35245b291f6003f519dbf8c0e1b82bc15fd

>   src/slave/containerizer/mesos/io/switchboard.cpp 25cbf2447d197134f0753b062b6f4130821005b2

>   src/tests/containerizer/io_switchboard_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/54147/diff/
> 
> 
> Testing
> -------
> 
> GTEST_FILTER="" make -j check
> sudo src/mesos-tests
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>


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