Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8472 YARN Container Phase 2
  3. YARN-8706

DelayedProcessKiller is executed for Docker containers even though docker stop sends a KILL signal after the specified grace period

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: None
    • Labels:
    • Target Version/s:

      Description

      DockerStopCommand adds a grace period of 10 seconds.

      10 seconds is also the default grace time use by docker stop
      https://docs.docker.com/engine/reference/commandline/stop/

      Documentation of the docker stop:

      the main process inside the container will receive SIGTERM, and after a grace period, SIGKILL.

      There is a DelayedProcessKiller in ContainerExcecutor which executes for all containers after a delay when sleepDelayBeforeSigKill>0. By default this is set to 250 milliseconds and so irrespective of the container type, it will always get executed.

      For a docker container, docker stop takes care of sending a SIGKILL after the grace period

      • when sleepDelayBeforeSigKill > 10 seconds, then there is no point of executing DelayedProcessKiller
      • when sleepDelayBeforeSigKill < 1 second, then the grace period should be the smallest value, which is 1 second, because anyways we are forcing kill after 250 ms

        Attachments

        1. YARN-8706.001.patch
          19 kB
          Chandni Singh
        2. YARN-8706.002.patch
          19 kB
          Chandni Singh
        3. YARN-8706.003.patch
          22 kB
          Chandni Singh
        4. YARN-8706.004.patch
          21 kB
          Chandni Singh
        5. YARN-8706.addendum.001.patch
          2 kB
          Chandni Singh

          Issue Links

            Activity

              People

              • Assignee:
                csingh Chandni Singh
                Reporter:
                csingh Chandni Singh
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: