From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MAYrMNgaI2T3QwEASxT56A (envelope-from ) for ; Tue, 28 Mar 2023 18:50:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YNo2L9gaI2TmSwAAG6o9tA (envelope-from ) for ; Tue, 28 Mar 2023 18:50:32 +0200 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 8A226F777 for ; Tue, 28 Mar 2023 18:50:32 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680022232; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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; bh=uCEHynOZlb8e0yVN8pXJyDYIG5SnswCIimuvb/NYTA4=; b=gBAXfxOttKV+WMxWls5s7G8PbSICsMb9c8ZFJkBorWhaq5oTZq3Y3KH4fZEIXlb+rnmXul uguLt6JMvGFmzjtgCNqmswakvHw4aRtiAziXCCIshEQ7SaLLgqwU3Snz6/4fIcg3xCGqkI jkhGV/1EUXZ6BwYnNMHcUM6HcV1B/4kP4OPdwZzw2OCvNrZobKwcACN3C1osgEM915K7dW Lo8mvOTfIev3myduO7m/Qn/PkTwioWOixhNXxcyX+j9EsCgfmgLFxFWoWmiYsbVH4QEOHL INg8cHHEX4GWb6RNhoA2bY1gYXpCHc9MAHskEZKItinqF6S0HnohfXQ6yZkrnA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680022232; a=rsa-sha256; cv=none; b=Ibgn1Sp6+onPlemHJdMUkiseW7PyQF8UK/rujXQJiARS3vSOpUhj72u4oBppJDU0iUp78g jGpxlOAwr/xOgZOYdw4Ad9KDlsPRW05CM+NGYxqdnrgR1z0fXB/D1Ma8E1IZQczgJ3BS2O ZUEiSpMin1yBSfiNEJBO5d7hPmjf5w8FJ3Nn+hpj6dRYfA8p2hW1f6tXf9VhqLuTBdjqOR IN79YviFDccjFETvIG/KB0q+DDeJ+M8vMJHHgnP88ul3C52HfC0zkPTT56X7DMYuWLnVrT ytuRKrjj/cJyMGrL6GhC58JRcOoDGWwapw6Ht7mxBTKVbQHoaPyJxMo+iw/jLQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phCWL-0004nV-AH; Tue, 28 Mar 2023 12:50:05 -0400 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 1phCWJ-0004n9-IF for bug-guix@gnu.org; Tue, 28 Mar 2023 12:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phCWI-0000qn-W7 for bug-guix@gnu.org; Tue, 28 Mar 2023 12:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phCWI-0006Z6-Av for bug-guix@gnu.org; Tue, 28 Mar 2023 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#62163: Suppress logging shepherd evaluation in mcron.log Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 28 Mar 2023 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62163 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 62163@debbugs.gnu.org, Maxim Cournoyer Received: via spool by 62163-submit@debbugs.gnu.org id=B62163.168002217625189 (code B ref 62163); Tue, 28 Mar 2023 16:50:02 +0000 Received: (at 62163) by debbugs.gnu.org; 28 Mar 2023 16:49:36 +0000 Received: from localhost ([127.0.0.1]:50597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phCVr-0006YD-SN for submit@debbugs.gnu.org; Tue, 28 Mar 2023 12:49:36 -0400 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:54996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phCVp-0006Y2-Ud for 62163@debbugs.gnu.org; Tue, 28 Mar 2023 12:49:34 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 905D4204E3; Tue, 28 Mar 2023 18:49:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 0B966800A4; Tue, 28 Mar 2023 18:32:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fYNAtPXjIpIu; Tue, 28 Mar 2023 18:32:18 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7CDB7800A1; Tue, 28 Mar 2023 18:32:18 +0200 (CEST) Message-ID: <8164fa63-99bd-f1d5-2f21-628f079c6039@makinata.eu> Date: Tue, 28 Mar 2023 17:32:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US References: <31d1f072-0276-6fa5-0adf-6c18177d4d01@makinata.eu> <87ileq1gqo.fsf@gmail.com> <875yakg7w2.fsf@gnu.org> From: Bruno Victal In-Reply-To: <875yakg7w2.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: X-Migadu-Queue-Id: 8A226F777 X-Spam-Score: -2.83 X-Migadu-Spam-Score: -2.83 X-Migadu-Scanner: scn0.migadu.com 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-TUID: QSqm955E3uhA Hi Ludo’, On 2023-03-28 17:25, Ludovic Courtès wrote: > > Nope. :-) What is ‘my-heartbeat-job’ doing? It queries shepherd to see if a service is running and sends a restart if required. It looks like this: (#$task is what will perform the actual checks) --8<---------------cut here---------------start------------->8--- (define* (heartbeat-supervisor #:key (name #f) service task #:allow-other-keys) ;; Query service status and restart if needed. (program-file (format #f "~@[~a-~]heartbeat-supervisor.scm" name) (with-imported-modules (source-module-closure '((gnu services herd))) #~(begin (use-modules (gnu services herd) (srfi srfi-1)) (define (is-service-running? sym) (lambda (x) (and (live-service-running x) (memq sym (live-service-provision x))))) (let ((running? (not (null? (any (is-service-running? '#$service) (current-services)))))) (when running? (case (status:exit-val (system* #$task)) ((0) #t) ((125) (format #t "Heartbeat worker error~%")) (else (format #t "Issuing restart for service '~a'~%" '#$service) (restart-service '#$service))))) (exit))))) --8<---------------cut here---------------end--------------->8--- This message also shows up if you're using certbot-service-type, so it's not specific to the snippet above. Cheers, Bruno