From nobody Tue May 13 19:59:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15326640152121007.3696857967502; Thu, 26 Jul 2018 21:00:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE502307D869; Fri, 27 Jul 2018 04:00:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7AC43797; Fri, 27 Jul 2018 04:00:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C921C4BB78; Fri, 27 Jul 2018 04:00:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6R40CK5018739 for ; Fri, 27 Jul 2018 00:00:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6D6E0111C4BD; Fri, 27 Jul 2018 04:00:12 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-150.pek2.redhat.com [10.72.12.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC706111C4AB; Fri, 27 Jul 2018 04:00:10 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Fri, 27 Jul 2018 11:59:33 +0800 Message-Id: <20180727035934.32555-11-famz@redhat.com> In-Reply-To: <20180727035934.32555-1-famz@redhat.com> References: <20180727035934.32555-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH v2 10/11] docker: Unlimited restart of systemd service X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 27 Jul 2018 04:00:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Sleeping for 60 seconds makes sure we don't hog the machine, and keep retrying helps us survive transient network issues. The patch is not tested, I just referenced systemd document for it. Signed-off-by: Fam Zheng --- scripts/playbooks/templates/docker.service.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/playbooks/templates/docker.service.j2 b/scripts/playbo= oks/templates/docker.service.j2 index 45d2871..afd5df1 100644 --- a/scripts/playbooks/templates/docker.service.j2 +++ b/scripts/playbooks/templates/docker.service.j2 @@ -2,6 +2,7 @@ Description=3DPatchew docker instance control service for {{ instance_name= }} Requires=3Ddocker.service After=3Ddocker.service +StartLimitIntervalSec=3D0 =20 [Service] Restart=3Dalways @@ -11,6 +12,7 @@ ExecStart=3D/usr/bin/docker run --privileged --name {{ in= stance_name }} \ -e PATCHEW_DATA_DIR=3D/data/patchew \ patchew:{{ instance_name }} ExecStop=3D/usr/bin/docker stop -t 10 {{ instance_name }} +RestartSec=3D60 =20 [Install] WantedBy=3Ddefault.target --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel