You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Timothy Chen <tn...@apache.org> on 2015/08/01 19:07:40 UTC
Re: Review Request 36185: Create pre-launch hook before a docker
container launches in slave.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36185/#review93844
-----------------------------------------------------------
src/hook/manager.cpp (line 187)
<https://reviews.apache.org/r/36185/#comment148256>
From the hook signature it seems like we make not distinction between launching a custom executor or a task.
I don't know what usage we need from a hook like this yet, what use cases do you have in mind?
src/hook/manager.cpp (line 197)
<https://reviews.apache.org/r/36185/#comment148255>
We don't hold on to references on temporaries anymore according to mesos style guide.
const Try<Nothing>&/Try<Nothing>
- Timothy Chen
On July 11, 2015, 8:46 a.m., haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36185/
> -----------------------------------------------------------
>
> (Updated July 11, 2015, 8:46 a.m.)
>
>
> Review request for mesos and Timothy Chen.
>
>
> Bugs: MESOS-2588
> https://issues.apache.org/jira/browse/MESOS-2588
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Create pre-launch hook before a docker container launches in slave.
>
>
> Diffs
> -----
>
> include/mesos/hook.hpp 0995c249e9f07c6c4a26d1c5c369d48bb8056f1f
> src/examples/test_hook_module.cpp d61cd557d8e44e5089f324edf97b0335a4ededab
> src/hook/manager.hpp 47e8eb7d54d55049d054cf9b1225e67333f22adc
> src/hook/manager.cpp 0108534c1fc527a0c66d201d7a5232e80b9928bf
> src/slave/containerizer/docker.hpp 9a7a951a72390b38f5dda3a3d50c4b35a6c784fd
> src/slave/containerizer/docker.cpp cfb60177fe48ec0eeab12ff392c6c9f89634b92f
> src/tests/docker_containerizer_tests.cpp a3da786c1b733e9dd4abf1d02d5dae051393d921
> src/tests/hook_tests.cpp 09205fb89925c22b1157294a756db87d911a63db
> src/tests/mesos.hpp 9157ac079808d2686592e54ea26a26e6a0825ed3
>
> Diff: https://reviews.apache.org/r/36185/diff/
>
>
> Testing
> -------
>
> # Add a new unit test "HookTest.ROOT_DOCKER_VerifySlavePreLaunchDockerHook"
> make check -j8 GTEST_FILTER=-"*"
> sudo ./bin/mesos-tests.sh --verbose --gtest_filter=HookTest.ROOT_DOCKER_VerifySlavePreLaunchDockerHook
>
>
> Thanks,
>
> haosdent huang
>
>
Re: Review Request 36185: Create pre-launch hook before a docker
container launches in slave.
Posted by Timothy Chen <tn...@apache.org>.
> On Aug. 1, 2015, 5:07 p.m., Timothy Chen wrote:
> > src/hook/manager.cpp, line 187
> > <https://reviews.apache.org/r/36185/diff/4/?file=1008885#file1008885line187>
> >
> > From the hook signature it seems like we make not distinction between launching a custom executor or a task.
> >
> > I don't know what usage we need from a hook like this yet, what use cases do you have in mind?
>
> haosdent huang wrote:
> I think user could do some prepare works here which have to run outside the docker container. Or this issue [MESOS-2588](https://issues.apache.org/jira/browse/MESOS-2588) is not accepted now? I could discard this patch if it is not accepted.
I think it's fine to add a hook but it's just not clear how would a user distinguish the difference between custom executor or task, as I would assume that's important here.
Perhaps we should also pass in TaskInfo/ExecutorInfo so that teh user has more ifnromation to know what to do.
- Timothy
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36185/#review93844
-----------------------------------------------------------
On July 11, 2015, 8:46 a.m., haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36185/
> -----------------------------------------------------------
>
> (Updated July 11, 2015, 8:46 a.m.)
>
>
> Review request for mesos and Timothy Chen.
>
>
> Bugs: MESOS-2588
> https://issues.apache.org/jira/browse/MESOS-2588
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Create pre-launch hook before a docker container launches in slave.
>
>
> Diffs
> -----
>
> include/mesos/hook.hpp 0995c249e9f07c6c4a26d1c5c369d48bb8056f1f
> src/examples/test_hook_module.cpp d61cd557d8e44e5089f324edf97b0335a4ededab
> src/hook/manager.hpp 47e8eb7d54d55049d054cf9b1225e67333f22adc
> src/hook/manager.cpp 0108534c1fc527a0c66d201d7a5232e80b9928bf
> src/slave/containerizer/docker.hpp 9a7a951a72390b38f5dda3a3d50c4b35a6c784fd
> src/slave/containerizer/docker.cpp cfb60177fe48ec0eeab12ff392c6c9f89634b92f
> src/tests/docker_containerizer_tests.cpp a3da786c1b733e9dd4abf1d02d5dae051393d921
> src/tests/hook_tests.cpp 09205fb89925c22b1157294a756db87d911a63db
> src/tests/mesos.hpp 9157ac079808d2686592e54ea26a26e6a0825ed3
>
> Diff: https://reviews.apache.org/r/36185/diff/
>
>
> Testing
> -------
>
> # Add a new unit test "HookTest.ROOT_DOCKER_VerifySlavePreLaunchDockerHook"
> make check -j8 GTEST_FILTER=-"*"
> sudo ./bin/mesos-tests.sh --verbose --gtest_filter=HookTest.ROOT_DOCKER_VerifySlavePreLaunchDockerHook
>
>
> Thanks,
>
> haosdent huang
>
>
Re: Review Request 36185: Create pre-launch hook before a docker
container launches in slave.
Posted by haosdent huang <ha...@gmail.com>.
> On Aug. 1, 2015, 5:07 p.m., Timothy Chen wrote:
> > src/hook/manager.cpp, line 187
> > <https://reviews.apache.org/r/36185/diff/4/?file=1008885#file1008885line187>
> >
> > From the hook signature it seems like we make not distinction between launching a custom executor or a task.
> >
> > I don't know what usage we need from a hook like this yet, what use cases do you have in mind?
I think user could do some prepare works here which have to run outside the docker container. Or this issue [MESOS-2588](https://issues.apache.org/jira/browse/MESOS-2588) is not accepted now? I could discard this patch if it is not accepted.
- haosdent
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36185/#review93844
-----------------------------------------------------------
On July 11, 2015, 8:46 a.m., haosdent huang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36185/
> -----------------------------------------------------------
>
> (Updated July 11, 2015, 8:46 a.m.)
>
>
> Review request for mesos and Timothy Chen.
>
>
> Bugs: MESOS-2588
> https://issues.apache.org/jira/browse/MESOS-2588
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Create pre-launch hook before a docker container launches in slave.
>
>
> Diffs
> -----
>
> include/mesos/hook.hpp 0995c249e9f07c6c4a26d1c5c369d48bb8056f1f
> src/examples/test_hook_module.cpp d61cd557d8e44e5089f324edf97b0335a4ededab
> src/hook/manager.hpp 47e8eb7d54d55049d054cf9b1225e67333f22adc
> src/hook/manager.cpp 0108534c1fc527a0c66d201d7a5232e80b9928bf
> src/slave/containerizer/docker.hpp 9a7a951a72390b38f5dda3a3d50c4b35a6c784fd
> src/slave/containerizer/docker.cpp cfb60177fe48ec0eeab12ff392c6c9f89634b92f
> src/tests/docker_containerizer_tests.cpp a3da786c1b733e9dd4abf1d02d5dae051393d921
> src/tests/hook_tests.cpp 09205fb89925c22b1157294a756db87d911a63db
> src/tests/mesos.hpp 9157ac079808d2686592e54ea26a26e6a0825ed3
>
> Diff: https://reviews.apache.org/r/36185/diff/
>
>
> Testing
> -------
>
> # Add a new unit test "HookTest.ROOT_DOCKER_VerifySlavePreLaunchDockerHook"
> make check -j8 GTEST_FILTER=-"*"
> sudo ./bin/mesos-tests.sh --verbose --gtest_filter=HookTest.ROOT_DOCKER_VerifySlavePreLaunchDockerHook
>
>
> Thanks,
>
> haosdent huang
>
>