From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 UPS+Gmg6FGTDEwEASxT56A (envelope-from ) for ; Fri, 17 Mar 2023 11:01:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ECZzGmg6FGRWCQEAauVa8A (envelope-from ) for ; Fri, 17 Mar 2023 11:01:12 +0100 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 EBE59151AD for ; Fri, 17 Mar 2023 11:01:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pd6t9-0005re-CC; Fri, 17 Mar 2023 06:00:43 -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 1pd6t6-0005rR-Rj for guix-devel@gnu.org; Fri, 17 Mar 2023 06:00:41 -0400 Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pd6t4-0005Xw-Oc; Fri, 17 Mar 2023 06:00:40 -0400 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4PdKPP0zMdz9tF9; Fri, 17 Mar 2023 10:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1679047209; bh=cxld4i8znMUWeoVCS5UVu/JuhPatrPsgujPbchurIG0=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=ZLx0cs85A0l1lmrHpk9/KhPtA2SRT32I2MlI6QFMOrPh4JQkWMOy+jDSOLOIw5pLP moJBQo24BLUUtzj6+Ik8XoaP88W8BIOAYaXguiOEaPFipPXTbG8Nipjc6rqVrgELKR QpzEnR/ATAzNHGA+H8Kq6XSWZDiYSt7ZiGNvKFss= X-Riseup-User-ID: 5F0BB78FD4AC6EF5F5980E699F792B7DC35DC216C40527ED83196A3077EEAD26 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4PdKPN33gQz1y8c; Fri, 17 Mar 2023 10:00:08 +0000 (UTC) References: <874jqkeqau.fsf@gnu.org> <051c5314-2880-5520-fac5-628eb6eb6227@disroot.org> From: Csepp To: Adam Faiz Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-devel@gnu.org Subject: Re: The =?utf-8?Q?=F0=9F=90=91?= Shepherd gets a service collection Date: Fri, 17 Mar 2023 10:52:36 +0100 In-reply-to: <051c5314-2880-5520-fac5-628eb6eb6227@disroot.org> Message-ID: <871qln4s0t.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=198.252.153.6; envelope-from=raingloom@riseup.net; helo=mx0.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=ZLx0cs85; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=riseup.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679047272; a=rsa-sha256; cv=none; b=B3kv/afpsB2nsztg6IalGcpzwavGVov5BSpB/86LWkG7zDLIJfpxhlcJH9l8q1DObUVjtZ ktTdNjvPgvrM1COx/vbo2SCSoLF/rvuxIuIxY73PlvNdVZd3S4G+G1/0OWpyixSYI+RM1n GQC7x03/T+Dnpa20ZZap9aYrYKsPCZtj2S2NEcauoSHl7XSwt3Rlv3s8gkwcqL6YGlN7Ez q9fBkiABE4m7l+hlTx77g/3UY4tx0sjtSyWzKv5TyvLFOucX9zVN69vlNzrn6ifKOYm4GV sDPvKoDkMBN2KrOvkR3lKIsM7tirtk3Mn32BVuemAAHnLlYHRzb2S5aIfnJ5Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679047272; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yIixcJz5f7woUSV1XnGpmp6f7nTNwccvNl6ZFY4FHOE=; b=Uw3xXY+lwmp9tIbjQjn6GzOOT/Z95XjPLHCNRAosj7qIf49N0HEuNb7tcUCK5JvDWKSVqG WEpubO++Pyj7CYSZL9OhGXxcp/jeDKScfBHigxfnej/qZorCE65q4d4wNZ4zCNxUOeJT19 1JPJ6RHRBl2TH9yKxowWJM0/i0dEkMcBTBdf7vAy5gfoU37C5EdMrKA+E85a9867/fQ7iJ holfWKwcpZFcje9yLaWe43bYNd4WMAtCh6I6i0WCdKS9DAn2OwhhjTDc6DxqPRq0WZ/GcQ Md5Wu3XuoDrGJT7HhaGNhm7dINq5RLi+85QqGasBW0c3GCAZwVx/p/d5RAncFw== X-Migadu-Spam-Score: -6.60 X-Spam-Score: -6.60 X-Migadu-Queue-Id: EBE59151AD X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=ZLx0cs85; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=riseup.net X-TUID: zi6qbkStPzfD Adam Faiz writes: > On 3/16/23 22:14, Ludovic Court=C3=A8s wrote: >> The main limitation of mcron for such thing is that it=E2=80=99s entirely >> static: it reads a list of job specs upfront and then goes on to >> schedule them. There=E2=80=99s no communication protocol to talk to it = and >> add/remove jobs on the fly, which is what =E2=80=98at=E2=80=99 would nee= d. > Would it be easier to add dynamic job spec support to mcron than adding a= new command scheduler? Adding timers to Shepherd means Shepherd services can depend on timers and vice-versa. But maybe Shepherd could still reuse mcron code internally. >>> Regarding syslogd, I think a better approach is to tell the services to= send their output to stdout and stderror, >>> so that logs don't depend on a separate logging service in the first pl= ace. >> Yes, but: >> 1. Some daemons include syslog support even today, sometimes >> optional, >> sometimes mandatory. >> 2. Syslog is a bit more structured than just stdout/stderr >> output: >> there are facilities and levels, for instance=E2=80=94see syslog(3= ); >> syslogd provides interesting filtering capabilities. >> > Thanks, it looks like syslog is still important for structured logs. > > Are there issues of logs sent to syslog being lost even when the syslogd = service is specified as a requirement of services that use it? > If not, I think it's not necessary to add a syslogd implementation to the= shepherd. > >> Per-service logging is already implemented in the Shepherd, but > could be streamlined to have a default logs directory: >>> https://skarnet.org/software/s6/s6-log.html#loggingchain >> Interesting read, thanks! >> Regarding the default logs directory, there=E2=80=99s /var/log already, = or >> did >> you mean something else? > I do mean /var/log, I felt like #:log-file in make-forkexec-constructor c= ould be improved. > Rather than always having to specify the absolute log file path, > #:log-file could just be set as #t and would then default to > /var/log/$canonical-name of the service. That is problematic on flash storage and read-only storage. Syslog has the advantage of working very nicely in memory only. Also the structure is very nice, you get to see every event on the system in a chronological order. You don't get that with log files. Honestly /var/log should be redirectable to syslog.