From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6OhpOCL+n2BYgwAAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 19:00:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eAwQNCL+n2CDXAAA1q6Kng (envelope-from ) for ; Sat, 15 May 2021 17:00:18 +0000 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 5D4DE8F98 for ; Sat, 15 May 2021 19:00:18 +0200 (CEST) Received: from localhost ([::1]:59548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhxeC-0005Ew-70 for larch@yhetil.org; Sat, 15 May 2021 13:00:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhxds-0005EZ-F4 for guix-devel@gnu.org; Sat, 15 May 2021 12:59:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49104) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhxds-00027S-11; Sat, 15 May 2021 12:59:56 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52400 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhxdq-0001Js-RD; Sat, 15 May 2021 12:59:55 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: raingloom Subject: Re: unifying mcron and shepherd, service woes, improvements References: <20210515003937.3dbb4bb4@riseup.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 =?utf-8?Q?Flor=C3=A9al?= an 229 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: Sat, 15 May 2021 18:59:52 +0200 In-Reply-To: <20210515003937.3dbb4bb4@riseup.net> (raingloom@riseup.net's message of "Sat, 15 May 2021 00:39:37 +0200") Message-ID: <87fsyohr07.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-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621098018; 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; bh=Qyh2Y0cP5lJFNT+gPhaXfispTHfdKJ+/tARgc0DkPdA=; b=Qo4u49+UIkcf7MoLI59oLG1yZNqvYskbgeOse72ycaEW9KkxQ4xbxCRv/pVPRUyqTjHY4L gdJUUq8jP5H4XIFsW0uqsnEZbZwry8+zUhiVKyfCBWrexcHVAYETEt5KVvHyOQA+OzvBfP /3C9wK0aJH5UbtXFqq88LdaKLBPoHwZGQfagCBXNQDyWOA6R8/GRof/4XcCpPvnaq5bdyV iL+ruz2YVoeJrC6FVfAutgufuBPkLIOZw4qR0V0rsiSh9rVJ8jxGRjFW7/PvJpmBKhm+G2 3B5zGoOqAPDYxdHwF9c5VhEJiQfz49dgfVjHjlxq4YO03YWs8s5FgZ9Xp9Us8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621098018; a=rsa-sha256; cv=none; b=jzJRGBgOGTlxUlVrhTKuBBriJWhYr1aoh7eLCZZFEcZ4829/UkZej/HYMduR1sGT0Jh9xC 88rGidOauBZlFjq4RYvmzGdN8WjopjhHpcBGjdmzypyrbdQNB9raw0kEDmOgNzmTPsofpD c2nc3Ys8rXeQoZWrLcMuydQgfkqcqeI8Jb0pWweme40eHr8lw/tJjDsXpWV/qJc+ouj1GX LZOVM0PCfSAfmYTp+hNmPMoFJGXD7bbvzZV9c3AKv9lkozyhHAancu9r+V9S2/6ZywDHEp OShx96a74WawPnNPec9EJOV/e4fNXLkd8/+tymB2s7jkYQAK7RAMB9u8OLSW6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 5D4DE8F98 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8YJMEjn85qp8 Hi! raingloom skribis: > Just throwing this out there: > mcron is basically a very simple service manager, so, why not just move > all its timer functionality into shepherd (like systemd's timer units) > and then we can have a unified way to manage and debug services. Yes, we could=E2=80=94see below. > But also, shepherd debugging is kind of terrible too, at least on Guix, > so we (and if no one else gets on it that probably means I) should do > something about that. > For example, it's pretty nontrivial to figure out how to run a > service's command in isolation. So far I always had to find it in > /proc, which is not great. stracing a service that fails to start is > also rather tricky. The best I could come up with is to run strace in a > loop and pgrep for the PIDs I'm interested in. Same goes for GDB, which > was still bad in general last time I tried it. I agree it=E2=80=99s kind of ugly. We could provide =E2=80=9Cactions=E2=80= =9D to display the service=E2=80=99s command line, for instance, as in: herd command openssh The limitation right now is that the Shepherd=E2=80=99s API is procedural: there=E2=80=99s =E2=80=98make-forkexec-constructor=E2=80=99, which returns = a procedure that runs a command. That =E2=80=9Chides=E2=80=9D the command from the obj= ect. That=E2=80=99s not hard to fix, though we=E2=80=99ll have to think hard about compatibilit= y. > Security could also be improved probably. Can we have an OCAP model? > I feel like I don't know enough to say, so this mail is meant more as a > conversation starter. I think =E2=80=9Chaving an ocap model=E2=80=9D sounds nice but also vague. = :-) A concrete step we can take is follow the principle of least authority (POLA) for more services. That was the spirit of . > So, can we do better? What other issues are there with Shepherd? Are > they fundamental design problems or just plain old bugs? > > Or is everyone else happy with the current design and it's just me who > can't use Shepherd properly? =F0=9F=98=85 I think it=E2=80=99s fair to say it=E2=80=99s rough on the edges. :-) One thing that=E2=80=99s on the to-do list is switching to a real event loo= p in lieu of the current ad-hoc blocking design (this was discussed recently on this mailing list). The switch to =E2=80=98signalfd=E2=80=99 in the las= t release in a step in that direction. This will unlock =E2=80=9Csocket activation=E2= =80=9D and possibly timers as you mentioned. Thanks, Ludo=E2=80=99.