From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DATE_IN_PAST_03_06, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 5948 invoked from network); 23 Sep 2022 20:38:22 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 23 Sep 2022 20:38:22 -0000 Received: (qmail 7756 invoked by uid 89); 23 Sep 2022 20:38:45 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 7749 invoked from network); 23 Sep 2022 20:38:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1663965493; x=1664051893; bh=D6+CusUg8U uQxnPCmEajA4JjJeOoSgJLZkqnOv82d/I=; b=TZEB/QHz3hUPGBM4lJq9UBpsno NBwztZNlfYa7Xp+i6yR1WOOyEhlfnw1LZ2UJbaBMrNQgT+eS+x1AohN90AC3X3TE tqnEUHHmr31+5IvYZpfOmHzi7xStYHSumcYVBE8vAPDgWuTmse1rozGVKYPZ8eDo 7x6QbpF8SFEP/ZxensdnQJ6HCq73xriXwSj/FrJKX2EP4UuzBrkPK12076n65Yio Nz+wBdC+RZsRetFc3pNV9GgZDU1lUCmN4LNfPhTQ7iY6KwXkMUFMlNVvbSyoUPy7 QjQkPLRyASsliF7nXezf9UovIossQJRyHQbADB0Km0pQaJ13xp0iebaoJxXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1663965493; x=1664051893; bh=D6+CusUg8UuQxnPCmEajA4JjJeOo SgJLZkqnOv82d/I=; b=LcAhH6gSXJLUQYBFZCXnYSE7W7A+gd2wFY4sjBNgOtYx 5FlwRKMbSO8bUluSAx1y5sMlPeWoiR6yOkmNgukHeUdE5PrrXy3OzIKRlJHwyljE RlxtqcdxBC61eOfjdpRD6Vmx9di74R96dLg6Qa9h5sz2p7hU2NpPWHzWTYOPScTE TzJxJ72l2b35YCHaofIIHJ9n/r73uFw0Zh/19zFMveN/JJZF5kCwAE+BSw4OD/qZ kQ1+VswSckHDHlkwTAoIVCvLQyT0meK/qDVD6UMozPcxkCsFNjxeF4s9pVq9q4sb geB/sO10vEIBMr3nFrCzFjmXJhzw1ODDwFfirxX3Vg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeefiedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefujghffffkgggtsehgtd erredttddtnecuhfhrohhmpeetlhihshhsrgcutfhoshhsuceohhhisegrlhihshhsrgdr ihhsqeenucggtffrrghtthgvrhhnpeeiudffueeilefgtefgtddttdekkeehkefgheekud efveetgeefiefftedvteeuveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehhihesrghlhihsshgrrdhish X-ME-Proxy: Feedback-ID: i12284293:Fastmail From: Alyssa Ross To: John W Higgins Cc: Tor Rune Skoglund , supervision@list.skarnet.org Subject: Re: "Back off" setting for crashing services with s6+openrc? In-Reply-To: References: <76856b27-1653-4e3c-28a5-737b63dea1f0@fourc.eu> Date: Fri, 23 Sep 2022 16:44:53 +0000 Message-ID: <871qs2vy4a.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain John W Higgins writes: > Good Day, > > On Thu, Sep 22, 2022 at 1:13 PM Tor Rune Skoglund wrote: > ... > >> As a generic question, is there any setting with this s6+openrc config >> that would make s6 "back off" a configurable number of seconds before >> doing the restart? >> >> > Does something as simple as changing your run script to be something like > > run_my_crashing_app || sleep 10 > > Work? The run script will sit there for 10 seconds if your app fails. Not > built in - but should accomplish the task pretty easily. I think there's a correctness problem with this approach. An s6-supervise process supervises its direct child, which is supposed to be the daemon under supervision. But in this case it would be the shell, so s6 doesn't know the daemon's PID, and so can't signal it. If s6 tries to stop the service, it will signal the shell, which won't necessarily do the right thing and stop the application. An s6 service needs to ensure that the service is stopped if s6-supervise's direct child dies. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEH9wgcxqlHM/ARR3h+dvtSFmyccAFAmMt4oYACgkQ+dvtSFmy ccAeug/+JkKY819mtzXDt+q/CM6niRqlycWEvFcRMR35+OnwOgc4TUxDCdqthIGo pp2JN3leLGhbAGR8epRk3l8ddOa7MA0s89pvZriJnEFiSbf/ZUlNXHpJQGr9m5lp KpyxkhhhpFto9Z2I0MDEB84ES/FFKw0vVpc+A83VZ8rVOrg8CLB0QJP9k6KQNXIQ gePc1UiKhAgsNChF32oPr1jI2h6LAiI6jv4JjLwwEyPEsYT2brBMJfVrmN+6Iygx Uoi57b24IG3akYTmRikIGF1CXRHVjfHtDlS3k9xrFIMe9KJv3sGFNsi3UWLtBcMU BFFI3TSlKMa56gWBXtKdM/QdJf0ct9d7CurpJtxFD0K2gND0MKgx/wNAKQwZPvgd P+GVwHZJQ2m8UW4QBVM7UevR/jBRJhSbUbux/hrkALdDwDtALmm8OX6zrUXc2wSt LU/GkAmcuY9cP4RLhzC+p9pB+L5iSUMBkyc03TFW0kREZ8Ibfq1HI4gEVlp/Tvd1 9pcqbf2wYCen7xG1s/A184me5dEJHCCz558TRYl0Hux7FnyGXoIprCT7ZWa/VlI9 Y8isspRCbwVl4SNfInHPf9ogtfeJ4JRCp36hMzazAG0W2fBSNWSpqhi2hnOC3hfj 9PHB0QJjkwpE/z0+5mXVfsw8PfiavR0t7UU+XjwV+gRSoUupfGs= =JWEZ -----END PGP SIGNATURE----- --=-=-=--