From nobody Tue Feb 10 03:44:23 2026 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 1532569678576661.1089252602641; Wed, 25 Jul 2018 18:47:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF0CC356C9; Thu, 26 Jul 2018 01:47:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB2E516BEE; Thu, 26 Jul 2018 01:47:57 +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 9F71F18037EC; Thu, 26 Jul 2018 01:47:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6Q1luFe015112 for ; Wed, 25 Jul 2018 21:47:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id E42D2202704B; Thu, 26 Jul 2018 01:47:55 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-77.pek2.redhat.com [10.72.12.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E4DA2026D68; Thu, 26 Jul 2018 01:47:54 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:25 +0800 Message-Id: <20180726014725.13677-11-famz@redhat.com> In-Reply-To: <20180726014725.13677-1-famz@redhat.com> References: <20180726014725.13677-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 10/10] 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 26 Jul 2018 01:47:57 +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