From unknown Fri Jun 20 07:09:01 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#55080 <55080@debbugs.gnu.org> To: bug#55080 <55080@debbugs.gnu.org> Subject: Status: [PATCH shepherd] service: Gracefully handle non-existing log directories. Reply-To: bug#55080 <55080@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:01 +0000 retitle 55080 [PATCH shepherd] service: Gracefully handle non-existing log = directories. reassign 55080 guix-patches submitter 55080 Liliana Marie Prikler severity 55080 normal tag 55080 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 23 09:17:33 2022 Received: (at submit) by debbugs.gnu.org; 23 Apr 2022 13:17:33 +0000 Received: from localhost ([127.0.0.1]:55462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niFdk-0006IO-KP for submit@debbugs.gnu.org; Sat, 23 Apr 2022 09:17:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:53812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niFdi-0006HN-Rx for submit@debbugs.gnu.org; Sat, 23 Apr 2022 09:17:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niFdi-0004z1-7x for guix-patches@gnu.org; Sat, 23 Apr 2022 09:17:30 -0400 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]:33336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niFdg-0000ea-Bz; Sat, 23 Apr 2022 09:17:29 -0400 Received: by mail-ed1-x542.google.com with SMTP id e30so9964941eda.0; Sat, 23 Apr 2022 06:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:cc:content-transfer-encoding:message-id :mime-version; bh=LzLJ6HhTZdQMiXZb0LVHUWGq6v6jGE0mOLNURaveW/c=; b=lkcyrcoAZJzIL2LnHAPLzqjnA5jgon2YgEy520ma128SXTs5rMqLrhws30cTOKltv0 EEueM0KcmFdtvQev+KZsGctRpepgetkcOqOHYK/kl8UxUIgdgnl5Ud7+lzkkU7FLL9GK G09HJrNSApWgy+amy1ltJ2AkZ5aM0r8vyazWDUoV/3knwVGB/Cb03jyXGs6EHuAtIRon cZzNtv1uspuDXXAbqBvp9I3hsVagTghaYmI4VGeCawUCetbaWcaU8y4K0P2vdhKGH8eA 2+coEAJBTZmccLeL2Nozod9OU5rY0YsVXVCFUllq2jcnhtwXlbCvAtsBBzU2H3rMO4Gk QxxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:cc :content-transfer-encoding:message-id:mime-version; bh=LzLJ6HhTZdQMiXZb0LVHUWGq6v6jGE0mOLNURaveW/c=; b=J/xY9UVLX0DqZ9spplF31hEdegUqyB306Snr+Cq2h2CbAk3RcTmuF9UwK5Cgj/y8r6 sv4iieuos95sHNdtXHVSZMo4pM1GOgRPkpBibuAi60JBivaDOZUYLFy3DV41oRCQW1Tc ee8nmbv/Fk9/m9jmJUQOC3jgnTXx0TqHctGRCZZ1dtbCNMy4/RvjtDou8FRSpGUwyZfF cVFXW9hm/fPX/ezJrv4gK1SrISLr7HpvJENOieGbkcrGUNm9aKFqKlSsdlDXXv4TifC8 0iiZ5c0+BOwWGH0Ttc3cMhrK1cqQMcZppHXC3xClkibIwfmkm+Q3peeg7gTJrbHbxw3/ B+aw== X-Gm-Message-State: AOAM530S97TqeyibpBtiArv7Vw4OdWPnnS/MtnDp280UgClE86lIfEpI 1/wGsU6p9I9eOdhi8PUHZc5yM4PmyEE= X-Google-Smtp-Source: ABdhPJxcOEDoCWbau2L6N86ZiUSRcMdsQj19YI430iE10gDj59WANsnEl8MEJhKseh0dixheUY5ZKQ== X-Received: by 2002:a05:6402:b57:b0:41d:6d9b:7e0d with SMTP id bx23-20020a0564020b5700b0041d6d9b7e0dmr10020860edb.78.1650719844739; Sat, 23 Apr 2022 06:17:24 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id h22-20020a056402281600b004206bd9d0c6sm2287355ede.8.2022.04.23.06.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 06:17:24 -0700 (PDT) From: Liliana Marie Prikler Date: Sat, 23 Apr 2022 15:11:50 +0200 Subject: [PATCH shepherd] service: Gracefully handle non-existing log directories. to: guix-patches@gnu.org Content-Transfer-Encoding: 7bit Message-ID: <2e5292c2d45e525aa1b8e4c495704104d4121291.camel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::542; envelope-from=liliana.prikler@gmail.com; helo=mail-ed1-x542.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: ludo@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/services.scm (%service-file-logger): New variable, implementing... (service-file-logger): ... the old behaviour of this variable. Catch system errors from %service-file-logger and handle them. --- modules/shepherd/service.scm | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm index 013347b..567a08b 100644 --- a/modules/shepherd/service.scm +++ b/modules/shepherd/service.scm @@ -873,9 +873,9 @@ daemon writing FILE is running in a separate PID namespace." (try-again) (apply throw args))))))) -(define (service-file-logger file input) - "Return a thunk meant to run as a fiber that reads from INPUT and logs it to -FILE." +(define (%service-file-logger file input) + "Like 'service-file-logger', but doesn't handle the case in which FILE does +not exist." (let* ((fd (open-fdes file (logior O_CREAT O_WRONLY O_APPEND) #o640)) (output (fdopen fd "al"))) (set-port-encoding! output "UTF-8") @@ -894,6 +894,19 @@ FILE." (format output "~a~a~%" prefix line) (loop)))))))))) +(define (service-file-logger file input) + "Return a thunk meant to run as a fiber that reads from INPUT and logs it to +FILE." + (catch 'system-error + (lambda () + (%service-file-logger file input)) + (lambda args + (if (= ENOENT (system-error-errno args)) + (begin + (mkdir-p (dirname file)) + (%service-file-logger file input)) + (apply throw args))))) + (define (service-builtin-logger command input) "Return a thunk meant to run as a fiber that reads from INPUT and logs to 'log-output-port'." -- 2.35.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 10:15:45 2022 Received: (at 55080) by debbugs.gnu.org; 30 Apr 2022 14:15:45 +0000 Received: from localhost ([127.0.0.1]:58777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nknsu-0007SS-Qo for submit@debbugs.gnu.org; Sat, 30 Apr 2022 10:15:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nknsu-0007SG-6x for 55080@debbugs.gnu.org; Sat, 30 Apr 2022 10:15:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nknso-0004JQ-Oo; Sat, 30 Apr 2022 10:15:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=vHvVgdnR+6zn59L045OWabG+JFHnCQKgb4OhoFiBArU=; b=E3qZSON98TJUiTXuu8fH qS8a7t3hhjCQfVCUn3otBoDSGqCiIevR28G1je9qfci6+dVxaKk9wTRdvTygmZ77Jy7eisAFu9rYN ZksO2/ToJpgJ/q7jDBKvG5qMj03EDsl3eG+jt/63PPDYVeBUI+QhazzBNw6KIjXPgPjSc2vPdq8XN n+YkA138EXxgXjP1hE+AcjNF31QqqQ2IckxMdGHCT5NTXGtilJr5CqwHa2h6eXOgoPo0cEdTJaJpA McFopjQb9NvCpd9MlI1XspmubGvm1PxHgMaQ44eDWX0HgRAN6+NDlK2y+B7FS+jplwE5JsSgBeWXP 54yvnVkuYhHGbQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59400 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nknsl-00055q-Ud; Sat, 30 Apr 2022 10:15:38 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#55080: [PATCH shepherd] service: Gracefully handle non-existing log directories. References: <2e5292c2d45e525aa1b8e4c495704104d4121291.camel@gmail.com> Date: Sat, 30 Apr 2022 16:15:33 +0200 In-Reply-To: <2e5292c2d45e525aa1b8e4c495704104d4121291.camel@gmail.com> (Liliana Marie Prikler's message of "Sat, 23 Apr 2022 15:11:50 +0200") Message-ID: <8735hu64je.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55080 Cc: 55080@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Liliana Marie Prikler skribis: > * gnu/packages/services.scm (%service-file-logger): New variable, > implementing... > (service-file-logger): ... the old behaviour of this variable. Catch sys= tem > errors from %service-file-logger and handle them. [...] > +(define (service-file-logger file input) > + "Return a thunk meant to run as a fiber that reads from INPUT and logs= it to > +FILE." > + (catch 'system-error > + (lambda () > + (%service-file-logger file input)) > + (lambda args > + (if (=3D ENOENT (system-error-errno args)) > + (begin > + (mkdir-p (dirname file)) > + (%service-file-logger file input)) > + (apply throw args))))) I wonder to what extent automatically creating log directories is a good idea. A potential drawback is if shepherd creates them with unexpected ownership or permissions. Did you encounter this issue while working on services? Am I right that the Shepherd 0.8 had the same problem? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 10:26:48 2022 Received: (at 55080) by debbugs.gnu.org; 30 Apr 2022 14:26:48 +0000 Received: from localhost ([127.0.0.1]:58786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nko3c-0007ib-3Y for submit@debbugs.gnu.org; Sat, 30 Apr 2022 10:26:48 -0400 Received: from mail-ej1-f68.google.com ([209.85.218.68]:41574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nko3Z-0007iN-HL for 55080@debbugs.gnu.org; Sat, 30 Apr 2022 10:26:46 -0400 Received: by mail-ej1-f68.google.com with SMTP id dk23so20326735ejb.8 for <55080@debbugs.gnu.org>; Sat, 30 Apr 2022 07:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=WvNNoaDC0BJB+h22qXCIdCYszNSI2AsUj4op9xzVdwY=; b=YpOM6OaVkQV6Uqh9giAXdh/YBySygXy9tJMl3V6tVPqTepCnKIbdD1ut0JcAuGfrBG CY6411N7647lfiSEvGJqZDVrpf8XYM2FIwdPiYV8wK7ALby3/ZL93sRykKeRWHjQqb+r hGKjpasXVg/mG+0XmnCh9ezYayyCRA89Fht5vmqG+lr6yR6aUdnsxvqzO7JkI+o7RYOH NA3rhjRhOKBwkYEBw19vTysh/nalaYdm+TCy4dxFT5JiWbtBg+3gz72gAxAfHtA+fSV0 9CndLLqrsAAgSOWHdMY9ah4RqFbTvyeFKtsCwL39H/AsiQHhtVwK4nsi7fu8BtxjiZTS 15vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=WvNNoaDC0BJB+h22qXCIdCYszNSI2AsUj4op9xzVdwY=; b=PC4+Y2z9rUZg/OtDj05+cJfDl91gXed0BQ8ci1/ry0El7kIIphAiDivjsZETJgMBYK pdmpIIukevhHCMzMFpuE+Nu6+5CA2BGSlQvKBPM7Rcyg3ZjiLFMOcrxicWLTnD0xYjq1 fE6Z617zCONeAN+l7eATd7fbe2VihKrGxJMCAVN3PS4lGpoEiZ+/7uWvYdILl89l6595 mle1+mC4Ov+6fRCujf3thEFQEyloS12L+FQx3V8pgyDvl1oBqg4fygYv5gSKQnXx7jbG 3mH7PnY85WZyBedWGDI98OeMcIzTrRH3ah+qXCaRua8cINw/+mLExe2n9wmgWnyiEVZy e6uA== X-Gm-Message-State: AOAM531UkqhNA5vf09SsaNxa7udc+ykcfeX7GyrF4fB1wzURsPsPhEXH aWEsdaDZW1B99bYtkdhAMDI= X-Google-Smtp-Source: ABdhPJxS1Ku6D27KVuzJJUyx6L70bTwS+CdVHB8sy3z7EbFhHfdtmn0yjgTm9E3r3awk5/WIE1bM5g== X-Received: by 2002:a17:907:c07:b0:6f3:a3b2:9582 with SMTP id ga7-20020a1709070c0700b006f3a3b29582mr4117086ejc.91.1651328799545; Sat, 30 Apr 2022 07:26:39 -0700 (PDT) Received: from nijino.fritz.box ([85.127.52.93]) by smtp.gmail.com with ESMTPSA id jx22-20020a170907761600b006f3ef214df6sm1648566ejc.92.2022.04.30.07.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 07:26:38 -0700 (PDT) Message-ID: Subject: Re: bug#55080: [PATCH shepherd] service: Gracefully handle non-existing log directories. From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Sat, 30 Apr 2022 16:26:29 +0200 In-Reply-To: <8735hu64je.fsf@gnu.org> References: <2e5292c2d45e525aa1b8e4c495704104d4121291.camel@gmail.com> <8735hu64je.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Am Samstag, dem 30.04.2022 um 16:15 +0200 schrieb Ludovic Courtès: > > > +(define (service-file-logger file input) > > +  "Return a thunk meant to run as a fiber that reads from INPUT > > and logs i [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [209.85.218.68 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.68 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.218.68 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 55080 Cc: 55080@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Am Samstag, dem 30.04.2022 um 16:15 +0200 schrieb Ludovic Courtès: > > > +(define (service-file-logger file input) > > +  "Return a thunk meant to run as a fiber that reads from INPUT > > and logs it to > > +FILE." > > +  (catch 'system-error > > +    (lambda () > > +      (%service-file-logger file input)) > > +    (lambda args > > +      (if (= ENOENT (system-error-errno args)) > > +          (begin > > +            (mkdir-p (dirname file)) > > +            (%service-file-logger file input)) > > +          (apply throw args))))) > > I wonder to what extent automatically creating log directories is a > good idea.  A potential drawback is if shepherd creates them with > unexpected ownership or permissions. As far as I know, those logs should be managed by shepherd, no? It just redirects stdout/stderr there, or is there something special going on? > Did you encounter this issue while working on services? > > Am I right that the Shepherd 0.8 had the same problem? It might be, I don't know. I've encountered this for non-existing log directory, so a reproducer would be setting #:log-file to $test-tmp- directory/does-not-exist/log and check for each service. Cheers From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 09:32:47 2022 Received: (at 55080) by debbugs.gnu.org; 1 May 2022 13:32:47 +0000 Received: from localhost ([127.0.0.1]:59917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl9gt-0008Hy-Ce for submit@debbugs.gnu.org; Sun, 01 May 2022 09:32:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl9gr-0008Hm-8r for 55080@debbugs.gnu.org; Sun, 01 May 2022 09:32:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl9gl-0007uK-He; Sun, 01 May 2022 09:32:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Gyts3KdKjVl6tIW4VVtUCh1YQ+3JIeHUzVkoHRAuD40=; b=FjP/6JWWQH7SOQts0u/9 folucenVOK369lRL5txJrOZER4fhaumX0CjF8mGMERLBFlHQmVL+7ok0gPpoBMLW3kqgu42OYv2nc /fEX6Zci+9A9+dLCEcHpHhODq455/3vtS1xVsVMTRt3lbPE/QgKOt1vuDPC3Gn3nK+d0SNvs2BA85 2b+HuoL0CcgX3nq7rLzaucjodpqb22msQm3Y+E5dzgPrRY6e11VvIPcjrEih6L4BofkQCwAPmkI/e 4mXo/v7Ou3WXbn8IAnAmXfBf13wzpwXqTA//+nG1xxWO/ySvqIe/63vPmSyhD01Vt5bpddJUiu99h 3B1EjWMqf49+9w==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38904 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl9gj-0003FJ-49; Sun, 01 May 2022 09:32:38 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#55080: [PATCH shepherd] service: Gracefully handle non-existing log directories. References: <2e5292c2d45e525aa1b8e4c495704104d4121291.camel@gmail.com> <8735hu64je.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 =?utf-8?Q?Flor=C3=A9al?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 01 May 2022 15:32:35 +0200 In-Reply-To: (Liliana Marie Prikler's message of "Sat, 30 Apr 2022 16:26:29 +0200") Message-ID: <871qxd4bv0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55080 Cc: 55080@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Liliana Marie Prikler skribis: > Am Samstag, dem 30.04.2022 um 16:15 +0200 schrieb Ludovic Court=C3=A8s: [...] >> Did you encounter this issue while working on services? >>=20 >> Am I right that the Shepherd 0.8 had the same problem? > It might be, I don't know. I've encountered this for non-existing log > directory, so a reproducer would be setting #:log-file to $test-tmp- > directory/does-not-exist/log and check for each service. Usually /var/log and similar directories are created not by shepherd but by Guix System, the distro being used, or whatever. That=E2=80=99s why I w= onder if it=E2=80=99s shepherd=E2=80=99s job to do that. I was asking how you encountered it to better understand in which circumstances the problem can occur in practice and what the failure more is like. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 09:50:35 2022 Received: (at 55080) by debbugs.gnu.org; 1 May 2022 13:50:35 +0000 Received: from localhost ([127.0.0.1]:59938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl9y6-0000Jm-Pl for submit@debbugs.gnu.org; Sun, 01 May 2022 09:50:34 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:36369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl9y5-0000Ja-PS for 55080@debbugs.gnu.org; Sun, 01 May 2022 09:50:34 -0400 Received: by mail-ed1-f65.google.com with SMTP id a1so14014520edt.3 for <55080@debbugs.gnu.org>; Sun, 01 May 2022 06:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=X6b1AjRglfBog/WMFx/Z5FIjkirS+puKBlFNPA9wYH4=; b=qhS1hZPzK2qCqVdiutoE9MNkAqTGFxTPhoPHJ8u7GE2GwTlPDqWsPW4Mi30+79QS9v F6UZ8ydouyGCSHx8hjwL/TeOAJQKMsFcWDvCeeOf3IPUT0fpeA+QOvB5ILLC4bw91TVH r3jntThWMFSibUbneUQi2qLh0iaWKXlXIy6VQkDG5isKmXCxFA6SeFywPqeMQcFXAqJZ yMVD1Ded1RaqduTbRPY3YSjwejtEqENf345eul5/n+IuoSOgR+yJ3l3NTDOlFpjDnf9r uJQEWkalzTqnSlwQR5fWI7epKmnt53UbXqml3CUoOXhcekjNsT3JMJcah0gvQ8mYffL3 Euqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=X6b1AjRglfBog/WMFx/Z5FIjkirS+puKBlFNPA9wYH4=; b=A3QFK5vWvJHiwpQl9ztFKGkQn6vtC5ttAvuuMsDR/tg8DVTFeHu4CrZP5gcRRnejwH 97Tpndu16dnNST3tQsd/WmFoCtWLmZ9KzJcVrNchDu1Y7QB0+BhaVWOZ9YPtwDUTH37g Q4dnubBUxy97QaJWmnhQ4g4nejL3CxOV5Od213Nrei4fPSdOGgOkU1G+UQLHJbrE01x4 oM9yjVOiuGPqvSj6DKSZIVBth5HWpHooXRbr3j7GiBSKarxPvnI1zsVUDqymfTAXCFG7 vQtiKfdG90de521BVHxkqGVmbdnQoxYa/MKb0kP39oBNntYQ/mDuhZHqnn8+Z9fkZJH4 cxng== X-Gm-Message-State: AOAM531GAS/VUPoSrUAENRmEXIyITrXoht06zDeK7WcO3Zx/ykd528Xx bkCbVBMt1OPNgICX4tN+Ngk= X-Google-Smtp-Source: ABdhPJzVBMAgT8XlzBdNMTDIxPjcPYDTvxTkKAgeTgJSZx678NluNKjgzO+RKsiV5MoKvWDNVckD0w== X-Received: by 2002:a50:8d09:0:b0:41c:b898:19a6 with SMTP id s9-20020a508d09000000b0041cb89819a6mr9063445eds.30.1651413027544; Sun, 01 May 2022 06:50:27 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id hy10-20020a1709068a6a00b006f3ef214dd4sm2640474ejc.58.2022.05.01.06.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 May 2022 06:50:26 -0700 (PDT) Message-ID: Subject: Re: bug#55080: [PATCH shepherd] service: Gracefully handle non-existing log directories. From: Liliana Marie Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Sun, 01 May 2022 15:50:25 +0200 In-Reply-To: <871qxd4bv0.fsf@gnu.org> References: <2e5292c2d45e525aa1b8e4c495704104d4121291.camel@gmail.com> <8735hu64je.fsf@gnu.org> <871qxd4bv0.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55080 Cc: 55080@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Sonntag, dem 01.05.2022 um 15:32 +0200 schrieb Ludovic Courtès: > > > > > Did you encounter this issue while working on services? > > > > > > Am I right that the Shepherd 0.8 had the same problem? > > It might be, I don't know.  I've encountered this for non-existing > > log directory, so a reproducer would be setting #:log-file to > > $test-tmp-directory/does-not-exist/log and check for each service. > > Usually /var/log and similar directories are created not by shepherd > but by Guix System, the distro being used, or whatever.  That’s why I > wonder if it’s shepherd’s job to do that. Hmm, it might not be. Still, I wouldn't like shepherd to fail in such a weird manner if the log file can't be created. Should we write a warning to shepherd's log and redirect to /dev/null instead? Should we just kill the service? From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 29 11:19:09 2022 Received: (at 55080-done) by debbugs.gnu.org; 29 Aug 2022 15:19:09 +0000 Received: from localhost ([127.0.0.1]:33416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSgXd-0003P5-BI for submit@debbugs.gnu.org; Mon, 29 Aug 2022 11:19:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSgXb-0003Os-P5 for 55080-done@debbugs.gnu.org; Mon, 29 Aug 2022 11:19:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSgXW-0000ZZ-J2; Mon, 29 Aug 2022 11:19:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=UiJvJsZaNLlASO5UeoslNqAoojxnxXYzKq4IQB4JYqM=; b=WuXOtt1fvlggiIbGO6Kn oMwR4LD2zLHSMv7oMKh47ryvw6As6idtycUooXUnzkcpTxspnFM1oqm0ElRD5wN+N6XzJ5R3VEDuy 9O9Pf7IBjohcbzh1LDFiX4vYKlK35mOs6490YeGKtyHdhxXWMdErPLXETPV2V10cZibwmtD/APyT0 MJbfUxeOOXajA1MWgVb2sbxFxOoX2WTX0V6cjJJRXfVfQgGOvW5GeQyp6/SV8KI3YZJvzKXjeDzCD mZxK/+Mcy8e0LjANssh8Ka6dyhSBcHRaiYNFaWdmrzESt9m+hlOdvWQAdapKnHZwwJY2gvv/eHo0y ukCfBdsqd9km1A==; Received: from [193.50.110.104] (port=44276 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSgXW-0005UD-62; Mon, 29 Aug 2022 11:19:02 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#55080: [PATCH shepherd] service: Gracefully handle non-existing log directories. References: <2e5292c2d45e525aa1b8e4c495704104d4121291.camel@gmail.com> <8735hu64je.fsf@gnu.org> <871qxd4bv0.fsf@gnu.org> Date: Mon, 29 Aug 2022 17:18:58 +0200 In-Reply-To: (Liliana Marie Prikler's message of "Sun, 01 May 2022 15:50:25 +0200") Message-ID: <87tu5v5b8d.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55080-done Cc: 55080-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Liliana, Liliana Marie Prikler skribis: > Am Sonntag, dem 01.05.2022 um 15:32 +0200 schrieb Ludovic Court=C3=A8s: >> >=20 >> > > Did you encounter this issue while working on services? >> > >=20 >> > > Am I right that the Shepherd 0.8 had the same problem? >> > It might be, I don't know.=C2=A0 I've encountered this for non-existing >> > log directory, so a reproducer would be setting #:log-file to >> > $test-tmp-directory/does-not-exist/log and check for each service. >>=20 >> Usually /var/log and similar directories are created not by shepherd >> but by Guix System, the distro being used, or whatever.=C2=A0 That=E2=80= =99s why I >> wonder if it=E2=80=99s shepherd=E2=80=99s job to do that. > Hmm, it might not be. Still, I wouldn't like shepherd to fail in such > a weird manner if the log file can't be created. I reread this thread and I concur. Patch finally pushed as b0d3f625543bcb32e94167c27cba153f9fc03acd. Thanks, Ludo=E2=80=99. From unknown Fri Jun 20 07:09:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Sep 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator