From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kPYqMCWrMGdZkgAAe85BDQ:P1 (envelope-from ) for ; Sun, 10 Nov 2024 12:46:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kPYqMCWrMGdZkgAAe85BDQ (envelope-from ) for ; Sun, 10 Nov 2024 13:46:29 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=gnUEZqxe; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=o8Fhe48B; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731242789; a=rsa-sha256; cv=none; b=OJJf89XqllT2RED9EIpcVj3geWbjyxZK6wAQzQuAOCqxiDi1S/V7i9Eh3Tr2fxkvHLTDk8 n8D8ZWHzX6Z1l/4CdXOh4jYi00kzCw7xMx/Fs97NwVucfWfNRwhVDfhD0Gbykb/lVGq6kK 1O2wQ56XDFH2ekdZx1HTUokQm6WbfJ+gbt1TZE6EqKP38enrmRUXE/eygzClvN3Vu8Bq3u tz2WEFMgBW4GOqgXrzZC0nhBIAuyQMZDotJjBeQ+PeOq3zOUd6hyy5UKOYtvFO4qbCNfY4 Ox9vz/zda+MGXkW+0eze3W4WZiHpDOkGqUgmbv2A1g8soX0KnOQO8b8WXseNTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=gnUEZqxe; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=o8Fhe48B; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731242789; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=g/VMnFZ2K4fPOyJZKpQjhw+KTsr8lvXX7+/+n+/OYqM=; b=ck/sbSm9Wxw4BppBSLuW/JKsGJh7Oo25gRs3Vb3V2SR8pGqcVRFfJHMdrm4/+PC0swrzhL 6IHEaPSWHO1XFKwHrZ0zmvRb7J6nv95dYOvj9TxOprawP57TZU7EEQ+f7h4SJjhndqYKH8 CbLR5GJRxlW8FVx7MxXc9797JT1qqK9fVNrpkfra+QSUhuhSZoX4XW3Vld0vfWwPkzBOQ4 sclrWebvkxGsig6gBwACalmwtZ0apSiVYimBtKkZ41HdxHhdawdPNvJKShpADTCrr6FawN zwU2dc/jjnmNurumUbRJJyg6+a2QcQ8YgkRoe2NRg4aPgGuYaEF5uMzbDv7gGQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 22A7482B07 for ; Sun, 10 Nov 2024 13:46:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA6Bs-0002MO-83; Sun, 10 Nov 2024 06:33:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tA6Bi-0002Le-Ji for bug-guix@gnu.org; Sun, 10 Nov 2024 06:33:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tA6Bi-0007wQ-3Q for bug-guix@gnu.org; Sun, 10 Nov 2024 06:33:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=g/VMnFZ2K4fPOyJZKpQjhw+KTsr8lvXX7+/+n+/OYqM=; b=gnUEZqxeSP6d2UzoJkO/CXc18OACu9L8EU76IArGPtMaoRBZH6ynDj1nXnYW2UtM8uh8AUp8Vm+f2xXVGH+7PaQnqhk4e8m9+yokgvCBuMEUjmw0ITIOsqhxyaWuum/PVbop0Y39o6w9i2VqwBJpxqWfQJgLiyqDyF2sYV+ja9WsBgm19jQG53sSEcylKB/W2n/DuqODatCP6vikGjBGdPv4nWZDjHrnJR2bs5rJOJVF/Wi9GnNR+g04aM38T03gKVr9i+71yBYScbVFWkL/eehG2lXTG0KecFg9oEhaP0LOSxxhWrTk6ILkg1REJJfje6f+/h5kTnqrmzu6XAyWtw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA6Bh-0005Bt-Ue for bug-guix@gnu.org; Sun, 10 Nov 2024 06:33:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74279: Shepherd service is not getting respawned. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 10 Nov 2024 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74279 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 74279@debbugs.gnu.org Received: via spool by 74279-submit@debbugs.gnu.org id=B74279.173123837919945 (code B ref 74279); Sun, 10 Nov 2024 11:33:01 +0000 Received: (at 74279) by debbugs.gnu.org; 10 Nov 2024 11:32:59 +0000 Received: from localhost ([127.0.0.1]:55950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA6Bf-0005Bc-Dz for submit@debbugs.gnu.org; Sun, 10 Nov 2024 06:32:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA6Bd-0005BN-Hr for 74279@debbugs.gnu.org; Sun, 10 Nov 2024 06:32:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tA6BX-0007w1-OF for 74279@debbugs.gnu.org; Sun, 10 Nov 2024 06:32:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=g/VMnFZ2K4fPOyJZKpQjhw+KTsr8lvXX7+/+n+/OYqM=; b=o8Fhe48BHrQ8eKdq1xO7 RwdUKC1WUhpBFQ4pqOcmwk5QRPuitQtdCnYM69XSMzDJXhwogO2gFoBIwejniSzUlnnjDaDn+xT3u pKxE7YzXHkvjaWnrCP187PZ96sB5n7xSGs2fduhOXqFM9YC3Z3xik8h3Uj0kwfzkGcjOMfOW+aY/x p58S9PYpA5TiGxiC3Bm7JrID6eJGtbsBHuK3C9PKB9mgJMCAWjBBJXMIVV9nUDY1embPeB7rBZEzi 141B1eP0v3v8+J1vhH7SKOs66UW/DwXbtcMqZbj/JXQFLpIus7fAU5Q/SH8AZ9Cpk73Onhfkt8FJK FkZ5EbGco9VXOQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87bjyo8net.fsf@wolfsden.cz> (Tomas Volf's message of "Sat, 09 Nov 2024 15:58:02 +0100") References: <87bjyo8net.fsf@wolfsden.cz> Date: Sun, 10 Nov 2024 12:32:48 +0100 Message-ID: <87zfm7wcgv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.56 X-Spam-Score: -3.56 X-Migadu-Queue-Id: 22A7482B07 X-Migadu-Scanner: mx10.migadu.com X-TUID: x5THijJkC2rS Hi Tomas, Tomas Volf <~@wolfsden.cz> skribis: > (start #~(lambda _ > (let* ((cmd "/run/privileged/bin/ping -qc1 -W1 1.1.1.1= ") > (status (system cmd))) > (=3D 0 (status:exit-val status))))) > (one-shot? #t) > ;; Try every second. > (respawn-delay 1) > ;; Retry forever. Double-quoting is intentional. > (respawn-limit ''(5 . 5))))) [...] > Nov 7 00:18:20 localhost shepherd[1]: Starting service network-online... > [..] > Nov 7 00:18:20 localhost shepherd[1]: [sh] PING 192.168.0.110 (192.168.0= .110): 56 data bytes > Nov 7 00:18:20 localhost shepherd[1]: [sh] /run/privileged/bin/ping: sen= ding packet: Network is unreachable > Nov 7 00:18:20 localhost shepherd[1]: Service network-online could not b= e started. > Nov 7 00:18:20 localhost shepherd[1]: Service network-online failed to s= tart. I think there=E2=80=99s a misunderstanding here: =E2=80=98respawn?=E2=80=99= is about respawning a service that, once it is running, terminates prematurely. In your case, the service does not start (its =E2=80=98start=E2=80=99 metho= d returns #f). Now, it would probably make sense to have a mechanism to retry starting services. In the specific case of =E2=80=98network-online=E2=80=99 though, you could = use a different approach: the =E2=80=98start=E2=80=99 method could itself try ret= ry pinging the network several times and fail only if it failed to reach the network after, say, 10s. (Remember that =E2=80=98start=E2=80=99 and =E2=80= =98stop=E2=80=99 must complete in a timely fashion.) HTH, Ludo=E2=80=99.