-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54038/#review156809
-----------------------------------------------------------
Fix it, then Ship it!
Looks good. I've got some questions/comments, but I'll let you decide which (if any) should
be addressed before committing.
include/mesos/hook.hpp (line 111)
<https://reviews.apache.org/r/54038/#comment227113>
"Deprecated"? Will we ever remove this hook?
include/mesos/hook.hpp (line 128)
<https://reviews.apache.org/r/54038/#comment227112>
Or TASK_ERROR? I thought FAILED meant that it ran and returned a non-zero exit code.
include/mesos/hook.hpp (lines 146 - 147)
<https://reviews.apache.org/r/54038/#comment227114>
Is `sandboxDirectory` the host or container path? Absolute or relative?
Same question for `mappedDirectory`, also what is it? sandbox container path?
include/mesos/module/hook.proto (line 28)
<https://reviews.apache.org/r/54038/#comment227115>
Why add this TODO instead of filing a JIRA? We can always add new protobuf fields later,
when we're ready.
src/hook/manager.cpp (line 221)
<https://reviews.apache.org/r/54038/#comment227116>
Update this comment (and others) if you update the proto message name
src/hook/manager.cpp (lines 245 - 249)
<https://reviews.apache.org/r/54038/#comment227117>
Could save a couple lines if you invert the if statement and push the MergeFrom into it.
```
if (result.isSome()) {
info.MergeFrom(result.get());
}
```
src/slave/containerizer/docker.cpp (line 1132)
<https://reviews.apache.org/r/54038/#comment227118>
"as soon as possible" isn't very specific. How about "... remove this entire block after
Mesos 1.2's deprecation cycle ends."
src/slave/containerizer/docker.cpp (line 1173)
<https://reviews.apache.org/r/54038/#comment227119>
Redundant `if(hooksAvailable)`, could be merged with statement above.
src/slave/containerizer/docker.cpp (lines 1178 - 1179)
<https://reviews.apache.org/r/54038/#comment227120>
I still don't understand why `sandboxDirectory = container->directory` and `mappedDirectory
= flags.sandbox_directory`. Seems backwards as far as "sandbox directory" goes.
src/slave/containerizer/docker.cpp (lines 1193 - 1195)
<https://reviews.apache.org/r/54038/#comment227121>
Sounds like a great thing to Warn about in the agent log. Planning on doing this in a
subsequent patch?
src/slave/containerizer/docker.cpp (lines 1224 - 1225)
<https://reviews.apache.org/r/54038/#comment227122>
So, if executorEnvironment and taskEnvironment both have the same keys, then the taskEnvironment
will override?
- Adam B
On Nov. 23, 2016, 11:26 a.m., Till Toenshoff wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54038/
> -----------------------------------------------------------
>
> (Updated Nov. 23, 2016, 11:26 a.m.)
>
>
> Review request for mesos, Adam B, Gastón Kleiman, Kapil Arya, and Joseph Wu.
>
>
> Bugs: MESOS-6396
> https://issues.apache.org/jira/browse/MESOS-6396
>
>
> Repository: mesos
>
>
> Description
> -------
>
> For being able to supply environment additions for both, a task and
> its executor separately we need to introduce a new hook as the
> existing ones slavePreLaunchDockerHook (deprecated) as well as
> slavePreLaunchDockerEnvironmentDecorator do not allow for this.
>
> This new hook will likely allow for further additions like e.g.
> adding volumes without having to adapt the signature but only the
> returned proto message TaskExecutorDecoratorInfo.
>
>
> Diffs
> -----
>
> include/mesos/hook.hpp f0606e3a68fa179cf7ea036f10563ef47c2aefa7
> include/mesos/module/hook.proto PRE-CREATION
> src/Makefile.am 5e0b8406f7f624bd8b03ff76b887f20e22fc66e0
> src/hook/manager.hpp 5ecfcab48da808c84d36f9bcfcb5a8e0ad2167e5
> src/hook/manager.cpp 24885226a788a7abd851e12b527f74fa972ec935
> src/slave/containerizer/docker.cpp ccabf99f305d7874e1c46bc618ea74341eb281ef
>
> Diff: https://reviews.apache.org/r/54038/diff/
>
>
> Testing
> -------
>
> make check
>
> *WIP - functional test pending - unit tests pending - WIP*
>
>
> Thanks,
>
> Till Toenshoff
>
>
|