Return-Path: X-Original-To: apmail-mesos-user-archive@www.apache.org Delivered-To: apmail-mesos-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 357C2179EF for ; Tue, 14 Oct 2014 21:32:48 +0000 (UTC) Received: (qmail 44799 invoked by uid 500); 14 Oct 2014 21:32:48 -0000 Delivered-To: apmail-mesos-user-archive@mesos.apache.org Received: (qmail 44763 invoked by uid 500); 14 Oct 2014 21:32:48 -0000 Mailing-List: contact user-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@mesos.apache.org Delivered-To: mailing list user@mesos.apache.org Received: (qmail 44753 invoked by uid 99); 14 Oct 2014 21:32:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Oct 2014 21:32:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.213.174] (HELO mail-ig0-f174.google.com) (209.85.213.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Oct 2014 21:32:20 +0000 Received: by mail-ig0-f174.google.com with SMTP id a13so16207989igq.13 for ; Tue, 14 Oct 2014 14:32:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :mime-version:subject:message-id:date:references:in-reply-to:to; bh=MxvSAtzqwHy6YtLv2BAp/9kwwdRKSl6BNaKRUTIXjQ4=; b=j/Ftd/zokkcb10xMeyFZ2v2ZgksNuWlnyTtsTu873ZyGZ19aX1aSREU8DAOwcKWs6L ZPN4B5iIrO7SBBSpmeaFEAo9xdWq5cVrM/WH3P4WiixuhkR5E8kXCdTulQnU68QZKAS8 haVvd4XXl9C4DndG/t2LnEwI90TeWDmJeMGK3rMBRUvq+NjCAuyze82stT0P4jqjRJXg o4vM1CrQVCA1XTw+d5SuBqoBePVNVFesooa7wh55dcroE3ZCsnheBZ8UftcdaNGTdeps 50lqEvKB05AD4mFNj+JsA3y5XpaJgCUA2K4/YjwD75p7aQdPSyQ4uSDMYDlCIyZTyi5M gKzg== X-Gm-Message-State: ALoCoQlL/btyQnpRB/6HciD1G5iRnER4c02xSqy1kZqL378tsksOlmQ1pEqvUDVxZnUdniBIjK0q X-Received: by 10.42.5.72 with SMTP id 8mr7253217icv.27.1413322339142; Tue, 14 Oct 2014 14:32:19 -0700 (PDT) Received: from [10.111.223.81] ([173.209.211.226]) by mx.google.com with ESMTPSA id rp5sm4346961igb.20.2014.10.14.14.32.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 14:32:18 -0700 (PDT) From: Ankur Chauhan Content-Type: multipart/alternative; boundary=Apple-Mail-DBEDE6B0-B8F5-4E11-9931-50538228D461 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: Killing Docker containers Message-Id: <9614BA5A-3FE4-4743-B3D4-CDF241E845C5@malloc64.com> Date: Tue, 14 Oct 2014 14:32:16 -0700 References: In-Reply-To: To: "user@mesos.apache.org" X-Mailer: iPhone Mail (12A405) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-DBEDE6B0-B8F5-4E11-9931-50538228D461 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ++ I was planning on submitting that patch. But if someone has this sorted o= ut already, I'll defer.=20 Sent from my iPhone > On Oct 14, 2014, at 2:19 PM, Ryan Thomas wrote: >=20 > The docker stop command will attempt to kill the container if it doesn't s= top in 10 seconds by default. I think we should be using this with the -t fl= ag to control the time between stop and kill rather than just using kill. >=20 > I'll try to submit a patch. >=20 > Cheers, >=20 > ryan >=20 >> On 15 October 2014 05:37, Scott Rankin wrote: >> Hi All, >>=20 >> I=E2=80=99m working on prototyping Mesos+Marathon for our services platfo= rm, using apps deployed as Docker containers. Our applications register the= mselves with our service discovery framework on startup and un-register them= selves when they shut down (assuming they shut down reasonably gracefully). = What I=E2=80=99m finding is that when Mesos shuts down a docker container, i= t uses =E2=80=9Cdocker kill=E2=80=9D as opposed to =E2=80=9Cdocker stop=E2=80= =9D. I can see the reasoning behind this, but it causes a problem in that t= he container doesn=E2=80=99t get a chance to clean up after itself. =20 >>=20 >> Is this something that might be addressed? Perhaps by trying docker stop= and then running kill if it doesn=E2=80=99t shut down after 30 seconds or s= omething? =20 >>=20 >> Thanks, >> Scott >> This email message contains information that Corporate Reimbursement Serv= ices, Inc. considers confidential and/or proprietary, or may later designate= as confidential and proprietary. It is intended only for use of the individ= ual or entity named above and should not be forwarded to any other persons o= r entities without the express consent of Corporate Reimbursement Services, I= nc., nor should it be used for any purpose other than in the course of any p= otential or actual business relationship with Corporate Reimbursement Servic= es, Inc. If the reader of this message is not the intended recipient, or the= employee or agent responsible to deliver it to the intended recipient, you a= re hereby notified that any dissemination, distribution, or copying of this c= ommunication is strictly prohibited. If you have received this communication= in error, please notify sender immediately and destroy the original message= . >>=20 >> Internal Revenue Service regulations require that certain types of writte= n advice include a disclaimer. To the extent the preceding message contains a= dvice relating to a Federal tax issue, unless expressly stated otherwise the= advice is not intended or written to be used, and it cannot be used by the r= ecipient or any other taxpayer, for the purpose of avoiding Federal tax pena= lties, and was not written to support the promotion or marketing of any tran= saction or matter discussed herein. >>=20 >=20 --Apple-Mail-DBEDE6B0-B8F5-4E11-9931-50538228D461 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
++ I was planning on submitting that p= atch. But if someone has this sorted out already, I'll defer. 

S= ent from my iPhone

On Oct 14, 2014, at 2:19 PM, Ryan Thomas &l= t;r.n.thomas@gmail.com> wrote= :

The docker st= op command will attempt to kill the container if it doesn't stop in 10 secon= ds by default. I think we should be using this with the -t flag to control t= he time between stop and kill rather than just using kill.

I'll try to submit a patch.

Cheers,
ryan

On 15 October 2014 05:37, Scott Rankin <srankin@crsinc.com>= ; wrote:
Hi All,

I=E2=80=99m working on prototyping Mesos+Marathon for our services plat= form, using apps deployed as Docker containers.  Our applications regis= ter themselves with our service discovery framework on startup and un-regist= er themselves when they shut down (assuming they shut down reasonably gracefully).  What I=E2=80=99m finding is th= at when Mesos shuts down a docker container, it uses =E2=80=9Cdocker kill=E2= =80=9D as opposed to =E2=80=9Cdocker stop=E2=80=9D.  I can see the reas= oning behind this, but it causes a problem in that the container doesn=E2=80= =99t get a chance to clean up after itself.  

Is this something that might be addressed?  Perhaps by trying dock= er stop and then running kill if it doesn=E2=80=99t shut down after 30 secon= ds or something?  

Thanks,
Scott

This email message contains information that Corporate R= eimbursement Services, Inc. considers confidential and/or proprietary, or ma= y later designate as confidential and proprietary. It is intended only for u= se of the individual or entity named above and should not be forwarded to any other persons or entities wi= thout the express consent of Corporate Reimbursement Services, Inc., nor sho= uld it be used for any purpose other than in the course of any potential or a= ctual business relationship with Corporate Reimbursement Services, Inc. If the reader of this message i= s not the intended recipient, or the employee or agent responsible to delive= r it to the intended recipient, you are hereby notified that any disseminati= on, distribution, or copying of this communication is strictly prohibited. If you have received this com= munication in error, please notify sender immediately and destroy the origin= al message.

Internal Revenue Service regulations require that certa= in types of written advice include a disclaimer. To the extent the preceding= message contains advice relating to a Federal tax issue, unless expressly s= tated otherwise the advice is not intended or written to be used, and it cannot be used by the recipient or a= ny other taxpayer, for the purpose of avoiding Federal tax penalties, and wa= s not written to support the promotion or marketing of any transaction or ma= tter discussed herein.


= --Apple-Mail-DBEDE6B0-B8F5-4E11-9931-50538228D461--