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

Docker kill does not allow containers to exit gracefully

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.1
    • Fix Version/s: 0.21.1
    • Component/s: containerization
    • Labels:
      None
    • Sprint:
      Mesosphere Q4 Sprint 2 - 11/14

      Description

      The docker implementation uses the docker kill command, this immediately terminated the container, not allowing it to exit gracefully.

      We should be using the docker stop command that will send a kill after a predetermined amount of time.

        Activity

        Hide
        tnachen Timothy Chen added a comment -

        Let me know if you have any questions working on the patch.

        Show
        tnachen Timothy Chen added a comment - Let me know if you have any questions working on the patch.
        Hide
        rthomas Ryan Thomas added a comment -

        Thanks. I went with just a 30 second timeout for the stop (the default is 10) - though I think some time in the future we may want to make this configurable.

        Show
        rthomas Ryan Thomas added a comment - Thanks. I went with just a 30 second timeout for the stop (the default is 10) - though I think some time in the future we may want to make this configurable.
        Hide
        rthomas Ryan Thomas added a comment -
        Show
        rthomas Ryan Thomas added a comment - Patch here: https://reviews.apache.org/r/26709/
        Hide
        ankurcha Ankur Chauhan added a comment -
        Show
        ankurcha Ankur Chauhan added a comment - Patch here: https://reviews.apache.org/r/26736/ LGTM
        Hide
        ryant Ryan Thomas added a comment -

        Timothy Chen is there anything more to do in order to get this patch merged?

        Show
        ryant Ryan Thomas added a comment - Timothy Chen is there anything more to do in order to get this patch merged?
        Hide
        benjaminhindman Benjamin Hindman added a comment -

        commit eb075f9b7b518a72249f5a68538f356ba63aa79d
        Author: Ryan Thomas <ryan@ryant.org>
        Date: Thu Nov 13 17:16:00 2014 -0800

        Destroy Docker containers with stop instead of kill.

        Ensure docker calls stop if a docker_stop_timeout is provided.
        Added the flag docker_stop_timeout that defaults to 0, if the
        timeout is 0 the a docker kill will be run, otherwise a docker stop
        with the timeout in seconds is used.

        Review: https://reviews.apache.org/r/26736

        Show
        benjaminhindman Benjamin Hindman added a comment - commit eb075f9b7b518a72249f5a68538f356ba63aa79d Author: Ryan Thomas <ryan@ryant.org> Date: Thu Nov 13 17:16:00 2014 -0800 Destroy Docker containers with stop instead of kill. Ensure docker calls stop if a docker_stop_timeout is provided. Added the flag docker_stop_timeout that defaults to 0, if the timeout is 0 the a docker kill will be run, otherwise a docker stop with the timeout in seconds is used. Review: https://reviews.apache.org/r/26736

          People

          • Assignee:
            tnachen Timothy Chen
            Reporter:
            rthomas Ryan Thomas
            Shepherd:
            Timothy Chen
          • Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Agile