Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8905

Remove a redundant resource update for the executor launched as a Docker container

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • docker
    • None

    Description

      In `DockerContainerizerProcess::_launch` we have these codes:

      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);
              });
          }))
          ...
      

      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.

      Attachments

        Activity

          People

            shukumar Shubham Kumar
            qianzhang Qian Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: