You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/05/28 00:19:56 UTC
[3/6] mesos git commit: Removed duplicate call to
containerizer::executorEnvironment.
Removed duplicate call to containerizer::executorEnvironment.
In this code path, where the task uses the default command executor,
and the agent is not dockerized
(i.e. `taskInfo.isSome() && flags.docker_mesos_image.isNone()`),
the `executorEnvironment` function is called twice.
The first call is inside the `Container*` constructor called by
`Container::create`. Since `Container::create` gives passes `None`
for the `environment` field, the constructor will call
`executorEnvironment` to populate the `environment` field.
The populated field is then accessible by `launchExecutorProcess`.
Review: https://reviews.apache.org/r/47212/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9b054cc4
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9b054cc4
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9b054cc4
Branch: refs/heads/master
Commit: 9b054cc46d462ad5c8c5074b8b5c9e7eeac3dabf
Parents: 8202937
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Fri May 27 17:19:22 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri May 27 17:19:22 2016 -0700
----------------------------------------------------------------------
src/slave/containerizer/docker.cpp | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b054cc4/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 0b866c1..47c4148 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -1197,14 +1197,7 @@ Future<pid_t> DockerContainerizerProcess::launchExecutorProcess(
container->state = Container::RUNNING;
// Prepare environment variables for the executor.
- map<string, string> environment = executorEnvironment(
- container->executor,
- container->directory,
- container->slaveId,
- container->slavePid,
- container->checkpoint,
- flags,
- false);
+ map<string, string> environment = container->environment;
// Include any enviroment variables from ExecutorInfo.
foreach (const Environment::Variable& variable,