> On Jan. 9, 2018, 5:58 p.m., Andrew Schwartzmeyer wrote: > > src/slave/containerizer/docker.cpp > > Lines 1464-1468 (patched) > > <https://reviews.apache.org/r/64570/diff/2/?file=1931065#file1931065line1464> > > > > 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`.
Sadly, I think the path to docker is different depending on the installer (Win 10 installer vs Windows Server installer), so it can't be hard coded. Maybe call out to powershell's `Get-Command docker` to get the docker path? - Akash ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64570/#review195050 ----------------------------------------------------------- On Jan. 5, 2018, 12:32 a.m., Akash Gupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64570/ > ----------------------------------------------------------- > > (Updated Jan. 5, 2018, 12:32 a.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 > >
