----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64570/#review195050 -----------------------------------------------------------
src/slave/containerizer/docker.cpp Lines 1464-1468 (patched) <https://reviews.apache.org/r/64570/#comment274177> The why: Mesos sets an explicit environment for executor's so that it is in full control. The flag `--executor_environment_variables=VALUE` is supposed to be used to pass any user-required environment variables to the executor. That said, for the Docker executor this does not seem to make sense, as the Docker containers perform the "environment isolation". This was working almost by happenstance on Linux because it's expected that all programs add themselves to the default path (like /bin), but this isn't true on Windows. Instead, the convention is to modify the system's or user's `PATH` to include e.g. `docker`, and to never expect it to end up in the "default" `PATH`. This is kind of documented [here](https://mesos.apache.org/documentation/latest/configuration/agent/), and it's confirmed by some answers on Stack Overflow and some JIRA issues, but it still doesn't make sense for the Docker executor on Windows. Perhaps, instead of `ifndef`ing this, we should do `path::join(os::host_default_path(), "C:\Program Files\Docker\Docker\Resources\bin\"` (and verify that is the expected location of `docker`. - Andrew Schwartzmeyer On Jan. 4, 2018, 4:32 p.m., Akash Gupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64570/ > ----------------------------------------------------------- > > (Updated Jan. 4, 2018, 4:32 p.m.) > > > Review request for mesos, Alexander Rukletsov, Andrew Schwartzmeyer, Gaston > Kleiman, Jie Yu, and Michael Park. > > > Repository: mesos > > > Description > ------- > > The docker executor was setting its `PATH` through > `os::host_default_path()`, so it could not find the docker executable. > Now, on Windows, the docker executor inherits the environment variables > from the agent. Further investigation needs to be done on why `PATH` > was this way and if the docker executor could simply inherit the > agent's environment. > > > Diffs > ----- > > src/slave/containerizer/docker.cpp 890cb2aba44fe76e891117833eac8ccca00b759b > > > Diff: https://reviews.apache.org/r/64570/diff/2/ > > > Testing > ------- > > See https://reviews.apache.org/r/64386/ > > > Thanks, > > Akash Gupta > >
