Qian Zhang created MESOS-8905:
---------------------------------

             Summary: Remove a redundant resource update for the executor 
launched as a Docker container
                 Key: MESOS-8905
                 URL: https://issues.apache.org/jira/browse/MESOS-8905
             Project: Mesos
          Issue Type: Bug
          Components: docker
            Reporter: Qian Zhang


In `DockerContainerizerProcess::_launch` we have these codes:
{code:java}
Future<Containerizer::LaunchResult> DockerContainerizerProcess::_launch(
    const ContainerID& containerId,
    const ContainerConfig& containerConfig)
{
    ...
    .then(defer(self(), [=]() {
      return launchExecutorContainer(containerId, containerName);
    }))
    .then(defer(self(), [=](const Docker::Container& dockerContainer) {
      // Call update to set CPU/CFS/mem quotas at launch.
      // TODO(steveniemitz): Once the minimum docker version supported
      // is >= 1.7 this can be changed to pass --cpu-period and
      // --cpu-quota to the 'docker run' call in
      // launchExecutorContainer.
      return update(
          containerId, containerConfig.executor_info().resources(), true)
        .then([=]() {
          return Future<Docker::Container>(dockerContainer);
        });
    }))
    ...
{code}
With the fix to MESOS-6134, `launchExecutorContainer` will launch the executor 
as a Docker container and set its CPU quota accordingly, so we do not need the 
subsequent call to `update` to update the Docker container's resources again, 
actually it is already mentioned in the TODO above the call to `update`. So we 
should remove the call to `update` and also the TODO.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to