> On Feb. 7, 2017, 3:54 p.m., Jie Yu wrote:
> > src/tests/containerizer/docker_archive.hpp, line 55
> > <https://reviews.apache.org/r/56339/diff/1/?file=1625367#file1625367line55>
> >
> >     Let's add another parameter here:
> >     ```
> >     static Future<Nothing> create(
> >           const std::string& directory,
> >           const std::string& name,
> >           const std::string& entrypoint = "null",
> >           const std::string& cmd = "null",
> >           const map<sring, string>& environment = {
> >             {"LD_LIBRARY_PATH", "invalid"},
> >             {"LIBPROCESS_IP", "invalid"},
> >             {"LIBPROCESS_PORT", "invalid"}});
> >     ```
> >     
> >     (not sure if the above compile or not :)

To reduce the amount of parsing/transformation that needs to be done, I'm going 
to add a vector instead, as the image takes an array of environment rather than 
a map:
```
      const std::vector<std::string>& environment = {
        {"LD_LIBRARY_PATH=invalid"},
        {"LIBPROCESS_IP=invalid"},
        {"LIBPROCESS_PORT=invalid"}}
```


- Joseph


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


On Feb. 6, 2017, 2:04 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56339/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2017, 2:04 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-7027
>     https://issues.apache.org/jira/browse/MESOS-7027
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This subtly modifies all tests using the `docker/runtime` isolator
> to fail if environment variables from inside the DockerArchive
> are passed into the Mesos executor's environment.  This applies
> for all executors (default, command, and docker), but mainly
> affects the command executor.
> 
> The environment variables are `LD_LIBRARY_PATH`, `LIBPROCESS_IP`,
> and `LIBPROCESS_PORT`; all of which are set to `invalid`.  This
> either causes linking problems or will force libprocess to exit.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/docker_archive.hpp 
> b36dbdba7acf0587e18aced3581f68a1269b04d2 
> 
> Diff: https://reviews.apache.org/r/56339/diff/
> 
> 
> Testing
> -------
> 
> This causes some tests to fail, particularly many of the 
> `DockerRuntimeIsolatorTest` in `runtime_isolator_tests.cpp`.
> 
> A variety of other tests which use `DockerArchive` will also fail.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>

Reply via email to