----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56341/ -----------------------------------------------------------
Review request for mesos, Jie Yu and Kevin Klues. Bugs: MESOS-7027 https://issues.apache.org/jira/browse/MESOS-7027 Repository: mesos Description ------- The environment variables given to the command executor will sometimes modify the behavior of the command executor, rather than the command task (which is often the intended target of the environment variables). For example, specifying `LIBPROCESS_IP=invalid` will cause the command executor to terminate itself as soon as it starts. We do not filter out environment variables because these types of errors generally fall under "user error" or "operator error". The command executor inherits environment variables from: * (User) Variables inside a `CommandInfo`; * (Operator) Hooks and isolators installed/enabled on the agent; * (Operator) The agent flag `--executor_environment_variables`; * And Mesos-specific variables provided by the agent. This commit adds a special case for the command executor. Isolator environment variables should be passed into the command executor separately, as the command executor explicitly depends on environment variables from the agent. In some cases, environment variables from the isolator will cause the command executor to fail; while some variables are necessary for the command executor to function. For example, when running a container image with the unified containerizer, if the container image contains the environment variable `LIBPROCESS_IP=invalid`, the command executor will fail. For a counter example, when SSL is enabled on the agent, without downgrade support, you may need to add hooks/isolators to supply the relevant `LIBPROCESS_SSL_*` environment variables. Otherwise, the command executor will not be able to register. Diffs ----- src/launcher/executor.cpp 0c770bb18ae8bd8df85589b5262f457ab50574a9 src/slave/containerizer/mesos/containerizer.cpp d2b4f75a55dbe4746bc2dfc180335fa831a554ef Diff: https://reviews.apache.org/r/56341/diff/ Testing ------- In progress... NOTE: As mentioned in the commit description, this patch addresses one problem (unified containerizer env vars + command task), while exacerbating another (SSL + command task). Thanks, Joseph Wu